
gmod622
Members-
Posts
214 -
Joined
-
Last visited
Everything posted by gmod622
-
Creating a crafting handler the exports multiple items
gmod622 replied to gmod622's topic in Modder Support
Okay, so now the 'getMultResult', how would I set this up? I get the basic idea, but dont know exactly what to return: @Nullable public ItemStack getMultiResult(ItemStack stack) { for (Entry<ItemStack, List<OutputWrapper>> entry : this.smeltmulti.entrySet()) { if (this.compareItemStacks(stack, (ItemStack)entry.getKey())) { return } } return null; } -
Creating a crafting handler the exports multiple items
gmod622 replied to gmod622's topic in Modder Support
Oh I see, didnt realize the 'result part' mb And my wrapper looks like this now.. I have no clue if this is right: public class OutputWrapper { public final float chance; public final ItemStack item; public OutputWrapper(float c, ItemStack i) { chance = c; item = i; } @Override public int hashCode() { return item.hashCode(); } @Override public boolean equals(Object o) { if(o instanceof OutputWrapper) { OutputWrapper other = (OutputWrapper)o; return other.item == this.item && (other.item == this.item); } return false; } } -
Creating a crafting handler the exports multiple items
gmod622 replied to gmod622's topic in Modder Support
Okay, So I'm a bit stuck on equals function, I dont know what to compare it to eachother, meta data doesnt seem to work. How would I make my furnace pull my hashmap? -
Creating a crafting handler the exports multiple items
gmod622 replied to gmod622's topic in Modder Support
Okay, now I got it down, however the Item won't smelt. And yes this is applying to the correct tile Anyways, here is the registration: List<OutputWrapper> list = new ArrayList<OutputWrapper>(); list.add(new OutputWrapper(1.0F, new ItemStack (Blocks.STONE))); list.add(new OutputWrapper(0.05F, new ItemStack(ModItems.AtPAP2))); list.add(new OutputWrapper(0.025F, new ItemStack(Blocks.IRON_ORE))); list.add(new OutputWrapper(0.2F, new ItemStack(Items.GOLD_NUGGET))); this.addMultiSmeltingRecipe(new ItemStack(Blocks.COBBLESTONE), list); and here is the function: public void addMultiSmeltingRecipe(ItemStack input, List<OutputWrapper> stack) { this.smeltmulti.put(input, stack); } Do I have to register this crafting handler? I have it set in my Block class. P.S: Thanks so much for your time, you're really helping me out, which is sometimes hard to get in the modding community. Thanks. -
Creating a crafting handler the exports multiple items
gmod622 replied to gmod622's topic in Modder Support
Okay, Would I create a new function within the handler, so something like this?: public void addMultiSmeltingRecipe(ItemStack input, List<OutputWrapper> stack) { this.smeltmulti.put(input, stack); } so to create a recipe it would be: this.addSmeltingMulti(Items.BONE, //No clue what goes here , //0.0 - 1.0); -
Just did it and removed my textures when placed... And yeah, it just out puts 'plentifulmisc:name'... This is making me upset because I CANNOT figure this out.
-
Creating a crafting handler the exports multiple items
gmod622 replied to gmod622's topic in Modder Support
So how would I lay out this 'wrapper' class.. I cant seem to find your blockwrapper class for reference. This is what I have now: private Map<ItemWrapper, Tuple<ItemStack, List<ItemStack>>> smeltmulti = new HashMap(); -
Creating a crafting handler the exports multiple items
gmod622 replied to gmod622's topic in Modder Support
So the outputs should be stored as ItemStacks put into an array? This is my attempt at the hashmap: private final Map<ItemStack, Array> multiOutput = Maps.<ItemStack, Array>newHashMap(); Now my problem is setting this array to itemstacks. -
Creating a crafting handler the exports multiple items
gmod622 replied to gmod622's topic in Modder Support
Would you know how I would add the regular furnace recipes AND the ones that im creating? Nevermind, actual dumb question. I'll just do it manually -
Hey all! So I have this custom block 'chemist lab' that has one input and multiple exports. Now how would I setup a crafting handler that could support something like this. And possible 'random chance' functionality Thanks for Reading!
-
No I am, but I know other mods use RF as an energy source on 1.10. So how would I implement the API, I know for the most part how to integrate it, just not how to implement it.
-
[SOLVED]Game Crashes When Hovering a Custom Block Recipe
gmod622 replied to gmod622's topic in Modder Support
How would I get it to render for the recipe? -
Hey all! So I have a custom container here, and when I finish the last item that is required, the game crashes with the following error: Here is the registration for it: GameRegistry.addRecipe(new ItemStack(ModBlocks.CRATE), " R ", " Q ", " R ", 'Q', Blocks.LOG, 'R', Items.STICK); Maybe there is a different function for block crafting?
-
Hey there! So I want my mod to be compatible with mods such as thermal expansion, or just RF in general. How would I get started in implementing the mod to create an addon for it.
-
Okay so I made a new block that DOES NOT extend my BaseBlock, and the textures loaded, so im guessing its something to do with it.. Can someone proof this?
-
Okay, look back at the crafting table and found this: this.addSlotToContainer(new Slot(tileEntityInventoryBasic, x + y * 3, TILE_INVENTORY_XPOS + x * 18,TILE_INVENTORY_YPOS + y * 18)); This seems to work, can somebody explain?
-
yeah, it gets me the 9 slots that I want. I dont see any other way i could do that.
-
Still doesn't seem to do anything.
-
Hey all! So while making a crate, that displays a 3x3 grid, I get this error. I already tried messing with it and still haven't found a fix, here is the class: Here is where its crashing: for (int y = 0; y < TE_INVENTORY_SLOT_COUNT_ROW; y++) { for (int x = 0; x < TE_INVENTORY_SLOT_COUNT_COLUMN; x++) { int slotNumber = TE_INVENTORY_SLOT_COUNT + y * TE_INVENTORY_SLOT_COUNT_COLUMN + x; int xpos = TILE_INVENTORY_XPOS + x * SLOT_X_SPACING; int ypos = TILE_INVENTORY_YPOS + y * SLOT_Y_SPACING; addSlotToContainer(new Slot(tileEntityInventoryBasic, slotNumber, TILE_INVENTORY_XPOS + SLOT_X_SPACING * x, TILE_INVENTORY_YPOS)); } } } Thanks!
-
Something like this didn't work.. { "parent": "item/generated" }
-
Hey all! So i'm having an issue where my blocks won't display in hand but on the ground. I guessing its something to do with my .json(s). The console is not outputting any errors. Blockstate: { "variants": { "normal": { "model": "plentifulmisc:xianite" } } } Model/Item: { "parent": "plentifulmisc:block/xianite", "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], "translation": [ 0, 1.5, -2.75 ], "scale": [ 0.375, 0.375, 0.375 ] } } } lastly Model/Block: { "parent": "block/cube_all", "textures": { "all": "plentifulmisc:blocks/xianite" } }
-
That seemed to work, will note for the future! Thanks!
-
Hey all! So I'm making a crate as a test to create a tileentity/container: So starting it, I get this crash: This is where its crashing in my ClientProxy: @SideOnly(Side.CLIENT) public void crateRegistration() { ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation("plentifulmisc:crate", "inventory"); final int DEFAULT_ITEM_SUBTYPE = 0; ModelLoader.setCustomModelResourceLocation(CommonProxy.itemBlockInventoryBasic, DEFAULT_ITEM_SUBTYPE, itemModelResourceLocation); //HERE } Here is my the rest of my ClientProxy: Here is my CommonProxy: My main: My GUI / GUI Handler / GUI Register Tile Entity: Container lastly my block file Lastly my registration (modblocks):
-
Hey all! So there is an issue with my blocks, the texture isnt shown in hand. here is its json file: { "forge_marker": 1, "defaults": { "textures": { "all": "plentifulmisc:blocks/plentifulmiscxianite" } }, "variants": { "normal": { "model": "cube_all" }, "inventory": { "model": "cube_all" } } } and the class itself: package com.lambda.PlentifulMisc.block; import com.lambda.PlentifulMisc.item.IItemModelProvider; import com.lambda.PlentifulMisc.main.PlentifulMisc; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; public class BlockXianiteOre extends BlockBase { protected BlockXianiteOre() { super("plentifulmiscxianite", Material.ROCK); } } Modblocks: