
Anon10W1z
Forge Modder-
Posts
311 -
Joined
-
Last visited
Everything posted by Anon10W1z
-
Just wondering, why not?
-
What's the most efficient way to use event handlers?
Anon10W1z replied to Bedrock_Miner's topic in Modder Support
If you use comments and JavaDoc it will look much nicer. -
I found this code: @SubscribeEvent public void onEntityUpdate(LivingUpdateEvent event) throws InterruptedException { } But I need to get the current player that is grabbing it ... It would be perfect if i can set a "grabber-id" variable on the entity with which to obtain the player.. or How can i do it? First off, remove that throws declaration, Second, look up data watchers.
-
What's the most efficient way to use event handlers?
Anon10W1z replied to Bedrock_Miner's topic in Modder Support
I take it one step further and make my event handler final. Then I store the singleton instance of the event handler in itself. -
Try again.
-
[1.8] Get ahold of working (pre-obf) minecraft+forge.jar
Anon10W1z replied to Ernio's topic in Modder Support
Why, may I ask? -
Yes.
-
It's good that you have put in effort to learn, and the desire is there. However, for server-side modding, Bukkit plugin development is what you want to look into, not Forge modding. Look up kennethbgoodin Bukkit tutorials on YouTube. They're great for beginners.
-
http://www.minecraftforge.net/forum/index.php/topic,26403.0.html
-
That was added in 1.8. EDIT: 1.7.10.
-
Did you register the inventory block renderer?
-
[1.7.10] Problem with detecting armor and setting walk speed.
Anon10W1z replied to Alex_Richard's topic in Modder Support
The hell? Don't use reflection. Use player.capabilities... -
Creating a 'commandblock' that only runs one predetermined command
Anon10W1z replied to Brickfix's topic in Modder Support
EDIT: Ok this is getting really weird: Apparently my code works 100% correctly. The only problem is that on loading a world where the block is already placed, nothing happens. If I set a new block, it works without any problem. Really strange. Ah, this is because if you add a tile entity to your block, then blocks placed before the tile entity was added will not have the tile entity. Tile entities are only added when the block is placed. -
Creating a 'commandblock' that only runs one predetermined command
Anon10W1z replied to Brickfix's topic in Modder Support
MinecraftServer.getServer().getCommandManager().executeCommand(player, command); Runs a command. Set your block to tick randomly and override the on random tick method. -
[SOLVED]Block/Item Names with a Color in 1.8?
Anon10W1z replied to xInsidion's topic in Modder Support
Look at the Minecraft wiki for color codes. Use them in your language file. -
No problem
-
1.8 uses block states now.
-
[1.7.10] Problem with custom recipe (not all the time)
Anon10W1z replied to McJty's topic in Modder Support
We need the crash report. -
[1.8] Error on block rendering - can't convert back into data
Anon10W1z replied to RoseCotton's topic in Modder Support
This is an error with your block...make sure you override getMetaFromState as well as getStateFromMeta -
[1.7.10] On block break with item; transform item
Anon10W1z replied to jordsta95's topic in Modder Support
Alright then. public class YourEventHandler { @SubscribeEvent public void onBlockBreak(BlockEvent.BreakEvent event) { //do stuff } } And in your init method in the main mod file, put MinecraftForge.EVENT_BUS.register(new YourEventHandler()); -
[1.7.10] On block break with item; transform item
Anon10W1z replied to jordsta95's topic in Modder Support
Use the BlockEvent.BreakEvent. -
I see you used diesieben07's tutorial. Read the replies, you'll find the SRG names. Add them to the lines following like so: private static final Field eventHandlerField = ReflectionHelper.findField(InventoryCrafting.class, "eventHandler", "srgEventHandlerNameGoesHere"); private static final Field containerPlayerPlayerField = ReflectionHelper.findField(ContainerPlayer.class, "thePlayer", "sameForThePlayer"); private static final Field slotCraftingPlayerField = ReflectionHelper.findField(SlotCrafting.class, "thePlayer", andSoOn);