
shieldbug1
Forge Modder-
Posts
404 -
Joined
-
Last visited
Everything posted by shieldbug1
-
Collections.unmodifiableList or ImmutableList.copyOf?
-
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.
-
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.
-
Server crashing "missingModsException" But client works fine
shieldbug1 replied to Ultor's topic in Support & Bug Reports
The fml log should tell you which mod is missing. -
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?
-
It looks like a problem with EnderStorage from the stacktrace. Try removing it and see if that helps.
-
[1.7.10] Tooltip text with "hold" shift like TiC tooltip
shieldbug1 replied to zedblade's topic in Modder Support
-
[1.7.10] Tooltip text with "hold" shift like TiC tooltip
shieldbug1 replied to zedblade's topic in Modder Support
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. -
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.
-
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.
-
If you want to change the tooltip of a vanilla item, you can use the ItemTooltipEvent .
-
Alright, thanks. C:
-
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?
-
EntityList.getEntityID(Entity) looks promising.
-
Update your minecraft and forge.
-
Update Minecraft to 1.7.10 and Forge to the latest version. Next time, please look for a solution in the EAQ before posting.
-
so....uh...gotta happen on the gf, right?
shieldbug1 replied to throttlex1's topic in Support & Bug Reports
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 -
so....uh...gotta happen on the gf, right?
shieldbug1 replied to throttlex1's topic in Support & Bug Reports
Update minecraft and forge. -
(solved)Game Crash When Crafting Added Items Eclipse (Forge 1.7.10)
shieldbug1 replied to DarkZ55's topic in Modder Support
All your crafting has to happen during the INITIALIZATION stage. -
Take a look at EntityLivingBase#rayTrace(double, float). Note that this is only on the client.
-
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.
-
Can't get minecraft to launch
shieldbug1 replied to Michaeljmccormic's topic in Support & Bug Reports
Post logs.