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.

DasKaktus

Members
  • Joined

  • Last visited

Everything posted by DasKaktus

  1. I have a working 1.10.2 Custom particle effect up and running, nothing much that I changed from 1.9. But I dont use any ParticleManager.
  2. Or.. If im reading you right there could only be one summoned entity, then tell all entities that have the player as caster to disappear?
  3. yeah, the getArmorModel is always called. its an override. You must check in this if the player is invisible, if the the player is not, then just return. public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { return new InvisibleArmorRender(); } So maybe you vill have to set an boolean in onArmorTick
  4. Save a reference to the entity in the item when summoned?
  5. Tried to debug and breakpoint to trace where the entity dies? By the way which difficulty level are you running the game in?
  6. That part is commented out. But back to topic. Sure about getCurrentMana() is over manacost?
  7. A real simple solution is this: @Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { return new InvisibleArmorRender(); } public class InvisibleArmorRender extends ModelBiped{ public InvisibleArmorRender(){ super(); } public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7){ } } Put that in your armor class.
  8. Make a custom armor renderer and just not render it
  9. If you still are thinking about this, then I would suggest you store players position in variable then on specifid tick you calculate the distance the player traveled since the last "readout". lets say the tick is every second then this pseudo code should be right. //calculate distance since last reading diffx = player.x - prev_posx diffy = player.y - prev_posy diffz = player.z - prev_posz //calculate overall distance distance = sqrt( diffx + diffy + diffz) //calculate speed // speed = distance * 60 *60 /1000 speed_in_km_h = distance*3,6 // store player position for next time prev_posx = player.x prev_posy = player.y prev_posz = player.z
  10. The condition is the same for both the push and pop, so if the condition is true for the push it is also true for the pop. But you were right about the pushing and popping, commented those lines and tried again. Now the creeper scales in all directions perfectly (Only my translation that is screwed now, but I will fix it) BUT.. Theres always a but Now my tileentity also goes flying in the air. So the ariginal problem is solved, thanks. Now I will troubleshoot why my tilentity fly in the air. But thats probably because my translation is f* up [EDIT] It seems like if i dont push and pop signs and other mobs get screwed up. [EDIT2] It only happens if I look at the creeper though.
  11. Ok, made some progress.. If I only scale Y to 2F then the creeper gets taller, but now seems stretched because i only scaled Y. GL11.glScalef(1F, 2F, 1F); http://image.baver.se/img/nxeP8Po But then if I scale all (X Y Z) the Y scaling disappear. GL11.glScalef(2F, 2F, 2F); http://image.baver.se/img/NDm60iN Am I thinking wrong?
  12. I tried now with the translate. And the result is that the creeper now is flying http://image.baver.se/img/iqfpdKn @SubscribeEvent @SideOnly(Side.CLIENT) public void onRenderLivingPre(RenderLivingEvent.Pre event) { EntityLivingBase e = event.entity; if(e.getEntityData().getBoolean("isConsumedSacrificeAltar")) { glPushMatrix(); glScalef(2F, 2F, 2F); glTranslatef(0, 4F, 0); } } @SubscribeEvent @SideOnly(Side.CLIENT) public void onRenderLivingPost(RenderLivingEvent.Post event) { EntityLivingBase e = event.entity; if(e.getEntityData().getBoolean("isConsumedSacrificeAltar")) { glPopMatrix(); } }
  13. Argh feel like ive tried everything. Somebody that at least know if im on the right track?
  14. OK, so I read a few tutorials and answers to questions, also some source code and came upp with this: @SubscribeEvent @SideOnly(Side.CLIENT) public void onRenderLivingPre(RenderLivingEvent.Pre event) { EntityLivingBase e = event.entity; if(e.getEntityData().getBoolean("shouldberesized")) { glPushMatrix(); glScalef(2F, 2F, 2F); } } @SubscribeEvent @SideOnly(Side.CLIENT) public void onRenderLivingPost(RenderLivingEvent.Post event) { EntityLivingBase e = event.entity; if(e.getEntityData().getBoolean("shouldberesized")) { glPopMatrix(); } } Dont worry about the "e.getEntityData().getBoolean("shouldberesized")" bit because that works. Also I didn't translate the position. But thats not my problem. The problem is that the entity (in my test cases, a Creeper) dont get doubled in size, it only floats up and then som strange perspective glitches happen. That entites behind the creeper gets in front as seen here: http://image.baver.se/img/BOR64wp In the picture, the creeper is standing besides the stone block, and the slime is about 10-15 blocks behind the creeper. So 2 problems, the scaling dont work and that the perspective is off. But maybe the perspective is because it isn't translated?
  15. Hi. I was wondering if it's possible to "hook" Mobs rendering and substitute with my own, or rather adding effects to their rendering for a specific entity in: for (Entity entity : (List<EntityMob>)worldObj.getEntitiesWithinAABB(EntityMob.class, box)) { } also contrl their sizes and everything. Thank you in advance.
  16. Thank you, we found the main problem, in getSubItems.
  17. Ahh there it was. I wonder what I was thinking.. But thank you for kickstarting my brain.
  18. That was just an answer to him that there is no crash. This actually evaluate to true, and the debugger share my beliefe becaus if i set a brekpoint inside it, the debugger kicks in and breaks at the breakpoint http://image.baver.se/img/tce47wH
  19. The debugger dont show me anything useful, maybe I'm not using it as effectively as I could. But I made a brekpoint on the setCreativeTab call in my item. Followed (stepped) thru it and saw that the setCreativeTab function was run, and my item was passed along. (Not much of a function the setCreativeTab) Then all went along. There is no errors or anything.
  20. That was my problem, that the items wont show up in creative tab, but they are accessible by "/give player kaktusmod:turtleshelhelmet" for example. Then the item will show up in the inventory and you can throw it to the ground, pick it up again. Wear it, and the potion effect will start etc. It behaves like a normal item. But refuses to be in the creative tab. Which class are you refering to? I thought i renamed all classes and files.
  21. Added this ti my armor class to se if it would crash. ( To se if this was actually run ) Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("MineCraft DIE!")); this.setCreativeTab(KaktusMod.kaktusmodcreativetab); Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("MineCraft DIE End.")); And sure enough, it crashed. Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue So am I right assuming that without these chat message the code will be runned? And therefor should set the item to the creative tab? (But it doesnt)
  22. I've updated the repo with your suggestions (Thanks b.t.w.) Now I'm trying to figure out how I update Forge ith my current setup. Updated forge to the latest recommended, still same error though, or rather, no error but strange behaviour ^^
  23. Do you see the difference? (not just more files) Bektor Ahh now I see, I created the repository one level to deep. (And thanks b.t.w. to offer your help )

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.