-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
Shapeless Recipes Not Working How I Thought They Would...
Animefan8888 replied to LKloosterman's topic in Modder Support
I add the Recipes in my ModRecipes Class: package com.currencymod.init; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModRecipes { public static void registerRecipes() { addCraftingRecipes(); } private static void addCraftingRecipes() { //Shapeless recipes GameRegistry.addShapelessRecipe(new ItemStack(ModItems.copper_coin, 5), ModItems.silver_coin); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.silver_coin, 1), new ItemStack(ModItems.copper_coin, 5)); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.silver_coin , 5), ModItems.gold_coin); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.gold_coin), new ItemStack(ModItems.silver_coin, 5)); } } And I initialize the items in my ModItems class: package com.currencymod.init; import com.currencymod.item.ItemCurrency; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModItems { //Items public static ItemCurrency copper_coin; public static ItemCurrency silver_coin; public static ItemCurrency gold_coin; static { copper_coin = registerItem(new ItemCurrency("copper_coin")); silver_coin = registerItem(new ItemCurrency("silver_coin")); gold_coin = registerItem(new ItemCurrency("gold_coin")); } private static <T extends Item> T registerItem(T item) { GameRegistry.register(item); return item; } } And here's my Main class, although I don't think it'll be too helpful: package com.currencymod.main; import com.currencymod.proxy.CommonProxy; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = Main.MOD_ID, name = Main.MOD_NAME, version = Main.MOD_VERSION) public class Main { public static final String MOD_ID = "currencymod"; public static final String MOD_NAME = "Lars's Currency Mod"; public static final String MOD_VERSION = "1.0.0"; @SidedProxy(clientSide = "com.currencymod.proxy.ClientProxy", serverSide = "com.currencymod.proxy.ServerProxy") public static CommonProxy proxy; @Instance(MOD_ID) public static Main instance; @EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.preInit(event); } @EventHandler public void init(FMLInitializationEvent event) { proxy.init(event); } @EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); } } Ah the reason it doesn't work is because you already added a recipe that is bound to the Item silver_coin. And it will not override that. Which is why you need to do it the way I mentioned earlier. -
Shapeless Recipes Not Working How I Thought They Would...
Animefan8888 replied to LKloosterman's topic in Modder Support
Sure, Which class? Where you add the recipes and initialize the Items aka your main mod class. -
Shapeless Recipes Not Working How I Thought They Would...
Animefan8888 replied to LKloosterman's topic in Modder Support
Yessir. That's why I'm confused When I take away GameRegistry.addShapelessRecipe(new ItemStack(ModItems.copper_coin, 5), ModItems.silver_coin); The Silver Coins do the exact same thing as the Copper Could you post the whole class for me? -
[1.10] Adding a new entity to the game
Animefan8888 replied to TrekkieCub314's topic in Modder Support
Create an AI and make the Entity move towards the BlockPos, or hardcode it into the Entity. -
Shapeless Recipes Not Working How I Thought They Would...
Animefan8888 replied to LKloosterman's topic in Modder Support
The Silver Coins work as I expected, when I add one it outputs a Copper Coin, same for if I put in 2, 3, and 4 in a stack, and then when I add a fifth to the stack and put it in the crafting table, the stack of 5 Silver Coins outputs one Gold Coin. It's just the Copper Coin that isn't working. So what you are saying is that you put a stack of 5 silver coins into the crafting slots and it outputs 1 gold coin and takes all 5 silver coins? But it doesn't for copper? -
Shapeless Recipes Not Working How I Thought They Would...
Animefan8888 replied to LKloosterman's topic in Modder Support
I tried that but what happens is the 5 coins then need to be spread out in the crafting area, instead of being able to be used in a stack of 5. This way, it can be used in the player's inventory. Like I said the Crafting System doesn't work that way. If you notice all vanilla recipes are in stacks of 1. If you want it to be done that way, you will need to make your own crafting. And override the vanilla one, meaning you need to override the players inventory or edit it in some way. What? What works? -
Shapeless Recipes Not Working How I Thought They Would...
Animefan8888 replied to LKloosterman's topic in Modder Support
Recipes input do not care about stacksize it assumes it was 1. So you need to add ModItems.silvercoin 5 times in an Object[] (I think). -
[1.10.2] Dude, I Went To Make A Block....
Animefan8888 replied to gurujive's topic in Modder Support
Extend BlockBreakable and pass false in as the second parameter. That might work, just looking at Glass code... -
[1.10.2] Dude, I Went To Make A Block....
Animefan8888 replied to gurujive's topic in Modder Support
So what is the question exactly? Why is there a lot of deprecated stuff in the Block class? Either you are not supposed to call it IE getActualBlockState(...) or it will be removed and "replaced" in the next update. -
TileEntities do not have a BlockPos when they are initialized. Only once they are read from NBT do they have one.
-
[1.10.2][GUI][Containers]I don't know how to do GUI
Animefan8888 replied to Starless's topic in Modder Support
Have every other slot that is not a SlotFake be a custom slot that overrides onSlotChanged and check if par2's stackSize is <= 0 if so set this slots ItemStack = null. (This may work I am not sure when this method is called. Be sure to check what happens when you click on a slot with another ItemStack in it). -
[1.10] Adding a new entity to the game
Animefan8888 replied to TrekkieCub314's topic in Modder Support
I myself have not found any tutorials for 1.10 You register it in a similar way you do in earlier versions the register for the Render is different though. Instrad you need to use a IRenderFactory. -
[1.10.2][GUI][Containers]I don't know how to do GUI
Animefan8888 replied to Starless's topic in Modder Support
Instead return null. -
[1.10.2] Ore dropping itself, not the item intended
Animefan8888 replied to boredherobrine13's topic in Modder Support
Wrong parameters (IBlockState state, Random rand, int fortune) -
I need alot of help and dont understand java
Animefan8888 replied to Outdoorstew78's topic in Modder Support
There are many tutorials out there for setting up JDK. And there is already a documentation for setting up forge. http://www.minecraftforge.net/forum/index.php?topic=14048.0 -
[1.10.2] Deleting an ItemStack from Item#onUpdate/tick counting
Animefan8888 replied to Roboguy99's topic in Modder Support
I have no Idea why they haven't changed it from Entity to at least EntityLivingBase... -
[1.10.2] Deleting an ItemStack from Item#onUpdate/tick counting
Animefan8888 replied to Roboguy99's topic in Modder Support
Hmmm I wonder public void onUpdate(ItemStack stack, World world, "Entity entity", int par4, boolean par5) Ah! I forgot casting existed. I assumed that was related to the actual item rather than the player. Thanks. -- I know it may seem stupid to you, and I fully understand why you get annoyed, but perhaps a little less of the sarcasm please? People have to start somewhere... Ok I am sorry for the sarcasm, but just for future reference read the JavaDoc's above the method/field. /** * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and * update it's contents. */ -
[1.10.2][GUI][Containers]I don't know how to do GUI
Animefan8888 replied to Starless's topic in Modder Support
Container.slotClick was what I meant to say. The method is too long and it has too many conditionals. I want to know the method's contract, meaning, what arguments the method expects and what are the results the caller can expect from the method: if the arguments set is A, invoking the method will have R as return and will cause S as a set of side effects. If anyone could tell me what is Container.slotClick contract I would really appreciate it. It is obviously called when a slot in the container is clicked. It expects the return to be an ItemStack. Correct me if I am wrong but I believe the returned stack is the Stack that is bound to the mouse? ClickType.CLONE is used for creative mode when you middle click a slot it returns a new ItemStack of the Item but with the stacksize of 64(or the max stacksize). Drag mode is if the player is binding it to the mouse or not(again subject to correction). ClickType.QUICK_CRAFT is clicking and dragging the item through slots. Any more questions do ask. -
[1.10.2] Deleting an ItemStack from Item#onUpdate/tick counting
Animefan8888 replied to Roboguy99's topic in Modder Support
Hmmm I wonder public void onUpdate(ItemStack stack, World world, "Entity entity", int par4, boolean par5) -
Thanks I didn't see that... I thnk it is as simple as getting a player variable and using player.sendChatMessage("/somecommand");
-
Do you mean how to grab the strings from args?
-
player.addChatMessage(...). But of course you would need to grab all of the strings from args to do this.
-
If I understand correctly yes you do need to register a recipe for each ingot.
-
[Solved][1.9.4] Updating my custom walls from 1.8 to 1.9.4
Animefan8888 replied to Erfurt's topic in Modder Support
Post your updated BaseBlockWall and EadoreBlockWall. I all did was to change from public boolean canPlaceTorchOnTop(IBlockAccess world, BlockPos pos) { return true; } to @Override public boolean canPlaceTorchOnTop(IBlockState state, IBlockAccess world, BlockPos pos) { return true; } I have otherwise, tried all of your suggestions, regarding the walls not connecting to each other, but without any success, and that was when I noticed that the canConnectTo method inside BlockWall had been changed from public to private, and I don't know if that's why my code from 1.8 doesn't work in 1.9.4, as I mentioned in my original post, I had everything working in 1.8. I would prefer to look at the whole class(es) but I think this is your problem. (((block != this && !(block instanceof BlockFenceGate) && !(block instanceof BlockWall))) // Instead use (!(block instanceof BlockWall) || !(block instanceof BlockFenceGate)) -
[1.10.2][GUI][Containers]I don't know how to do GUI
Animefan8888 replied to Starless's topic in Modder Support
Look at Container#slotaclick(...) if you understand that code it will lead you to what they mean exactly. If you have some check you need to do like for a backpack. You shouldnt be able to pickup the backpack in the backpacks inventory, to do that you would just check which slotIndex you are clicking and if it is return null otherwise return super.