coolboy4531
Members-
Posts
584 -
Joined
-
Last visited
Everything posted by coolboy4531
-
Creating an item, that has the function of a shield?
coolboy4531 replied to MikeZ's topic in Modder Support
player.getCurrentEquippedItem() -
[1.7.2] Making a Custom Rendered Block Flammable
coolboy4531 replied to Thornack's topic in Modder Support
Learn java. You need to declare those fields and things like that. You can override that method in your Block class. -
Creating an item, that has the function of a shield?
coolboy4531 replied to MikeZ's topic in Modder Support
Check if the player is holding the shield, then use LivingHurtEvent to lower damage taken. -
Potion Effect on Armor with custom enchantment
coolboy4531 replied to yanksrock1019's topic in Modder Support
Did you register the event class? -
Don't know the cause, but I usually put my events in PreInit (see if that makes a difference - in fact, I never use Init, only PreInit for everything). Another thing: - Try adding System.out.println methods around that event and see if it's actually being called. It could be side issues. EDIT: I think I may have found your issue. HarvestDropsEvent is only called when an item is "dropped" from your block (in this case: saplings or apples). Since leaves only drop those items in a low chance, it will only drop your item (which is a stick) if it drops a sapling or apple of itself. To fix this issue you should not use HarvestDropsEvent and use BreakEvent, I think you can figure which "BreakEvent" to use. (lazy: BlockEvent.BreakEvent)
-
Two things. You haven't even set a texture location (path) for your item, no wonder it shows a missing texture. If I remember you need to bind/set both models and textures to "that" specific item. Take a look at this. Although it's outdated, I bet you can find a way to work around the methods and things. c:
-
[1.7.2] Custom Furnace freezes my game!
coolboy4531 replied to CraigTheMailman's topic in Modder Support
One thing to note. Don't register or create blocks/items during class construction <clinit>. You need to do them like you did with your creative tab. Example: public static Block block; @EventHandler public void preInit(PreInitializationEvent event) { block = new TutorialBlock().setUnlocalizedName("tutBlock"); } //Note: This is an "example."\\ -
I think that this is null. (thrown by NullPointerException) ItemStack itemstack = Periodicsystem.getSmeltingResult(slots[0].getItem(), slots[1].getItem(),slots[2].getItem(),slots[2].getItem(),slots[3].getItem(),slots[4].getItem()); You have created the ItemStack[] "slots" but who knows what that .getItem() can be, you've never arranged it.
-
You shouldn't use programs (generators) to get code. You need to do it manually. Loops are statements that you call that sets a value until it is stopped by an integer you set. Example: for (int i = 0; i < 30; i++) { world.setBlock(x + i, y, z); } //It adds world.setBlock (however many times you put as that integer, in this case 30).
-
Check whether the mouse is hovering over your item, then display a special GUI. Look at Item#addInformation for resources and help.
-
[1.7.x] How to add custom Drops to vanilla mobs
coolboy4531 replied to SuperHB's topic in Modder Support
Give me what you have right now, and let me see if you "actually" did what we wanted c: Thanks. -
[1.7.x] How to add custom Drops to vanilla mobs
coolboy4531 replied to SuperHB's topic in Modder Support
For the last time bro. You need to register your event class not the frickin' event itself. You don't know what a handler is - let's just say the class that has the event. Read my last post please. -
[SOLVED] [1.7.2]Forge fails to initialize the game
coolboy4531 replied to Chocolate_with's topic in Modder Support
If you're using 1.7.2, you shouldn't be creating blocks/items during class construction and all your registration and things go into PreInit. -
[1.7.x] How to add custom Drops to vanilla mobs
coolboy4531 replied to SuperHB's topic in Modder Support
Yeah that was my fault. Sorry! I didn't realize your class name was LivingDropEvent, lol I mis-read it. -
[1.7.x] How to add custom Drops to vanilla mobs
coolboy4531 replied to SuperHB's topic in Modder Support
You need to "register" that class in your main class. Don't know how? Okay. Let me show you. Do you have a main class? (with the PreInit stuff) If you do, then in that place use the MinecraftForge eventbus. Example: //Note that this is an example and that you should only use the registration method I put in preInit. public void preInit(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new YourEventClass()); //in your case would be LivingDropsEvent } Hey, btw. Aren't you from PMC? lol. I think I may know you. -
Try taking a look at EntityZombie itself, see how it picks villagers or players to attack. c:
-
[1.7.x] How to add custom Drops to vanilla mobs
coolboy4531 replied to SuperHB's topic in Modder Support
Did you register that event in your main class? Remember you need to test it on a cow because you are doing it that way. I suggest you do exactly what coolAlias suggested as it will make your class less messy and easier to read. -
[1.7.x] How to add custom Drops to vanilla mobs
coolboy4531 replied to SuperHB's topic in Modder Support
Where is your @SubscribeEvent?