deenkayros
Members-
Posts
111 -
Joined
-
Last visited
Everything posted by deenkayros
-
---- Minecraft Crash Report ---- // Everything's going to plan. No, really, that was supposed to happen. Time: 2/18/15 2:46 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at com.tmtravlr.soundfilters.SoundTickHandler.tick(SoundTickHandler.java:271) at cpw.mods.fml.common.eventhandler.ASMEventHandler_199_SoundTickHandler_tick_ClientTickEvent.invoke(.dynamic) at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) at cpw.mods.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:330) at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:2052) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:961) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887) at net.minecraft.client.main.Main.main(SourceFile:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
-
[1.7.10] Crafting Recipes /w alternate Items
deenkayros replied to deenkayros's topic in Modder Support
this time I really afraid to asking you a sample link ... -
[1.7.10] Crafting Recipes /w alternate Items
deenkayros replied to deenkayros's topic in Modder Support
no, I mean like this but that works: GameRegistry.addRecipe(new ItemStack(Blocks.Chest, 1), "ddd", "d d", "ddd", "d", new ItemStack(Items.diamond), "d", new ItemStack(Items.emerald)); that makes a chest BUT using "diamonds" OR "emeralds" .... -
[1.7.10] Crafting Recipes /w alternate Items
deenkayros replied to deenkayros's topic in Modder Support
yes, but it makes multiple shapes ... -
[1.7.10] Crafting Recipes /w alternate Items
deenkayros replied to deenkayros's topic in Modder Support
I don't care the "Output", but I need to set multiple "Input" items for the same shape .... -
hi, Is there a way to make a same recipe with different items like "OreDictionary.WILDCARD_VALUE" effect? I mean, with this code the recipe shows any combination of plank block in the same shape: GameRegistry.addShapedRecipe(new ItemStack(Chest, 1), "ppp", "p p", "ppp", 'p', new ItemStack(Blocks.planks, 1, OreDictionary.WILDCARD_VALUE)); But I need to use "different" items like diamond and emerald then with different id. thanks
-
yes, you're right, it's very easy to read
-
then I suppose you can't see the logic in it ...
-
You don't even know what the flag does, do you? I think you know very well, right?
-
I checked. The coordinates are correctly sended ... and the registration packets force me to implement IMessage and IMessageHandler into the same class: PacketDispatcher class: public class PacketDispatcher { private static byte packetId = 0; private static final SimpleNetworkWrapper dispatcher = NetworkRegistry.INSTANCE.newSimpleChannel(Properties.modid); public static final void registerPackets() { PacketDispatcher.dispatcher.registerMessage(PacketBlockState.class, PacketBlockState.class, packetId++, Side.SERVER); } } SimpleNetworkWrapper required that ...
-
PacketBlockState: public class PacketBlockState implements IMessage, IMessageHandler<PacketBlockState, IMessage> { int state = 0; int xHit = 0; int yHit = 0; int zHit = 0; public PacketBlockState() { } public PacketBlockState(int state, int xHit, int yHit, int zHit) { this.state = state; this.xHit = xHit; this.yHit = yHit; this.zHit = zHit; } public IMessage onMessage(PacketBlockState message, MessageContext ctx) { //EntityPlayer player = NetUtils.getPlayerFromContext(ctx); EntityPlayer player = ctx.getServerHandler().playerEntity; System.out.println("setBlock-SERVER = " + player.worldObj.setBlock(xHit, yHit, zHit, Blocks.torch, 5, 2)); break; } return null; } public void fromBytes(ByteBuf buf) { this.state = buf.readInt(); this.xHit = buf.readInt(); this.yHit = buf.readInt(); this.zHit = buf.readInt(); } public void toBytes(ByteBuf buf) { buf.writeInt(this.state); buf.writeInt(this.xHit); buf.writeInt(this.yHit); buf.writeInt(this.zHit); } } Ok, I know, I shouldn't implement IMessage & IMessageHandler in the same class (I'll fix it...) ForgeEvent handler: @SubscribeEvent public void continueUsing (PlayerUseItemEvent.Tick event){ if (event.entityPlayer.worldObj.isRemote && event.entityPlayer.getCurrentEquippedItem() != null){ int xHit = event.entityPlayer.posX; int yHit = event.entityPlayer.posY; int zHit = event.entityPlayer.posZ; int light = event.entityPlayer.worldObj.getFullBlockLightValue(xHit, yHit - 1, zHit); if (light > 0 && light < { PacketDispatcher.sendToServer(new PacketBlockState(2, xHit, yHit - 1, zHit)); System.out.println("setBlock-CLIENT = " + event.entityPlayer.worldObj.setBlock(xHit, yHit - 1, zHit, Blocks.torch, 5, 2)); } } } I tried to use "Flag" = 1 but nothing to do...
-
hello, I can not figure out how this code (server side) always return "false": PacketBlockState; player.worldObj.setBlock(xHit, yHit, zHit, Blocks.torch, 5, 2); with the result that it doesnt creates the block ... without show up no errors!!!! Client side code: PacketDispatcher.sendToServer(new PacketBlockState(2, xHit, yHit, zHit)); event.entityPlayer.worldObj.setBlock(xHit, yHit, zHit, Blocks.torch, 5, 2)); The torch seems placed but when exit and reload the world, it's disappeared. Please help...
-
then I right when I say "I don't need to send a packet to the server" .. and this is all i need to keep updated my inventory .. right?
-
Well, I realized that I don't need to send a packet to the server because the function "updateTick" of my block container (chest) affects both sides... correct me if I'm wrong thank you again ...
-
Thanks works. Instaed is it possible to send a "IInventory" object?
-
How can I send a "ItemStack" object if it's possible?
-
Hi again, I need to send via packet more data values at same time like this: PacketDispatcher.sendToServer(new PacketClientStats(1, 2, 3.5F, itemStack)); And I noticed that only the first param is correctly sended instead other params have wrong values: PacketClientStats class: public class PacketClientStats implements IMessage, IMessageHandler<PacketClientStats, IMessage> { int stats = 0; int food = 0; float heart = 0; static ItemStack drill; public PacketClientStats() { } public PacketClientStats(int stats, int food, float heart, ItemStack drill) { this.stats = stats; this.food = food; this.heart = heart; this.drill = drill; } public IMessage onMessage(PacketClientStats message, MessageContext ctx) { System.out.println("stats = " + message.stats); System.out.println("food = " + message.food); System.out.println("heart = " + message.heart); System.out.println("drill = " + message.drill.getDisplayName()); return null; } public void fromBytes(ByteBuf buf) { this.stats = buf.getInt(0); this.food = buf.getInt(0); this.heart = buf.getFloat(0); } public void toBytes(ByteBuf buf) { buf.writeInt(this.stats); buf.writeInt(this.food); buf.writeFloat(this.heart); } } And the "itemStack" param works properly only if it's declared with "static" option ...
-
look this: http://www.minecraftforge.net/forum/index.php/topic,27302.msg139659.html#msg139659 ...
-
Java 7 'cause Java 8 is not eclipse compliant ...
-
Hi, I ran into this sporadic random crash error forge 1291: any idea?
-
hello, I ran to a dedicated server crash error (instead on SP work fine): Crash: Code line crash: PacketDispatcher.sendToServer(new PacketChangeCurrentRow(-3, tileentitychest, null)); PacketDispatcher class: public class PacketDispatcher { private static byte packetId = 0; private static final SimpleNetworkWrapper dispatcher = NetworkRegistry.INSTANCE.newSimpleChannel(Properties.modid); public static final void registerPackets() { PacketDispatcher.dispatcher.registerMessage(PacketChangeCurrentRow.class, PacketChangeCurrentRow.class, packetId++, Side.SERVER); } public static final void sendTo(IMessage message, EntityPlayerMP player) { PacketDispatcher.dispatcher.sendTo(message, player); } public static void sendToAll(IMessage message) { PacketDispatcher.dispatcher.sendToAll(message); } public static final void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) { PacketDispatcher.dispatcher.sendToAllAround(message, point); } public static final void sendToAllAround(IMessage message, int dimension, double x, double y, double z, double range) { PacketDispatcher.sendToAllAround(message, new NetworkRegistry.TargetPoint(dimension, x, y, z, range)); } public static final void sendToAllAround(IMessage message, EntityPlayer player, double range) { PacketDispatcher.sendToAllAround(message, player.worldObj.provider.dimensionId, player.posX, player.posY, player.posZ, range); } public static final void sendToDimension(IMessage message, int dimensionId) { PacketDispatcher.dispatcher.sendToDimension(message, dimensionId); } public static final void sendToServer(IMessage message) { PacketDispatcher.dispatcher.sendToServer(message); } }
-
"it was so difficult?" I suppose ... YES ahahahahaah so funny ... anyway thanks
-
YES, indeed I said "specific sample" aka tutorial. unfortunately looking on google I have not found anything about it...
-
oh thanks, but I'm sorry, I mean you have the specific sample regarding the "FoodStat"? After I'll study ALL oracle libriries I swaer....
-
Reflection? have you a sample?