Jump to content

gegy1000

Members
  • Posts

    47
  • Joined

  • Last visited

Everything posted by gegy1000

  1. Makes sense, ok. I will try think of another way to do this. Because as you can see in my read, I am getting a random name if it doesn't already have one... What event would I use if I wanted it to get called sometime after read is called?
  2. So I am using IExtendedEntityProperties for my mod, but I have a problem with it. When another player joins a LAN world for the first time, it won't call readFromNBT on it. However, if I join again after that it does get called. I have used IExtendedEntityProperties and never got a problem with this. So that's why I posted this here. You can find the source code here: https://github.com/gegy1000/WarriorsMod/blob/master/src/main/java/net/gegy1000/warriors/common/data/WarriorCatData.java And my Event: https://github.com/gegy1000/WarriorsMod/blob/master/src/main/java/net/gegy1000/warriors/common/event/CommonEventHandler.java
  3. Since the event you are using is a fml event, you'll have to use: FMLCommonHandler.instance().bus().register() You can tell whether they are an FML event or a Forge event by looking at their package name.
  4. Are you registering the event with the correct bus? Send your registration code for the event.
  5. I have some armor, that when you put on the full set it activates some animations. I have an animation that only activates when off the ground. player.onGround works perfectly when in single player but when one player views another player with the armor on, it activates the falling animation, because player.onGround is not synced between clients. That is not what I want to happen. I can't think of another way to check if the player is on the ground. I tried checking if the block beneath the player is air, but it doesn't work that well because you could be standing on the very edge of a block. I also use player.motionY and player.capabilties.isFlying in the animation. But then again, that is not synced between clients. I want to avoid using packets for this because I don't want to send too many of them just for the animation. You can find the source here: https://github.com/FiskFille/TransformersMod/blob/master/src/main/java/fiskfille/tf/client/model/transformer/ModelPurge.java/#L550 - gegy1000
  6. Bounding box size of 80, 80. http://prntscr.com/6afo74 I'm standing right next to it. (It's a sphere)
  7. As I said, this is a REALY big entity
  8. I have an entity, that is really big, I want it to render from further away though. I've tried changing the tracking range when I register the entity, but that has a max range too.
  9. Remove your if(!worldIn.isRemote) in onBlockActivated in BlockNileWorkbench
  10. Try going into 1.8, change render distance to 16 or under and then run in 1.7.10 again with mods and it shouldn't crash
  11. As the title says, I'm trying to put a Zero-Gravity effect on the player. If anyone knows how I can do this, please notify me
  12. Doesn't world.getWorldTime() just return the time of day?
  13. I want to make a certain event happen after a certain amount of Minecraft days. But I'm not sure how I would go about doing this. Any help would be gratefully appreciated.
  14. Tried this, still crashes with the same log, what are we doing wrong? D:
  15. I've recently started using the SimpleNetworkWrapper for sending packets, but when I start the server I get this crash: http://pastebin.com/KndVFmUp I have no idea what is causing this, if anyone could help I would be very grateful. The source can be found here: https://github.com/FiskFille/TransformersMod/blob/master/src/main/java/fiskfille/tf/common/packet/base/TFPacketManager.java
  16. I'm trying to set the Camera Height and Bounding box of the player. That's all working, but after I changed the bounding box the player get's a 'black tint'. This is because I am using player.yOffset to change the camera height. I can't see any ways around this. If you could help me I would be very grateful. Here's my code: package gegy1000.warriors.client.renderer; import java.util.HashMap; import java.util.Map; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.EntityRenderer; import net.minecraft.entity.player.EntityPlayer; import org.lwjgl.opengl.GL11; public class CustomEntityRenderer extends EntityRenderer { private final Minecraft mc; float offsetY = -1.05F; public CustomEntityRenderer(Minecraft mc) { super(mc, mc.getResourceManager()); this.mc = mc; } public void hurtCameraEffect(float p_78482_1_) { } @Override public void renderWorld(float p_78471_1_, long p_78471_2_) { GL11.glRotatef(90, 1, 0, 0); GL11.glRotatef(90, 0, 1, 0); GL11.glRotatef(90, 0, 0, 1); super.renderWorld(p_78471_1_, p_78471_2_); } @Override public void updateCameraAndRender(float partialTick) { hurtCameraEffect(partialTick); EntityPlayer player = mc.thePlayer; if (player == null || player.isPlayerSleeping()) { super.updateCameraAndRender(partialTick); return; } GL11.glRotatef(90, 1, 0, 0); player.yOffset -= offsetY; super.updateCameraAndRender(partialTick); player.yOffset = 1.62F; } @Override public void getMouseOver(float partialTick) { super.getMouseOver(partialTick); } } @SubscribeEvent public void renderTick(TickEvent.RenderTickEvent event) { Minecraft mc = Minecraft.getMinecraft(); if (mc.theWorld != null) { if(event.phase == Phase.START) { EntityClientPlayerMP player = mc.thePlayer; if (renderer == null) { renderer = new CustomEntityRenderer(mc); } if (mc.entityRenderer != renderer) { prevRenderer = mc.entityRenderer; mc.entityRenderer = renderer; } } else if(event.phase == Phase.END) { } } }
  17. https://docs.oracle.com/javase/7/docs/api/java/lang/StackOverflowError.html Your code is probably getting into an infinite loop.
  18. I just moved my development code from one harddrive to the other. E - D And I'm getting this error: I tried to make a fresh install of the forge dev environment, but the error continued. If you have any ideas why, please respond. Thank You
  19. I've used PlayerUseItemEvent.Finish and it doesn't give an error but the even never get's called.
  20. I'm trying to use the PlayerUseItemEvent but I keep getting this error: Registry Code: Event Class:
×
×
  • Create New...

Important Information

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