Jump to content

Recommended Posts

Posted

For full source code see:

https://github.com/BrasilianEngineer/WarehouseMod/tree/master/src/main/java/com/brasilianengineer/tbewarehouse

https://github.com/BrasilianEngineer/WarehouseMod/tree/master/src/main/resources/assets/tbewarehouse

 

I'm currently trying to work with:

1 item

1 simple block

2 metadata blocks w/ 2 versions each.

 

The blocks render correctly when I place them in world, but don't in my hand or my inventory.

 

If I can figure out the item and the simple block, I can hopefully figure out the rest from there.

 

Block Registration:

@GameRegistry.ObjectHolder(Reference.MOD_ID)
public class ModBlocks {

    public static final BlockTWM machineFrame = new BlockWarehouseFrame();
    public static final BlockTWM machineWall = new BlockWarehouseWall();

    public static void init() { // called from common proxy preInit

        GameRegistry.registerBlock(machineFrame, ItemBlockTWMWarehouseFrameVariants.class, Names.Blocks.BLOCK_WAREHOUSE_FRAME);
        GameRegistry.registerBlock(machineWall, ItemBlockTWMWarehouseFrameVariants.class, Names.Blocks.BLOCK_WAREHOUSE_WALL);


        LogHelper.info("Block Registry Init Complete");
    }
}

 

Block Render Registry:

public final class BlockRenderRegister {

    public static void init() {

        registerBlockVariant(ModBlocks.warehouseFrame);
        registerBlockVariant(ModBlocks.warehouseWall);
        registerBlock(ModBlocks.warehouseBuffer);

        LogHelper.info("Block Render Registry Init Complete");
    }

    private static void registerBlock(Block block) {
        Item item = GameRegistry.findItem(Reference.MOD_ID, block.getUnlocalizedName().substring(5));
        ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(Reference.RESOURCE_PREFIX + block.getUnlocalizedName().substring(5), "inventory"));
    }

    private static void registerBlockVariant(Block block) {
        String baseName = block.getUnlocalizedName().substring(5);
        Item item = GameRegistry.findItem(Reference.MOD_ID, baseName);

        for(BlockWarehouseFrameComponent.EnumType type : BlockWarehouseFrameComponent.EnumType.values()) {
            ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(Reference.RESOURCE_PREFIX + baseName + "_" + type.getName(), "inventory");
            ModelLoader.setCustomModelResourceLocation(item, type.getMetadata(), itemModelResourceLocation);
        }
    }
}

 

Simple Block Class (they are all almost the same)

public class BlockWarehouseBuffer extends BlockWarehouseInternalComponent {

    public BlockWarehouseBuffer() {
        super();
        this.setUnlocalizedName(Names.Blocks.BLOCK_WAREHOUSE_BUFFER);
    }
}

 

Block Base Class

public class BlockWarehouseInternalComponent extends BlockTWM {

    public BlockWarehouseInternalComponent() {
        super(Material.iron);
        setHardness(5.0f);
        setResistance(25.0f);
        setHardness(1f);
        setStepSound(SoundType.METAL);
    }
}

public class BlockTWM extends Block {

    public BlockTWM(Material material) {
        super(material);

        setCreativeTab(CreativeTabTWM.TWM_TAB);
    }
}

 

Item json

{
  "parent": "builtin/generated",
  "textures": {
    "layer0":"tbewarehouse:items/multi_tool"
  },
  "display": {
    "thirdperson": {
      "rotation": [ -90, 0, 0 ],
      "translation": [ 0, 1, -3 ],
      "scale": [ 0.55, 0.55, 0.55 ]
    },
    "firstperson": {
      "rotation": [ 0, -135, 25 ],
      "translation": [ 0, 4, 2 ],
      "scale": [ 1.7, 1.7, 1.7 ]
    }
  }
}

 

Simple Block Blockstate

{
"variants": {
        "normal": { "model": "tbewarehouse:warehouse_buffer" }
}
}

 

Simple Block Model

{
  "parent": "block/cube_all",
  "textures": {
    "all": "tbewarehouse:blocks/warehouse_buffer_all"
  }
}

 

Simple Block Item Model

{
"parent": "tbewarehouse:block/warehouse_buffer",
"display": {
	"thirdperson": {
		"rotation": [ 10, -45, 170 ],
		"translation": [ 0, 1.5, -2.75 ],
		"scale": [ 0.375, 0.375, 0.375 ]
	}
}
}

 

Forge Log

 

 

2016-03-25 17:26:02,273 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream

2016-03-25 17:26:02,274 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream

[17:26:02] [main/INFO] [GradleStart]: Extra: []

[17:26:02] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/tbe/.gradle/caches/minecraft/assets, --assetIndex, 1.9, --accessToken{REDACTED}, --version, 1.9, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]

[17:26:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[17:26:02] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[17:26:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker

[17:26:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker

[17:26:02] [main/INFO] [FML]: Forge Mod Loader version 12.16.0.1801 for Minecraft 1.9 loading

[17:26:02] [main/INFO] [FML]: Java is Java HotSpot Client VM, version 1.8.0_73, running on Windows 10:x86:10.0, installed at C:\Program Files (x86)\Java\jdk1.8.0_73\jre

[17:26:02] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

[17:26:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker

[17:26:02] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin

[17:26:02] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin

[17:26:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[17:26:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[17:26:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker

[17:26:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[17:26:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[17:26:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[17:26:02] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

[17:26:04] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing

[17:26:04] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[17:26:04] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[17:26:05] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker

[17:26:05] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker

[17:26:05] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker

[17:26:05] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}

2016-03-25 17:26:05,450 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream

2016-03-25 17:26:05,483 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream

2016-03-25 17:26:05,486 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream

[17:26:05] [Client thread/INFO]: Setting user: Player777

[17:26:08] [Client thread/INFO]: LWJGL Version: 2.9.4

[17:26:09] [Client thread/INFO] [sTDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:250]: ---- Minecraft Crash Report ----

// Would you like a cupcake?

 

Time: 3/25/16 5:26 PM

Description: Loading screen debug info

 

This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR

 

 

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

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.9

Operating System: Windows 10 (x86) version 10.0

Java Version: 1.8.0_73, Oracle Corporation

Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation

Memory: 795341328 bytes (758 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)

JVM Flags: 2 total; -Xmx1G -Xms1G

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML:

Loaded coremods (and transformers):

GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13416 Compatibility Profile Context 15.300.1025.0' Renderer: 'AMD Radeon R9 200 Series'

[17:26:09] [Client thread/INFO] [FML]: MinecraftForge v12.16.0.1801 Initialized

[17:26:09] [Client thread/INFO] [FML]: Replaced 207 ore recipies

[17:26:10] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer

[17:26:10] [Client thread/INFO] [FML]: Searching D:\Dev\JAVA\Minecraft\1.9\WarehouseMod\run\mods for mods

[17:26:12] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load

[17:26:12] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, tbewarehouse] at CLIENT

[17:26:12] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, tbewarehouse] at SERVER

[17:26:13] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:TBE's Warehouse Mod

[17:26:13] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[17:26:13] [Client thread/INFO] [FML]: Found 422 ObjectHolder annotations

[17:26:13] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations

[17:26:13] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations

[17:26:13] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0

[17:26:13] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json

[17:26:13] [Client thread/INFO] [TBE's Warehouse Mod]: Block Registry Init Complete

[17:26:13] [Client thread/INFO] [TBE's Warehouse Mod]: Item Registry Init Complete

[17:26:13] [Client thread/INFO] [TBE's Warehouse Mod]: Pre Initialization Complete

[17:26:13] [Client thread/INFO] [FML]: Applying holder lookups

[17:26:13] [Client thread/INFO] [FML]: Holder lookups applied

[17:26:13] [Client thread/INFO] [FML]: Injecting itemstacks

[17:26:13] [Client thread/INFO] [FML]: Itemstack injection complete

[17:26:13] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: BETA_OUTDATED Target: 12.16.0.1809

[17:26:17] [sound Library Loader/INFO]: Starting up SoundSystem...

[17:26:17] [Thread-8/INFO]: Initializing LWJGL OpenAL

[17:26:17] [Thread-8/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

[17:26:17] [Thread-8/INFO]: OpenAL initialized.

[17:26:17] [sound Library Loader/INFO]: Sound engine started

[17:26:22] [Client thread/INFO] [FML]: Max texture size: 4096

[17:26:22] [Client thread/INFO]: Created: 16x16 textures-atlas

[17:26:23] [Client thread/INFO] [TBE's Warehouse Mod]: Block Render Registry Init Complete

[17:26:23] [Client thread/INFO] [TBE's Warehouse Mod]: Item Render Registry Init Complete

[17:26:23] [Client thread/INFO] [TBE's Warehouse Mod]: Initialization Complete

[17:26:23] [Client thread/INFO] [FML]: Injecting itemstacks

[17:26:23] [Client thread/INFO] [FML]: Itemstack injection complete

[17:26:23] [Client thread/INFO] [TBE's Warehouse Mod]: Post Initialization Complete

[17:26:23] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods

[17:26:23] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:TBE's Warehouse Mod

[17:26:27] [Client thread/INFO]: SoundSystem shutting down...

[17:26:27] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com

[17:26:27] [sound Library Loader/INFO]: Starting up SoundSystem...

[17:26:27] [Thread-10/INFO]: Initializing LWJGL OpenAL

[17:26:27] [Thread-10/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

[17:26:27] [Thread-10/INFO]: OpenAL initialized.

[17:26:28] [sound Library Loader/INFO]: Sound engine started

[17:26:32] [Client thread/INFO] [FML]: Max texture size: 4096

[17:26:32] [Client thread/INFO]: Created: 1024x512 textures-atlas

[17:26:34] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id

[17:26:38] [server thread/INFO]: Starting integrated minecraft server version 1.9

[17:26:38] [server thread/INFO]: Generating keypair

[17:26:38] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance

[17:26:38] [server thread/INFO] [FML]: Applying holder lookups

[17:26:38] [server thread/INFO] [FML]: Holder lookups applied

[17:26:38] [server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@1e1b65c)

[17:26:38] [server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@1e1b65c)

[17:26:38] [server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@1e1b65c)

[17:26:38] [server thread/INFO]: Preparing start region for level 0

[17:26:39] [server thread/INFO]: Changing view distance to 8, from 10

[17:26:43] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2

[17:26:43] [Netty Server IO #1/INFO] [FML]: Client protocol version 2

[17:26:43] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 4 mods : [email protected],[email protected],[email protected],[email protected]

[17:26:43] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established

[17:26:43] [server thread/INFO] [FML]: [server thread] Server side modded connection established

[17:26:43] [server thread/INFO]: Player777[local:E:1585a544] logged in with entity id 118 at (-62.096569262542324, 4.0, -686.7923975493385)

[17:26:43] [server thread/INFO]: Player777 joined the game

[17:26:44] [server thread/INFO]: Saving and pausing game...

[17:26:44] [server thread/INFO]: Saving chunks for level 'New World'/Overworld

[17:26:44] [server thread/INFO]: Saving chunks for level 'New World'/Nether

[17:26:44] [server thread/INFO]: Saving chunks for level 'New World'/The End

[17:26:44] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@c30214[id=11e9bf70-b06d-37b5-8fe5-cb8c8adfd22c,name=Player777,properties={},legacy=false]

com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time

at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:65) ~[YggdrasilAuthenticationService.class:?]

at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:175) [YggdrasilMinecraftSessionService.class:?]

at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:59) [YggdrasilMinecraftSessionService$1.class:?]

at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:56) [YggdrasilMinecraftSessionService$1.class:?]

at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?]

at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:165) [YggdrasilMinecraftSessionService.class:?]

at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3038) [Minecraft.class:?]

at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:130) [skinManager$3.class:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_73]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_73]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_73]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_73]

at java.lang.Thread.run(Thread.java:745) [?:1.8.0_73]

[17:26:51] [server thread/INFO]: Saving and pausing game...

[17:26:51] [server thread/INFO]: Saving chunks for level 'New World'/Overworld

[17:26:51] [server thread/INFO]: Saving chunks for level 'New World'/Nether

[17:26:51] [server thread/INFO]: Saving chunks for level 'New World'/The End

 

 

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



×
×
  • Create New...

Important Information

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