Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited


  • Gender
  • Personal Text
    I am new!

zedblade's Achievements

Stone Miner

Stone Miner (3/8)



  1. Hello, I ran into a strange packet issue: When I send a packet to update the server for an ItemStack.TagCompount changes, it seems can't upadate nothing, even if i use the ItemStack or TagCompound object: Packet: public class PacketPlayerStats implements IMessage { ItemStack drill; NBTTagCompound stackCompound; public PacketPlayerStats() { } public PacketPlayerStats(ItemStack item, NBTTagCompound compound) { this.drill = item; this.stackCompound = compound; } @Override public void fromBytes(ByteBuf buf) { this.drill = ByteBufUtils.readItemStack(buf); this.stackCompound = ByteBufUtils.readTag(buf); } @Override public void toBytes(ByteBuf buf) { ByteBufUtils.writeItemStack(buf, this.drill); ByteBufUtils.writeTag(buf, this.stackCompound); } public static class Handler implements IMessageHandler<PacketPlayerStats, IMessage> { @Override public IMessage onMessage(PacketPlayerStats message, MessageContext ctx) { EntityPlayer player = NetUtils.getPlayerFromContext(ctx); message.drill.stackTagCompound.setInteger("scan", (int)message.value); OR message.stackCompound.setInteger("scan", (int)message.value); return null; } } } Function: @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { if (world.isRemote) { if (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) { if(!itemStack.hasTagCompound()) itemStack.setTagCompound(new NBTTagCompound()); int scanMode = itemStack.stackTagCompound.getInteger("scan"); if (scanMode == 0) { scanMode = 1; } else if (scanMode == 1) { scanMode = 2; } else if (scanMode == 2) { scanMode = 3; } else if (scanMode == 3) { scanMode = 0; } itemStack.stackTagCompound.setInteger("scan", scanMode); PacketDispatcher.sendToServer(new PacketPlayerStats(itemStack, itemStack.stackTagCompound)); } } }
  2. IProxy: public abstract interface IProxy { public abstract void registerEvents(); public abstract void registerRenders(); public abstract EntityPlayer getPlayerEntity(MessageContext ctx); public abstract IThreadListener getThreadFromContext(MessageContext ctx); } CommonProxy: public class CommonProxy implements IProxy { private final Minecraft mc = Minecraft.getMinecraft(); public void registerEvents() { FMLCommonHandler.instance().bus().register(new FMLEventHandler()); MinecraftForge.EVENT_BUS.register(new ForgeEventHandler()); } @Override public void registerRenders() { } @Override public EntityPlayer getPlayerEntity(MessageContext ctx) { return (ctx.side.isClient() ? mc.thePlayer : ctx.getServerHandler().playerEntity); } @Override public IThreadListener getThreadFromContext(MessageContext ctx) { return (ctx.side.isClient() ? mc : ctx.getServerHandler().playerEntity.getServerForPlayer()); } ClientProxy: public class ClientProxy extends CommonProxy { public void registerEvents() { super.registerEvents(); } public void registerRenders(){ Items.registerRenders(); Blocks.registerRenders(); } } ServerProxy: public class ServerProxy extends CommonProxy { public void registerEvents() { super.registerEvents(); } }
  3. hello, Running Server MC 1.8 forge 1306, crash error: ... instead in SSP works fine. Please Help ....
  4. Well, I tried this code in creative mode for watch better the creeper movements and not in "paceful" mode, obviously: @SubscribeEvent public void onBreakBlock(BreakEvent event) { if (!player.worldObj.isRemote) { fYaw = 90.0F; // or = 270.0F or = 180.0F EntityCreeper Logger = new EntityCreeper(player.worldObj); Logger.setLocationAndAngles(event.x + 0.5D, event.y, event.z + 0.5D, fYaw, 0.0F); Logger.rotationYaw = fYaw; // <===== Tried With and WithOut this line player.worldObj.spawnEntityInWorld(Logger); } } Results same problem: the Creeper spawn allways with the same Yaw direction (0.0F). Seriously, I tried all code combinations but nothing to do ... Can I see your testing code? thank you so much ...
  5. maybe you haven't noticed, but it already does ... Creeper.rotationYaw = fYaw;
  6. The Code into "onBreakBlock(BreakEvent event)" function (with "@SubscribeEvent" tag): fYaw = 90.0F; EntityCreeper Creeper = new EntityCreeper(player.worldObj); Creeper.setLocationAndAngles(event.x + 0.5D, event.y, event.z + 0.5D, fYaw, 0.0F); player.worldObj.spawnEntityInWorld(Creeper); Creeper.setPositionAndRotation(event.x + 0.5D, event.y, event.z + 0.5D, fYaw, 0.0F); Creeper.rotationYaw = fYaw; Creeper.setAngles(fYaw, 0.0F); //Creeper.setRotationYawHead(fYaw); <=== Works but rotate head only
  7. Hello, I notice that is inpossible rotate the yaw attribute of any entities setted always to 0: I tried this code but doesn't works: EntityCreeper Creeper = new EntityCreeper(player.worldObj); Creeper.setLocationAndAngles(event.x + 0.5D, event.y, event.z + 0.5D, fYaw, 0.0F); player.worldObj.spawnEntityInWorld(Creeper ); Creeper.setPositionAndRotation(event.x + 0.5D, event.y, event.z + 0.5D, fYaw, 0.0F); Creeper.rotationYaw = fYaw; Creeper.setAngles(fYaw, 0.0F); please help ...
  8. Hi, In this code I try to retrieve the current Item into to a StackItem variable but when put the code nothing works Code without error: Code with java.lang.NullPointerException: What happen? Is it needs to refresh the ItemStack, EntityPlayer or what? thx
  9. Hi, Is there a function/method that toggle the held item display? Similar to the "F1" effect but only regarding the held item. thank you
  10. Hello, I'm using the follow code to zoom the view when holding a bow: ReflectionHelper.setPrivateValue(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, charge, "cameraZoom", "field_78503_V"); BUT when makes the zoom the held item (the bow) disappears ... o_O How can I display however the bow? thx
  11. Hello, can someone kindly give me the IDs fx List of the playAuxSFX function? thank u soooooo much
  12. Helllo, I cant reobfuscate my mod already from many months, and NOW I see the same problem when it says "I cant find md5s server": Someone suggest me to use ForgeGradle but i NEVER found the setup file for MC 1.6.4, please help me.....
  13. Yes, i put some code on addInformation in my Item but i dont know how intercept "IF KEY PRESSED" event ...have you an example? thx
  14. Hello, I need to make a tooltip like TinckerConstruct tooltip style with more info by holding "sfift" or "ctrl" button. thx
  • Create New...

Important Information

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