Jump to content

[1.7.2][Solved] Mod loading problem after quit to title -> creating new world


Zzyxz

Recommended Posts

Hello again,

 

i recognized a strange problem, which is present in every mod i created! (i'm using Forge 10.12.0.1046)

 

So what happens:

If i create a very simple mod, like 1 item without textures and stuff. One simple useless item. (Adding the item is done, in preinit.)

Now i start minecraft. I create a new world. The item present! *cheer* BUT! I don't like the world, so im going to create a new one!

So i create a new world again! What happens now? Yes, the item is gone!

Now i thought -- its gone from creative tab, lets do a crafting recipe!!

 

The Recipe is working! The item is shown at the slot, but if i take the item:

 

---- Minecraft Crash Report ----
// Ooh. Shiny.

Time: 16.03.14 23:08
Description: Updating screen events

java.lang.ArrayIndexOutOfBoundsException: -1
at net.minecraft.item.ItemStack.onCrafting(ItemStack.java:473)
at net.minecraft.inventory.SlotCrafting.onCrafting(SlotCrafting.java:76)
at net.minecraft.inventory.SlotCrafting.onCrafting(SlotCrafting.java:68)
at net.minecraft.inventory.Slot.onSlotChange(Slot.java:63)
at net.minecraft.inventory.ContainerWorkbench.transferStackInSlot(ContainerWorkbench.java:111)
at net.minecraft.inventory.Container.slotClick(Container.java:285)
at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:500)
at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:691)
at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:434)
at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:353)
at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:317)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1730)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039)
at net.minecraft.client.Minecraft.run(Minecraft.java:954)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at net.minecraft.item.ItemStack.onCrafting(ItemStack.java:473)
at net.minecraft.inventory.SlotCrafting.onCrafting(SlotCrafting.java:76)
at net.minecraft.inventory.SlotCrafting.onCrafting(SlotCrafting.java:68)
at net.minecraft.inventory.Slot.onSlotChange(Slot.java:63)
at net.minecraft.inventory.ContainerWorkbench.transferStackInSlot(ContainerWorkbench.java:111)
at net.minecraft.inventory.Container.slotClick(Container.java:285)
at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:500)
at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:691)
at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:434)
at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:353)
at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:317)

-- Affected screen --
Details:
Screen name: net.minecraft.client.gui.inventory.GuiCrafting

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Zzyxzz'/913, l='MpServer', x=-77,50, y=78,62, z=252,50]]
Chunk stats: MultiplayerChunkCache: 225, 225
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options: 
Level spawn location: World: (-68,64,256), Chunk: (at 12,4,0 in -5,16; contains blocks -80,0,256 to -65,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Level time: 426 game time, 426 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 128 total; [EntitySkeleton['Skeleton'/2196, l='MpServer', x=-70,50, y=23,00, z=282,50], EntityCreeper['Creeper'/1121, l='MpServer', x=-106,50, y=30,00, z=282,50], EntitySpider['Spider'/1147, l='MpServer', x=0,50, y=16,00, z=295,78], EntitySkeleton['Skeleton'/2270, l='MpServer', x=-101,50, y=28,00, z=313,50], EntitySkeleton['Skeleton'/1049, l='MpServer', x=-135,50, y=40,00, z=205,94], EntitySkeleton['Skeleton'/1051, l='MpServer', x=-137,97, y=45,00, z=209,69], EntitySkeleton['Skeleton'/1050, l='MpServer', x=-139,06, y=45,00, z=209,44], EntitySkeleton['Skeleton'/1055, l='MpServer', x=-28,50, y=24,00, z=327,50], EntityCreeper['Creeper'/1045, l='MpServer', x=-22,50, y=26,00, z=314,50], EntityCreeper['Creeper'/1044, l='MpServer', x=-23,50, y=26,00, z=315,50], EntitySkeleton['Skeleton'/1047, l='MpServer', x=-20,50, y=26,00, z=312,50], EntitySkeleton['Skeleton'/1046, l='MpServer', x=-22,50, y=26,00, z=315,50], EntityCreeper['Creeper'/1064, l='MpServer', x=-95,50, y=28,00, z=317,50], EntityCreeper['Creeper'/1065, l='MpServer', x=-91,53, y=31,00, z=309,00], EntityWitch['Witch'/1062, l='MpServer', x=-106,50, y=28,00, z=312,50], EntityWitch['Witch'/1063, l='MpServer', x=-105,50, y=28,00, z=313,50], EntityWitch['Witch'/1061, l='MpServer', x=-106,50, y=28,00, z=314,50], EntityBat['Bat'/1078, l='MpServer', x=-140,75, y=48,51, z=297,75], EntityZombie['Zombie'/2273, l='MpServer', x=-105,50, y=28,00, z=312,50], EntityZombie['Zombie'/2272, l='MpServer', x=-104,50, y=28,00, z=312,50], EntityBat['Bat'/1241, l='MpServer', x=-145,77, y=31,90, z=318,68], EntityBat['Bat'/4498, l='MpServer', x=-155,44, y=31,13, z=231,53], EntityZombie['Zombie'/1258, l='MpServer', x=-120,66, y=50,00, z=205,34], EntityCreeper['Creeper'/1257, l='MpServer', x=-17,53, y=16,00, z=284,34], EntityCreeper['Creeper'/2090, l='MpServer', x=-18,50, y=28,00, z=268,50], EntitySkeleton['Skeleton'/2094, l='MpServer', x=-76,50, y=35,00, z=332,50], EntitySkeleton['Skeleton'/2093, l='MpServer', x=-75,50, y=35,00, z=332,50], EntitySkeleton['Skeleton'/2140, l='MpServer', x=-12,50, y=21,00, z=323,50], EntitySkeleton['Skeleton'/2143, l='MpServer', x=-134,50, y=18,00, z=285,50], EntityZombie['Zombie'/2115, l='MpServer', x=-142,50, y=45,00, z=308,50], EntityBat['Bat'/1193, l='MpServer', x=-107,53, y=49,60, z=322,75], EntitySkeleton['Skeleton'/2144, l='MpServer', x=-135,50, y=18,00, z=283,50], EntityCreeper['Creeper'/2446, l='MpServer', x=-100,50, y=26,00, z=307,06], EntityCreeper['Creeper'/2445, l='MpServer', x=-93,50, y=33,00, z=302,50], EntityBat['Bat'/3575, l='MpServer', x=-76,55, y=30,09, z=324,57], EntityZombie['Zombie'/1474, l='MpServer', x=-8,22, y=20,00, z=292,53], EntityZombie['Zombie'/1473, l='MpServer', x=-6,66, y=20,00, z=294,34], EntityZombie['Zombie'/1472, l='MpServer', x=-6,19, y=20,00, z=292,81], EntityCreeper['Creeper'/2357, l='MpServer', x=-100,50, y=50,00, z=323,50], EntityZombie['Zombie'/2385, l='MpServer', x=-104,78, y=37,00, z=322,41], EntityZombie['Zombie'/1466, l='MpServer', x=-7,72, y=20,00, z=291,09], EntityZombie['Zombie'/1467, l='MpServer', x=-3,50, y=20,00, z=300,50], EntityZombie['Zombie'/1468, l='MpServer', x=-10,50, y=20,00, z=293,50], EntityZombie['Zombie'/1469, l='MpServer', x=-2,03, y=17,00, z=296,47], EntityZombie['Zombie'/1470, l='MpServer', x=-9,56, y=20,00, z=296,00], EntityZombie['Zombie'/1471, l='MpServer', x=-11,50, y=20,00, z=292,50], EntityItem['item.item.string'/6000, l='MpServer', x=-117,25, y=14,13, z=236,31], EntitySpider['Spider'/1627, l='MpServer', x=-94,50, y=40,00, z=320,50], EntitySkeleton['Skeleton'/1628, l='MpServer', x=-94,50, y=40,17, z=320,50], EntitySkeleton['Skeleton'/1621, l='MpServer', x=-114,50, y=46,00, z=314,50], EntitySkeleton['Skeleton'/1623, l='MpServer', x=-110,50, y=46,00, z=308,50], EntitySkeleton['Skeleton'/1622, l='MpServer', x=-109,50, y=46,00, z=311,50], EntityBat['Bat'/1549, l='MpServer', x=-97,59, y=19,20, z=282,74], EntityBat['Bat'/1545, l='MpServer', x=-13,28, y=21,23, z=286,75], EntityZombie['Zombie'/1747, l='MpServer', x=-118,97, y=15,00, z=234,47], EntitySkeleton['Skeleton'/1748, l='MpServer', x=-119,50, y=15,00, z=231,50], EntitySkeleton['Skeleton'/1755, l='MpServer', x=-103,63, y=28,00, z=280,91], EntitySpider['Spider'/1757, l='MpServer', x=-102,50, y=30,00, z=285,50], EntitySheep['Sheep'/751, l='MpServer', x=-96,06, y=67,00, z=266,34], EntitySheep['Sheep'/750, l='MpServer', x=-99,91, y=64,00, z=255,28], EntitySheep['Sheep'/749, l='MpServer', x=-92,47, y=73,46, z=255,67], EntitySheep['Sheep'/739, l='MpServer', x=-110,50, y=70,00, z=291,38], EntitySheep['Sheep'/738, l='MpServer', x=-110,50, y=71,00, z=292,53], EntitySheep['Sheep'/737, l='MpServer', x=-114,19, y=70,00, z=268,47], EntitySheep['Sheep'/736, l='MpServer', x=-117,50, y=70,00, z=267,50], EntitySheep['Sheep'/741, l='MpServer', x=-111,50, y=72,00, z=289,50], EntitySheep['Sheep'/740, l='MpServer', x=-110,50, y=70,00, z=290,03], EntityWolf['Wolf'/760, l='MpServer', x=-94,50, y=73,00, z=325,50], EntitySheep['Sheep'/766, l='MpServer', x=-81,50, y=81,00, z=208,50], EntitySheep['Sheep'/767, l='MpServer', x=-83,50, y=82,00, z=211,50], EntitySheep['Sheep'/765, l='MpServer', x=-85,50, y=82,00, z=206,50], EntitySheep['Sheep'/754, l='MpServer', x=-103,97, y=81,00, z=324,19], EntitySheep['Sheep'/755, l='MpServer', x=-101,50, y=80,00, z=322,50], EntitySheep['Sheep'/752, l='MpServer', x=-93,53, y=71,00, z=261,78], EntitySheep['Sheep'/753, l='MpServer', x=-102,47, y=80,00, z=326,09], EntityWolf['Wolf'/758, l='MpServer', x=-83,03, y=70,00, z=328,97], EntitySheep['Sheep'/756, l='MpServer', x=-102,34, y=80,00, z=324,47], EntityWolf['Wolf'/757, l='MpServer', x=-80,21, y=68,00, z=323,64], EntitySheep['Sheep'/734, l='MpServer', x=-116,09, y=71,00, z=269,50], EntitySheep['Sheep'/735, l='MpServer', x=-114,19, y=70,00, z=270,53], EntitySheep['Sheep'/821, l='MpServer', x=-36,50, y=69,00, z=312,50], EntitySheep['Sheep'/820, l='MpServer', x=-36,50, y=76,00, z=254,50], EntitySheep['Sheep'/823, l='MpServer', x=-38,50, y=69,00, z=314,50], EntitySheep['Sheep'/822, l='MpServer', x=-45,31, y=72,00, z=304,53], EntitySheep['Sheep'/817, l='MpServer', x=-34,53, y=75,00, z=254,47], EntitySheep['Sheep'/819, l='MpServer', x=-33,13, y=74,00, z=255,53], EntitySheep['Sheep'/818, l='MpServer', x=-34,53, y=77,00, z=247,88], EntitySheep['Sheep'/829, l='MpServer', x=-11,53, y=70,00, z=234,88], EntitySheep['Sheep'/828, l='MpServer', x=-19,47, y=72,00, z=207,38], EntitySheep['Sheep'/831, l='MpServer', x=-11,53, y=70,00, z=232,47], EntitySheep['Sheep'/830, l='MpServer', x=-10,47, y=70,00, z=232,47], EntitySheep['Sheep'/825, l='MpServer', x=-13,50, y=70,00, z=207,50], EntitySheep['Sheep'/824, l='MpServer', x=-35,50, y=64,00, z=314,50], EntitySheep['Sheep'/827, l='MpServer', x=-29,13, y=73,00, z=205,19], EntitySheep['Sheep'/826, l='MpServer', x=-16,50, y=71,00, z=208,50], EntitySheep['Sheep'/784, l='MpServer', x=-74,47, y=75,00, z=260,38], EntityPig['Pig'/797, l='MpServer', x=-53,50, y=64,00, z=330,50], EntitySheep['Sheep'/796, l='MpServer', x=-45,19, y=84,00, z=233,38], EntitySheep['Sheep'/795, l='MpServer', x=-60,76, y=81,00, z=245,56], EntitySheep['Sheep'/794, l='MpServer', x=-56,53, y=84,00, z=234,53], EntitySheep['Sheep'/793, l='MpServer', x=-55,50, y=84,00, z=232,50], EntitySheep['Sheep'/775, l='MpServer', x=-81,28, y=69,00, z=330,19], EntitySheep['Sheep'/772, l='MpServer', x=-79,31, y=80,00, z=234,53], EntitySheep['Sheep'/770, l='MpServer', x=-85,38, y=79,00, z=235,38], EntitySheep['Sheep'/771, l='MpServer', x=-86,88, y=79,00, z=242,13], EntitySheep['Sheep'/768, l='MpServer', x=-81,38, y=81,00, z=219,47], EntitySheep['Sheep'/769, l='MpServer', x=-84,47, y=79,92, z=240,50], EntitySheep['Sheep'/782, l='MpServer', x=-66,46, y=74,00, z=264,36], EntitySheep['Sheep'/783, l='MpServer', x=-68,19, y=72,00, z=272,91], EntitySheep['Sheep'/780, l='MpServer', x=-69,50, y=74,00, z=176,50], EntitySheep['Sheep'/781, l='MpServer', x=-64,50, y=74,00, z=264,50], EntityCreeper['Creeper'/1862, l='MpServer', x=-77,50, y=45,00, z=307,50], EntityCreeper['Creeper'/1863, l='MpServer', x=-72,50, y=44,00, z=324,50], EntityZombie['Zombie'/1841, l='MpServer', x=-25,50, y=30,00, z=254,50], EntitySheep['Sheep'/834, l='MpServer', x=-3,78, y=64,00, z=261,78], EntitySheep['Sheep'/835, l='MpServer', x=-2,19, y=64,00, z=260,19], EntitySheep['Sheep'/832, l='MpServer', x=-11,53, y=70,00, z=233,66], EntitySheep['Sheep'/833, l='MpServer', x=-5,50, y=64,00, z=260,50], EntitySheep['Sheep'/836, l='MpServer', x=-4,50, y=64,00, z=263,50], EntitySkeleton['Skeleton'/1969, l='MpServer', x=-97,06, y=36,00, z=248,47], EntitySkeleton['Skeleton'/1970, l='MpServer', x=-95,50, y=35,00, z=249,91], EntitySkeleton['Skeleton'/995, l='MpServer', x=-71,50, y=35,00, z=329,50], EntityZombie['Zombie'/2939, l='MpServer', x=-44,50, y=44,00, z=301,50], EntityZombie['Zombie'/2938, l='MpServer', x=-44,50, y=44,00, z=302,50], EntitySkeleton['Skeleton'/996, l='MpServer', x=-74,50, y=34,00, z=330,06], EntityZombie['Zombie'/2940, l='MpServer', x=-42,50, y=44,00, z=301,50], EntityClientPlayerMP['Zzyxzz'/913, l='MpServer', x=-77,50, y=78,62, z=252,50], EntitySquid['Squid'/967, l='MpServer', x=-140,25, y=57,75, z=194,63]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:418)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2560)
at net.minecraft.client.Minecraft.run(Minecraft.java:975)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 8 (amd64) version 6.2
Java Version: 1.7.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 627026920 bytes (597 MB) / 837812224 bytes (799 MB) up to 1899495424 bytes (1811 MB)
JVM Flags: 0 total; 
AABB Pool Size: 9187 (514472 bytes; 0 MB) allocated, 2 (112 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.01-pre FML v7.2.129.1046 Minecraft Forge 10.12.0.1046 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available
FML{7.2.129.1046} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1046.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available
Forge{10.12.0.1046} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1046.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available
BetterFurnaceEnhancedMod{1.0} [betterFurnaceEnhancedMod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: GeForce GTX 760 (192-bit)/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 2418 (135408 bytes; 0 MB) allocated, 18 (1008 bytes; 0 MB) used
Anisotropic Filtering: Off (1)

 

When i now shutdown minecraft and start it again. -> enter the world where the mod has not loaded -> still not loading (corrupted i guess)

When i now shutdown minecraft and start it again. -> Create new world -> mod works again!

 

 

Can please someone try that out. Would be good to know, if its only me.

*********************************

**  Always remember you are unique,  **

**  just like everyone else                   **     

**********************************

Was my post helpful? Say thanks and

press the thank you button, on my post!!

God, damn it!

Link to comment
Share on other sites

Main class from my furnace. which i was using for this test.

 

package com.zzyxz.betterFurnaceEnhancedMod;


import com.zzyxz.betterFurnaceEnhanced.BetterFurnace;
import com.zzyxz.betterFurnaceEnhanced.BetterFurnaceGuiHandler;
import com.zzyxz.betterFurnaceEnhanced.TileEntityBetterFurnace;

import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;

@Mod(modid = BetterFurnaceMain.MODID, version = BetterFurnaceMain.VERSION)
public class BetterFurnaceMain
{
    public static final String MODID = "BetterFurnaceEnhancedMod";
    public static final String VERSION = "1.0";
    
    @Instance(MODID)
    public static BetterFurnaceMain instance;
    private BetterFurnaceGuiHandler guihandler;
    public static	Block betterFurnaceIdle;
    public static	Block betterFurnaceActive;
    
    public static final int guiIdBetterFurnace = 0; 
    
    
    
    @EventHandler
    public void preinit(FMLInitializationEvent event)
    {
    	FMLClientHandler.instance().setDefaultMissingAction(FMLMissingMappingsEvent.Action.IGNORE);

    	
    	betterFurnaceIdle = new BetterFurnace(false).setCreativeTab(CreativeTabs.tabMisc).setBlockName("betterFurnaceIdle").setHardness(3.5f).setBlockTextureName("Minecraft"+":"+"textures/items/");
    	betterFurnaceActive = new BetterFurnace(true).setBlockName("betterFurnaceActive").setHardness(3.5f).setLightLevel(0.9f);  
    	GameRegistry.registerBlock(betterFurnaceIdle, betterFurnaceIdle.getUnlocalizedName().substring(5));
    	GameRegistry.registerBlock(betterFurnaceActive, betterFurnaceActive.getUnlocalizedName().substring(5));
    	GameRegistry.registerTileEntity(TileEntityBetterFurnace.class, "BetterFurnaceTileEntityID"); 
    	guihandler = new BetterFurnaceGuiHandler();
    	NetworkRegistry.INSTANCE.registerGuiHandler(this, guihandler); 
    	
    	
    	//Shaped Recipe
    	GameRegistry.addRecipe(new ItemStack(betterFurnaceIdle,1), new Object[] {"###","# #","###",'#',new ItemStack(Blocks.cobblestone, 1)});

    	


        if (event.getSide() == Side.CLIENT)
        Minecraft.getMinecraft().refreshResources();
    	
    }
}

*********************************

**  Always remember you are unique,  **

**  just like everyone else                   **     

**********************************

Was my post helpful? Say thanks and

press the thank you button, on my post!!

God, damn it!

Link to comment
Share on other sites

Thank you very much.... incredible..what  dumb mistakes i make... i can not see the wood for the trees.

*********************************

**  Always remember you are unique,  **

**  just like everyone else                   **     

**********************************

Was my post helpful? Say thanks and

press the thank you button, on my post!!

God, damn it!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • It does but I'm struggling to see how to make it work in my recipe? (Its structure is the same as OP's, with a serializer subclass)
    • That looks pretty cool, nice!   Sure, so looking at that JSON file I posted, I pretty much made a record class for each "custom" data type in that JSON. The Input is a good example of why ``` "inputs": [ { "ingredient": { "item": "relativedimensions:aberrant_shard" }, "count": 8 } ], ``` So here's the inputs, it's an array, which we can use the Codec builder's builder.listOf to define an array. Each Item is of some arbitrary object with keys "ingredient" (which we know is an Ingredient) and a "count" which is an int. You don't have to have an intermediate class to map this to necessarily but I found that it's just easier to see the data that way, hence the 'ParticleReboundIngredient' represents one of these inputs.   Let me know if that makes sense or not. 
    • Pretty much, although all the recipes im planning to make on it are shapeless. The idea is that the chamber uses energy to "fuse" the items in each of the center slots together, in this case an ingot. The two slots at the sides are fuel. (A special kind of wood in this case). Here is an image of the interface just for reference (The center slot is the output)   As for the code- Can you elaborate a little bit on it? Seeing three different record classes has confused me a lot. (Elaborate as in why make them in three different records. I understand the code itself more or less)
    • Hello im trying to make a mod and the past few days GSON has almost killed me, when i export the mod and then launch it through minecraft launcher i get java.lang.NoSuchMethodError: com.google.gson.JsonParser.parseString(Ljava/lang/String;)Lcom/google/gson/JsonElement; i have literally tried everything here is my build config   dependencies { minecraft("com.mojang:minecraft:1.8.9") mappings("de.oceanlabs.mcp:mcp_stable:22-1.8.9") forge("net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9") compileOnly("cc.polyfrost:oneconfig-1.8.9-forge:0.2.2-alpha+") shadowImpl("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+") { isTransitive = false exclude(module = "gson") } shadowImpl("org.spongepowered:mixin:0.7.11-SNAPSHOT") { isTransitive = false exclude(module = "gson") } annotationProcessor("org.spongepowered:mixin:0.8.5-SNAPSHOT") shadowImpl("org.javassist:javassist:3.15.0-GA") { isTransitive = false exclude(module = "gson") } shadowImpl("com.neovisionaries:nv-i18n:1.28") { isTransitive = false exclude(module = "gson") } shadowImpl("org.apache.commons:commons-lang3:3.4") { isTransitive = false exclude(module = "gson") } shadowImpl("org.apache.httpcomponents:httpcore:4.4.5") { isTransitive = false exclude(module = "gson") } compileOnly("com.google.code.gson:gson:2.8.6") { isTransitive = false } configurations.all { resolutionStrategy { force("com.google.code.gson:gson:2.8.6") } } shadowImpl(fileTree( mapOf( "dir" to "libs", "include" to listOf("*.jar"), "exclude" to listOf( "asm", "asm-commons", "asm-tree", "gson", "unspecified", "nv-i18n" ) ) )) }  
    • @chxr Looks like you're making some sort of a crafting table / furnace hybrid? Are the inputs needing arranging like a shaped recipe, or is it shapeless? I'll assume it's shapeless since that just adds a lot more complexity. In that case I'd probably do something like this { "type": "relativedimensions:particle_rebound", "inputs": [ { "ingredient": { "item": "relativedimensions:aberrant_shard" }, "count": 8 } ], "fuel": { "tag": "relativedimensions:block/aberrant_fuel" }, "output": { "Count": 1, "id": "relativedimensions:aberrant_ingot" } } inputs: A list of ingredients and how many are needed. The count among each input adds up to 8. Since there's only 1 ingredient, the count is set to 8. fuel: Same thing as before but remove the list and just make it an object with a tag. output: Kept the same.   In this case the Codec I would make is public record ParticleReboundIngredient(Ingredient ingredient, int count) { public static final Codec<ParticleReboundIngredient> CODEC = RecordCodecBuilder.create( builder -> builder.group( Ingredient.CODEC.fieldOf("ingredient").forGetter((i) -> i.ingredient), Codec.INT.fieldOf("count").forGetter(i -> i.count) ).apply(builder, ParticleReboundIngredient::new) ); } public record ParticleReboundFuel(String tag) { public static final Codec<ParticleReboundFuel> CODEC = RecordCodecBuilder.create( builder -> builder.group(Codec.STRING.fieldOf("tag").forGetter(f -> f.tag)).apply(builder, ParticleReboundFuel::new) ); public boolean isFuel(ItemStack stack) { // TODO: Check if fuel item matches the tag } } public record ParticleReboundRecipe(List<ParticleReboundIngredient> inputs, ParticleReboundFuel fuel, ItemStack output) { public static final Codec<ParticleReboundRecipe> CODEC = RecordCodecBuilder.create( builder -> builder.group( ParticleReboundIngredient.CODEC.listOf().fieldOf("inputs").forGetter(r -> r.inputs), ParticleReboundFuel.CODEC.fieldOf("fuel").forGetter(r -> r.fuel), ItemStack.CODEC.fieldOf("output").forGetter(r -> r.output) ).apply(builder, ParticleReboundRecipe::new) ); }   There might be a more proper Codec for the fuel and the tag that's built into minecraft / forge, but I didn't look
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.