Jump to content

shieldbug1

Forge Modder
  • Posts

    404
  • Joined

  • Last visited

Everything posted by shieldbug1

  1. Collections.unmodifiableList or ImmutableList.copyOf?
  2. This should probably be on the Support and Bug Reports board, this board is for help with modding not with the use of mods. Apart from that, what do you mean "not working"? Is it crashing? Does it not load? Is the mod simply not recognised? Post logs.
  3. What should this request contain? Would it just be changing the visibility of those methods, or would it have to be something more complex? I have some spare time right now, I can go give it a try.
  4. The fml log should tell you which mod is missing.
  5. This is a rather simple question. How would I send an update to all clients tracking (or clients 'associated' with) a TileEntity? I know that with entities I can use public static void sendToAllTracking(SimpleNetworkWrapper wrapper, Entity entity, IMessage message) { if(entity.worldObj instanceof WorldServer) { ((WorldServer)entity.worldObj).getEntityTracker().func_151247_a(entity, wrapper.getPacketFrom(message)); } } However, browsing through Vanilla code for TileEntities all I've found that would work is this: public static void sendToAllTracking(SimpleNetworkWrapper wrapper, TileEntity tileEntity, IMessage message) { if(entity.worldObj instanceof WorldServer) { ((WorldServer)entity.worldObj).getPlayerManager().getOrCreateChunkWatcher(tileEntity.xCoord, tileEntity.zCoord, false).sendToAllPlayersWatchingChunk(wrapper.getPacketFrom(message)); } } However, those methods are private (and PlayerInstance is package private anyway), an reflection shouldn't be used for something as trivial as this. Of course, I could just use SimpleNetworkWrapper#sendToAllAround(IMessage,TargetPoint) with a radius of 15 or 16 (and that's what I've been doing so far), but I would like to know if there is a 'proper' way to do this?
  6. It looks like a problem with EnderStorage from the stacktrace. Try removing it and see if that helps.
  7. If you want to do this override addInformation in your item(and block?). I think it's a client only method, so you should be fine use Keyboard.isKeyDown(int) to check for LSHIFT, RSHIFT, LCONTROL and RCONTORL. If you want to do this for vanilla items, you need to create an event handler to listen for the ItemTooltipEvent.
  8. I usually sort null -> item id -> metadata -> quantity -> having nbt -> nbt equals You can sort by anything else afterwards. It just takes a bit of thinking, it isn't too bad.
  9. If you really need to compare ItemStacks just create a Comparator<ItemStack> with whatever you need to be sorting by. Use this in a TreeMap rather than a HashMap.
  10. If you want to change the tooltip of a vanilla item, you can use the ItemTooltipEvent .
  11. Alright, thanks. C:
  12. I have never used asm before, but I do understand bytecode enough to use it. I'm just wondering about efficiency - when adding instructions to methods, is it better to add all the instructions you need, or to just add a few instructions to invoke a static method written in java? Obviously the latter is simpler, and easier to read too - but in methods that get called a lot like World#setTileEntity which would be more efficient/optimised, and would it matter on the amount of bytecode instructions I'm adding?
  13. EntityList.getEntityID(Entity) looks promising.
  14. Post the full log. And also, it says what colour is the dust, not what it is.
  15. Update your minecraft and forge.
  16. Update Minecraft to 1.7.10 and Forge to the latest version. Next time, please look for a solution in the EAQ before posting.
  17. I think you can use LexManos's JarFixer mod, but really you should be updating to Minecraft 1.7.10 and the latest Forge version. There is no more support for 1.6.4
  18. Update minecraft and forge.
  19. All your crafting has to happen during the INITIALIZATION stage.
  20. Take a look at EntityLivingBase#rayTrace(double, float). Note that this is only on the client.
  21. The first function in IGrowable is canGrow, so return true if you want bonemeal to work. The next one, is shouldGrow, this is where you check the chance of bonemeal working, etc. So you can return something like random.nextFloat() > 0.5F for example for a 50% chance of it growing every bonemeal use. The void method is doGrow, and is where you actually grow your plant.
×
×
  • Create New...

Important Information

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