Everything posted by DasKaktus
-
[1.10.2] Custom Particles?
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.
-
[1.8] Entity dies instantly when spawning (SOLVED)
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?
-
[SOLVED][1.8] Invis armor when player is invis
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
-
[1.8] Entity dies instantly when spawning (SOLVED)
Save a reference to the entity in the item when summoned?
-
[1.8] Entity dies instantly when spawning (SOLVED)
NVM
-
[1.8] Entity dies instantly when spawning (SOLVED)
Tried to debug and breakpoint to trace where the entity dies? By the way which difficulty level are you running the game in?
-
[1.8] Entity dies instantly when spawning (SOLVED)
That part is commented out. But back to topic. Sure about getCurrentMana() is over manacost?
-
[SOLVED][1.8] Invis armor when player is invis
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.
-
[SOLVED][1.8] Invis armor when player is invis
Make a custom armor renderer and just not render it
-
Player movement speed km/h
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
-
[1.8.9] Resize existing entities
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.
-
[1.8.9] Resize existing entities
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?
-
[1.8.9] Resize existing entities
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(); } }
-
[1.8.9] Resize existing entities
Bump
-
[1.8.9] Resize existing entities
Argh feel like ive tried everything. Somebody that at least know if im on the right track?
-
[1.8.9] Resize existing entities
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?
-
[1.8.9] Resize existing entities
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.
-
[SOLVED]Cant get setCreativeTab to work
Thank you, we found the main problem, in getSubItems.
-
[SOLVED]Cant get setCreativeTab to work
Ahh there it was. I wonder what I was thinking.. But thank you for kickstarting my brain.
-
[SOLVED]Cant get setCreativeTab to work
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
-
[SOLVED]Cant get setCreativeTab to work
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.
-
[SOLVED]Cant get setCreativeTab to work
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.
-
[SOLVED]Cant get setCreativeTab to work
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)
-
[SOLVED]Cant get setCreativeTab to work
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 ^^
-
[SOLVED]Cant get setCreativeTab to work
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 )
IPS spam blocked by CleanTalk.