Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • gummby8
  • Announcements

    • LexManos

      Forge 1.12 and Announcement   06/17/17

      Please read this: http://www.minecraftforge.net/forum/topic/58706-regarding-minecraft-112-and-policy-changes/  

gummby8

Members
 View Profile  See their activity
  • Content count

    479
  • Joined

    August 7, 2014
  • Last visited

    January 29

 Content Type 

  • All Activity

Profiles

  • Status Updates
  • Status Replies

Forums

  • Topics
  • Posts

Calendar

  • Events
  • Event Comments

Everything posted by gummby8

  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
  • Page 1 of 20  
  1. Is it possible to tilt entity hitboxes?

    gummby8 posted a topic in Modder Support

    Looking to make a fairly big bipedal creature, and I wanted to make all of the limbs viable hitboxes. However when the creature lifts a leg or bends a knee, or raises its arm, they would be at an angle. These angled appendages would be very awkward to try and cover in multiple rigid cuboids. As some corners would stick out, and other spots would be left uncovered. To my knowledge everything is done in cuboids only specifying 2 points. Is there a way to specify all 8 points of the cuboid and have abstract shapes?
    • November 14, 2017
    • 3 replies
  2. Is it possible to tilt entity hitboxes?

    gummby8 replied to gummby8's topic in Modder Support

    Yup I have done multi hitbox entities before in the past. Even the dragons hitboxes are unwieldy. Being limited to just cubes makes things difficult. I was wondering if anyone had explored the possibilities before I give it a shot.
    • November 14, 2017
    • 3 replies
  3. Custom shaders possible?

    gummby8 posted a topic in Modder Support

    I have a feeling the answer is no but I am going to ask anyway. Using reflection I was able to use the loadShader method in EntityRenderer class. Using this I can set the shader of the client to any shader in the current resourcepack. However I don't think I can use any shader I put in my mods resource folders. f_loadShader = ReflectionHelper.findMethod(EntityRenderer.class, null, new String[]{"func_175069_a", "loadShader"}, ResourceLocation.class); public static void setShader(){ try { //f_loadShader.invoke(Minecraft.getMinecraft().entityRenderer, new ResourceLocation("shaders/post/sobel.json")); f_loadShader.invoke(Minecraft.getMinecraft().entityRenderer, new ResourceLocation("mb:shaders/post/wiggle.json")); } catch (Throwable e) { e.printStackTrace(); } } If I use the sobel shader location it works fine. If I put the sobel shader json in my resources folder under shaders/post/sobel.json it also works, but it is using the minecraft soble.json in the resources shaders/program folder. Looking further into this it all boils down to the ShaderManager class public ShaderManager(IResourceManager resourceManager, String programName) throws JsonException { JsonParser jsonparser = new JsonParser(); ResourceLocation resourcelocation = new ResourceLocation("shaders/program/" + programName + ".json"); If I could access that ResourceLocation to put my mod ID in it, this would all work. Any thoughts?
    • October 21, 2017
    • 1 reply
  4. Is there a better/cleaner way to handle Mob model animations?

    gummby8 posted a topic in Modder Support

    In the continued pursuit to become a better programer, this is half a question about knowing more about fancy tricks in java and half pertaining to Forge / MC I have mob models that perform animations based on their AI. I use a sort of keyframe system to determine the position and rotation of the model parts. Since there is only 1 model for every instance of that monster, if I ever move a part in one animation, I have to specify how that part moves in every animation for that monster. So now I have to specify an array of "KeyFrame" objects for each part. and then specify the position and rotation for each KeyFrame in the array So for instance, If I have the head of the mob move during an animation it goes as follows static final KeyFrame[] KF_Howl_HEAD = new KeyFrame[4]; //KeyFrame(int frame, float posX, float posY, float posZ, float rotX, float rotY, float rotZ) public void build_howl() { KF_Howl_HEAD[0] = new KeyFrame(0, 0, 3, -45, -10, 0, 0); KF_Howl_HEAD[1] = new KeyFrame(5, 0, 3, -45, -40, 0, 0); KF_Howl_HEAD[2] = new KeyFrame(35, 0, 3, -45, -40, 0, 0); KF_Howl_HEAD[3] = new KeyFrame(45, 0, 3, -45, -10, 0, 0); } public void howl(int frame, float partialTick){ ModelUtils.moveParts(frame, HEAD, KF_Howl_HEAD, partialTick); } Now that is just to move the head. To have 1 animation that moves a dozen parts, it gets a pretty bulky initializing KeyFrame arrays for each part, for each animation and then building out each individual keyframe based on position and rotation. Here is a model with 5 animations that ends up with more than 1000 lines of code https://github.com/gummby8/ModularBosses/blob/104602a9d162ee8a14414be61f8ba3d46aee006b/main/java/com/Splosions/ModularBosses/client/models/entity/ModelGolem.javaL279 My question is, is this the cleanest way of doing this, or is there a more advanced/better way? Thank you,
    • October 20, 2017
    • 1 reply
  5. Looking for a way for the server to tell the client to spawn particles

    gummby8 posted a topic in Modder Support

    I have a monster that has a % chance to teleport away when it receives damage. When it teleports it creates a cloud of particles. All the random number gen and damage takes place server side, and the particles occur client side. Currently I am using a datawatcher to tell the client when to spawn particles, but it doesn't always work, sometimes it is late and the mop teleports away, then creates the particles. I was thinking of having the monster spawn an invisible entity once it teleports and that entity could generate the particles instead, unless there is an easier way that I am not thinking of. Thank you,
    • October 17, 2017
    • 1 reply
  6. Entity model texture help.

    gummby8 replied to Viesis's topic in Modder Support

    I would look into Tabula, I think ichun did just port it to 1.10. I still maintain a 1.8 client to use it. There was an updated standalone modeler that supported animations like Tabula does, I can't find it at the moment though.
    • October 16, 2017
    • 10 replies
  7. LivingHurtEvent event.setCanceled(true) Entity is still knocked back

    gummby8 posted a topic in Modder Support

    What do I need to do in LivingHurtEvent to prevent the entire event? The damage is not delt, but the mob is still knocked back and flashes red
    • October 12, 2017
    • 4 replies
  8. LivingHurtEvent event.setCanceled(true) Entity is still knocked back

    gummby8 replied to gummby8's topic in Modder Support

    Ah... Reading.... Got it
    • October 12, 2017
    • 4 replies
  9. LivingHurtEvent event.setCanceled(true) Entity is still knocked back

    gummby8 replied to gummby8's topic in Modder Support

    I did cancel the event. Setting the hurtResistantTime to 0 does not cancel the knockback or red flash.
    • October 12, 2017
    • 4 replies
  10. How can i set a random number to an item whenever an instance of said item is created?

    gummby8 posted a topic in Modder Support

    I have a note item. the player can read. I have 10 textures for said note item. Rather than creating 10 different notes with 10 different renders I wanted to just create 1 note class and 1 renderer that will change the resourcelocation based on a variable that is set in the note item when it is created in game. So if a mob drops a note, that note class will randomly pick a number 1-10 and the renderer will use that number to determine what texture to display on the note. I think I want to use dmg values, but I can't see how to randomly set that value when a new note itemstack is created.
    • October 11, 2017
    • 5 replies
  11. How can i set a random number to an item whenever an instance of said item is created?

    gummby8 replied to gummby8's topic in Modder Support

    That did it. Thank you. I was not aware there was an onUpdate for items......
    • October 11, 2017
    • 5 replies
  12. How can i set a random number to an item whenever an instance of said item is created?

    gummby8 replied to gummby8's topic in Modder Support

    K understood, good call. New problem "Where it is needed" is when it is rendered, specifically during the RenderHandEvent. Which is of course client side. Which will not make the itemstack damage persistent. So at the moment, it swaps textures fine, but if I drop and pickup the item it reshuffles the textures because according to the server the damage is still 0. What other event or time would be best, server side, to set the itemstack damage?
    • October 11, 2017
    • 5 replies
  13. Entity model texture help.

    gummby8 replied to Viesis's topic in Modder Support

    If you set your texture size properly on your boat model it will tile the 16x16 texture for you. What are you using to model your boat?
    • October 11, 2017
    • 10 replies
  14. Send IBlockState via IEntityAdditionalSpawnData?

    gummby8 posted a topic in Modder Support

    I have a mob that takes on the texture of the block it is spawned on. This is easy enough to get client side. IBlockState iblockstate = this.worldObj.getBlockState(this.getPosition().down()); BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher(); IBakedModel ibakedmodel = blockrendererdispatcher.getModelFromBlockState(iblockstate, this.worldObj, new BlockPos(0,0,0)); String string = ibakedmodel.getTexture().getIconName() + ".png"; String[] parts = string.split(":"); ResourceLocation textureLoc = new ResourceLocation(parts[0] + ":textures/" + parts[1]); Main problem with this is BlockRendererDispatcher is client side only. I only need the IBlockState of the block, which I can get on the server. but how can I get that to the client via IEntityAdditionalSpawnData? I thought of using x, y, z cords and then this.bPos = new BlockPos(x,y,z); this.fallTile = this.getWorldObj().getBlockState(this.bPos); but that block could change. So saying you are fighting the monster, you die or whatever, and come back later. If the blockpos that the monster was using for its texture was broken or changed, then the monster would change. Is there a different way to get a blockstate without having a blockpos? Like a block ID or something?
    • October 9, 2017
    • 14 replies
  15. Send IBlockState via IEntityAdditionalSpawnData?

    gummby8 replied to gummby8's topic in Modder Support

    Are those variants different blockstates? Because it picked up different color wool and stairs
    • October 10, 2017
    • 14 replies
  16. Send IBlockState via IEntityAdditionalSpawnData?

    gummby8 replied to gummby8's topic in Modder Support

    It does work console output for the texture location mb:textures/blocks/control_block/output.png So it picks the texture for the "front" side of the block. according to the model json
    • October 10, 2017
    • 14 replies
  17. Send IBlockState via IEntityAdditionalSpawnData?

    gummby8 replied to gummby8's topic in Modder Support

    I tested it with a few mods, but now that you say that, I went back to check their git, they do not have sub folders, all the textures are at the root of the blocks folder. I'll create a test block and bury it in some sub folders to see what results I get.
    • October 10, 2017
    • 14 replies
  18. [1.12.2]Entity NBT not saving

    gummby8 replied to GiantNuker's topic in Modder Support

    How long does the entity last? You only save to NBT when the chunk unloads. Like when you move far away, or leave the world, of gracefully shutdown a server. If the entity is gone before the chunk unloads, it will never save, and thus never need to load. read and write to NBT is only to be used to preserver vital entity data when the chunk unloads from the ram. It saves all that data to disk so when the chunk is loaded again, when a player walks close enough, then the entity is brought back into existence. Cast your charm, them before the entity dies, save and quit out of the world. Reload your world and see if you get an NBT read. Many times I see a crash report because I derped up my NBT read and write on projectiles. So just in the off chance the client is closed while a projectile entity existed, it would safely die or reload when the client was re-opened.
    • October 10, 2017
    • 6 replies
  19. [1.12.2]Entity renderer not working

    gummby8 replied to GiantNuker's topic in Modder Support

    I could be wrong, because I am used to working in 1.8, but your model class looks off. You are creating a new ModelRenderer every render frame, which I am pretty sure is wrong. Here is one of my most basic model classes https://github.com/gummby8/ModularBosses/blob/master/main/java/com/Splosions/ModularBosses/client/models/projectiles/ModelBoulder.java Note super.render. That could be what you are missing. public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); part.render(f5); }
    • October 10, 2017
    • 4 replies
  20. [1.12.2]Entity NBT not saving

    gummby8 replied to GiantNuker's topic in Modder Support

    NBT is writing and reading from the disk. You shouldn't be reading from NBT unless you are loading an entity that was not already loaded. Like when you log into a world for the first time, or move into an entity load range. Also Reading and Writing to NBT is a server side method. So if you are hoping to get it to pass something to the client that won't happen. You can probably use IEntityAdditionalSpawnData if that is still a thing...I am stuck in 1.8 for now.
    • October 10, 2017
    • 6 replies
  21. How does entity's hitbox and block's hitbox interact

    gummby8 replied to TheRPGAdventurer's topic in Modder Support

    So you want to find how high your entity is from the nearest solid block directly below the entity? BlockPos blockPos = new BlockPos(this.posX, this.posY, this.posZ); while (!worldObj.getBlockState(blockPos).getBlock().getMaterial().blocksMovement()) { blockPos = blockPos.down(); } That will find the nearest solid block straight down. Then you can calculate the distance
    • October 10, 2017
    • 4 replies
      • 1
      • Like
  22. Send IBlockState via IEntityAdditionalSpawnData?

    gummby8 replied to gummby8's topic in Modder Support

    Something I learned, that I'll put here in case someone else is looking to do this later. Because the crash report you get from it didn't really point to the problem line. public void getTexture() { if (textureBlockID == -1) { BlockPos blockPos = new BlockPos(this.posX, this.posY, this.posZ); while (!worldObj.getBlockState(blockPos).getBlock().getMaterial().blocksMovement()) { blockPos = blockPos.down(); } IBlockState iblockstate = this.worldObj.getBlockState(blockPos); textureBlockID = Block.getStateId(iblockstate); System.out.println("" + textureBlockID); this.hardness = iblockstate.getBlock().getBlockHardness(this.worldObj, blockPos); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.golemMaxHealthMulti * this.hardness); this.heal((float) (this.golemMaxHealthMulti * this.hardness)); } } @Override public void readSpawnData(ByteBuf additionalData) { textureBlockID = ByteBufUtils.readVarInt(additionalData, 4); IBlockState iblockstate = Block.getStateById(textureBlockID); BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher(); IBakedModel ibakedmodel = blockrendererdispatcher.getModelFromBlockState(iblockstate, this.worldObj, new BlockPos(0,0,0)); String string = ibakedmodel.getTexture().getIconName() + ".png"; String[] parts = string.split(":"); textureLoc = new ResourceLocation(parts[0] + ":textures/" + parts[1]); } @Override public void writeSpawnData(ByteBuf buffer) { getTexture(); ByteBufUtils.writeVarInt(buffer, textureBlockID, 4); } I am a bit fuzzy on the math part but when you write and read to the ByteBuf, you have to specify how many bytes to use. When I looked at how many some of the other classes in MC use, it was 2. But with blockstateIDs, colored wool blocks in particular, their int ID was too big for just two bytes, so I increased it to 4 bytes for the ByteBuf, and now it works.
    • October 10, 2017
    • 14 replies
  23. Send IBlockState via IEntityAdditionalSpawnData?

    gummby8 replied to gummby8's topic in Modder Support

    So how would one make an entity look like the block it spawned on nowadays? For when I update.
    • October 9, 2017
    • 14 replies
  24. Send IBlockState via IEntityAdditionalSpawnData?

    gummby8 replied to gummby8's topic in Modder Support

    I derped, I could have sworn I had done this before a year or so ago....I did
    • October 9, 2017
    • 14 replies
  25. 1.12 - Trying to use WorldEdit schematics with Custom Blocks

    gummby8 replied to skeeter144's topic in Modder Support

    I had my own troubles with world edit back in the day and ended up swapping over to Schematica schematics. World edit for 1.8 didn't work right with custom blocks between worlds because their block ids would change? Schematica made a block map to fix it. Not sure if WE has issues with custom tile entities either, but I never had an issue with Schematica.
    • October 5, 2017
    • 6 replies
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
  • Page 1 of 20  
  • All Activity
  • Home
  • gummby8
  • Theme
  • Contact Us

Copyright © 2017 ForgeDevelopment LLC Powered by Invision Community