Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

loawkise

Members
  • Joined

  • Last visited

Everything posted by loawkise

  1. If you want a global message then I think this will work: FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage(new ChatComponentText("Welcom" + player)); But if you want it to just be sent to the specific person I am not sure sorry.
  2. Okay I will just try to figure this out because I just got it to a stage where it seemed to work but it required me being able to call the applyEntityAttributes() method again so I go register the new max health, but this just leads to a crash because the entity is already spawned so it says in the console "attributes already registered". Hopefully I will get to the bottom of this, but at the moment I don't think I can update the entities max health without registering the attributes again which doesn't work.
  3. Yeah, I pretty much have to use a field as I will be changing it depending on the entities level. Here is the whole entity class: Also here is the "properties" class:
  4. Okay, I have added the extra println() and here is the console output in the order it comes out. Applying entity attributes maxHealth field =0.0 Before setting, maxHealth attribute = 20.0 After setting, maxHealth attribute = 0.0 Constructing EntityBlockling maxHealth field = 10.0 properties.getMaxHeath() =10.0
  5. Sorry I misunderstood before, changed it up, thanks. Here is the console after doing what you said. Applying entity attributes Before setting, maxHealth attribute = 20.0 After setting, maxHealth attribute = 0.0 Applying entity attributes Before setting, maxHealth attribute = 20.0 After setting, maxHealth attribute = 0.0
  6. I'm not entirely sure that's the problem because even when I do it like this the entity still dies instantly.
  7. Anyone have any ideas?
  8. I'm doing it a completely different way because I want to make sure that I can change keep the max health after the player leaves the world so I am now using a class that extends IExtendedEntityProperties. What I have done for all my other values works fine but when I put a variable inside of this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxHealth) like this instead of just a double (this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxHealth)), the entity dies immediately (so the maxHealth is 0) even though when I check my classes it is set to a base of 10.0D. Here are the classes use: The entities class.
  9. I have tried using getEntityAttribute(SharedMonsterAttributes.maxHealth); but that returns this "net.minecraft.entity.ai.attributes.ModifiableAttributeInstance@59721257"
  10. Thanks, I have figured it out now and I think I am all set. I have tested and it seems to work just as I wanted
  11. Anyone have any ideas?
  12. Okay I have set up the class and I believe it works, but I am wondering how I would use my getXP() method inside my EntityBlockling class's interact() method that I have.
  13. Never mind I put it in the wrong class I will play around with this for a bit and will come back if I hit another problem I can't solve. Thank you all for your help
  14. Okay, got that error fixed. Now I have added... ...to my properties class but it isn't being called.
  15. Is this what you meant... Here is the line the error occurs at on its own: this.xp = properties.getInteger("xp"); Here is the crash: Here is the whole class:
  16. Okay I have set this up and I believe it to be correct, but I am not sure what to do from now. I want the xp to increase everytime the mob attacks, any ideas?
  17. I have mod with a level and an xp field set up. These need to be saved when the player leaves the world otherwise they just revert back to their defaults of 1 and 0.
  18. Anyone have any ideas?
  19. Okay, I think I implemented something like you said, but it doesn't seem to change the texture and I am not sure if it is a programming error or I am missing something. @SideOnly(Side.CLIENT) public class RenderEntityGuardianStoneInfusedLava extends RenderLiving { private static ResourceLocation textures = new ResourceLocation(LivingBlocks.MODID + ":" + "textures/entity/livingblocks/entity_guardian_stone_infused_lava_0.png"); private static final String __OBFID = "CL_00000984"; public void textureAnimation() { int i; i = 0; if(i == 0) { textures = new ResourceLocation(LivingBlocks.MODID + ":" + "textures/entity/livingblocks/entity_guardian_stone_infused_lava_0.png"); i++; } if(i == 1) { textures = new ResourceLocation(LivingBlocks.MODID + ":" + "textures/entity/livingblocks/entity_guardian_stone_infused_lava_1.png"); i++; } if(i == 2) { textures = new ResourceLocation(LivingBlocks.MODID + ":" + "textures/entity/livingblocks/entity_guardian_stone_infused_lava_2.png"); i++; } if(i == 3) { textures = new ResourceLocation(LivingBlocks.MODID + ":" + "textures/entity/livingblocks/entity_guardian_stone_infused_lava_3.png"); i++; } if(i == 4) { textures = new ResourceLocation(LivingBlocks.MODID + ":" + "textures/entity/livingblocks/entity_guardian_stone_infused_lava_4.png"); i++; } if(i == 5) { textures = new ResourceLocation(LivingBlocks.MODID + ":" + "textures/entity/livingblocks/entity_guardian_stone_infused_lava_5.png"); i = 0; } System.out.println(i); } public RenderEntityGuardianStoneInfusedLava(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); } protected ResourceLocation getEntityTexture(EntityGuardianStoneInfusedLava par1EntityGuardianStoneInfusedLava) { textureAnimation(); return textures; } protected ResourceLocation getEntityTexture(Entity par1Entity) { return this.getEntityTexture((EntityGuardianStoneInfusedLava)par1Entity); } }
  20. Hi, I want to animate a mob texture that I have, but I can't get it working using the .mcmeta file. I am not sure if I am doing it wrong or it has changed. Here is my file file: { "animation": { "frames" [0,1] }} The name of the file is the same as my texture, but my texture is for a custom mob model so I was wondering if it was anything to do with specifying the texture size within the model class.
  21. Okay, I will try my best to figure out the packets and hope it solves my problem, thanks for the help
  22. I believe I have the exact same setup as the golem but it isn't working.
  23. The problem I am having is that I can get the int value of my attack timer without i being static, so the animation would work if the I could get its value.
  24. Is there any other way around this, I literally have 1 variable I need to use in another class and this just seems, as you put it, overkill.
  25. Don't worry, I already changed it

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.