Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • cmchenry

cmchenry

Members
 View Profile  See their activity
  • Content Count

    48
  • Joined

    June 12, 2015
  • Last visited

    July 20, 2018

Community Reputation

0 Neutral

About cmchenry

  • Rank
    Tree Puncher

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. cmchenry

    Item Won't Damage

    cmchenry replied to cmchenry's topic in Modder Support

    On the post I tried just server to see if it would help and it did not.
    • July 15, 2018
    • 1 reply
  2. cmchenry started following Registering ItemBlock not working, Item Won't Damage and I HATE block states, and just need help. July 15, 2018
  3. cmchenry

    Item Won't Damage

    cmchenry posted a topic in Modder Support

    My item damages for ONE SECOND and then goes right back to being damaged. You'd think it has something to do with client server syncing but it isn't as it is called on both sides. object ItemWateringCan extends Item { setRegistryName(DrugMod.modid, "watering_can") setUnlocalizedName(DrugMod.modid + ":watering_can") setCreativeTab(CreativeTabs.TOOLS) setMaxDamage(20) override def onItemUse(player: EntityPlayer, world: World, pos: BlockPos, hand: EnumHand, facing: EnumFacing, hitX: Float, hitY: Float, hitZ: Float): EnumActionResult = { // if(!world.isRemote) { // val blockState = world.getBlockState(pos) // if(blockState.getBlock == Blocks.WATER) { // } else if (blockState.getBlock == BlockCropPot) { // world.setBlockState(pos, BlockCropPot.getDefaultState.withProperty(BlockFarmland.MOISTURE, 7:java.lang.Integer)) // } // } println(player.getHeldItem(hand).isItemStackDamageable) if(!world.isRemote) { player.getHeldItem(hand).damageItem(1, player) } super.onItemUse(player, world, pos, hand, facing, hitX, hitY, hitZ) } }
    • July 15, 2018
    • 1 reply
  4. cmchenry

    I HATE block states, and just need help.

    cmchenry replied to cmchenry's topic in Modder Support

    So to fully fix all clipping in my block class I had to add override def shouldSideBeRendered(blockState: IBlockState, blockAccess: IBlockAccess, pos: BlockPos, side: EnumFacing): Boolean = true override def isOpaqueCube(state: IBlockState): Boolean = false override def isFullCube(state: IBlockState): Boolean = false And then in blender I had to of course fix the normals like in the video above, and then I had to render without Triangulating Faces, but sometimes that may fix it. Final JSON { "forge_marker" : 1, "defaults" : { "textures" : { "#material" : "drug:block/crop_pot_dry" }, "custom": { "flip-v": true }, "model" : "drug:crop_pot.obj", "transform": "forge:default-item" }, "variants": { "normal": [{ "model": "drug:block/crop_pot" }], "inventory": [{ "model": "drug:block/crop_pot" }], "moisture": { "0": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "1": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "2": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "3": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "4": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "5": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "6": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "7": { "textures": { "#material":"drug:block/crop_pot_wet" } } } } }
    • July 12, 2018
    • 9 replies
  5. cmchenry

    I HATE block states, and just need help.

    cmchenry replied to cmchenry's topic in Modder Support

    To fix the issue I was having follow this video:
    • July 12, 2018
    • 9 replies
  6. cmchenry

    Face Culling on custom OBJ models

    cmchenry replied to BenignBanana's topic in Modder Support

    I could use help with this too. BUMP EVEN THO IT'S OLD AF
    • July 12, 2018
    • 3 replies
  7. cmchenry

    I HATE block states, and just need help.

    cmchenry replied to cmchenry's topic in Modder Support

    The image size in 128x128. Is that not valid?
    • July 12, 2018
    • 9 replies
  8. cmchenry

    I HATE block states, and just need help.

    cmchenry replied to cmchenry's topic in Modder Support

    Okay I got the textures to load, but for some reason it doesn't show properly in MC on the model. Is it because I triangulated the faces? { "forge_marker" : 1, "defaults" : { "textures" : { "#material" : "drug:block/crop_pot_dry" }, "model" : "drug:crop_pot.obj", "transform": "forge:default-block" }, "variants": { "normal": [{ "model": "drug:block/crop_pot" }], "inventory": [{ "model": "drug:block/crop_pot" }], "moisture": { "0": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "1": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "2": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "3": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "4": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "5": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "6": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "7": { "textures": { "#material":"drug:block/crop_pot_wet" } } } } }
    • July 12, 2018
    • 9 replies
  9. cmchenry

    I HATE block states, and just need help.

    cmchenry replied to cmchenry's topic in Modder Support

    { "forge_marker" : 1, "defaults" : { "textures" : { "material" : "drug:block/crop_pot_dry" }, "model" : "drug:crop_pot.obj", "transform": "forge:default-block" }, "variants": { "normal": [{ "model": "drug:block/crop_pot", "textures": { "material":"drug:block/crop_pot_dry" } }], "inventory": [{ "model": "drug:block/crop_pot", "textures": { "material":"drug:block/crop_pot_dry" } }], "moisture": { "0": { "textures": { "material":"drug:block/crop_pot_dry" } }, "1": { "textures": { "material":"drug:block/crop_pot_dry" } }, "2": { "textures": { "material":"drug:block/crop_pot_dry" } }, "3": { "textures": { "material":"drug:block/crop_pot_dry" } }, "4": { "textures": { "material":"drug:block/crop_pot_dry" } }, "5": { "textures": { "material":"drug:block/crop_pot_dry" } }, "6": { "textures": { "material":"drug:block/crop_pot_dry" } }, "7": { "textures": { "material":"drug:block/crop_pot_wet" } } } } } Textures still don't work.
    • July 12, 2018
    • 9 replies
  10. cmchenry cmchenry changed their profile photo July 12, 2018
  11. cmchenry

    I HATE block states, and just need help.

    cmchenry replied to cmchenry's topic in Modder Support

    In Client Proxy PreInit ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(BlockCropPot), 0, new ModelResourceLocation(BlockCropPot.getRegistryName, "inventory")) The JSON { "forge_marker" : 1, "defaults" : { "textures" : { "#material" : "drug:block/crop_pot_dry" }, "model" : "drug:crop_pot.obj", "transform": "forge:default-block" }, "variants": { "normal": [{ "model": "drug:block/crop_pot", "textures": { "#material":"drug:block/crop_pot_dry" } }], "inventory": [{ "model": "drug:block/crop_pot", "textures": { "#material":"drug:block/crop_pot_dry" } }], "moisture": { "0": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "1": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "2": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "3": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "4": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "5": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "6": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "7": { "textures": { "#material":"drug:block/crop_pot_wet" } } } } } This contains no errors. Only problem now is that the block is a purple/black block (ya know, the one that's missing its model) and the model has no texture. Also how do I disable culling? It seems to be culling the OBJ=NOT GOOD.
    • July 12, 2018
    • 9 replies
  12. cmchenry

    I HATE block states, and just need help.

    cmchenry replied to cmchenry's topic in Modder Support

    I have not. I will read it and get back to you on my results. ?
    • July 12, 2018
    • 9 replies
  13. cmchenry

    I HATE block states, and just need help.

    cmchenry posted a topic in Modder Support

    I've googled around and read the forums for approximately 1 hour. I will not research any further. Can I please receive help on why I am getting this error? Called in ClientProxy init registerItemModel(BlockCropPot, 0) def registerItemModel(block: Block, meta: Int): Unit = { val item = Item.getItemFromBlock(block) val model = new ModelResourceLocation(getRegistryName.toString, "inventory") ModelBakery.registerItemVariants(item, model) Minecraft.getMinecraft.getRenderItem.getItemModelMesher.register(item, meta, model) } Called in Client Proxy PreInit OBJLoader.INSTANCE.addDomain(DrugMod.modid) object BlockCropPot extends BlockFarmland { setRegistryName(DrugMod.modid, "crop_pot") setUnlocalizedName(DrugMod.modid + ":crop_pot") setCreativeTab(CreativeTabs.FOOD) } { "forge_marker" : 1, "defaults" : { "textures" : { "#material" : "drug:block/crop_pot_dry" }, "model" : "drug:crop_pot.obj", "transform": "forge:default-block" }, "variants": { "inventory": { "model": "drug:crop_pot.obj" }, "moisture=0": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "moisture=1": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "moisture=2": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "moisture=3": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "moisture=4": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "moisture=5": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "moisture=6": { "textures": { "#material":"drug:block/crop_pot_dry" } }, "moisture=7": { "textures": { "#material":"drug:block/crop_pot_wet" } } } } The .mtl file # Blender MTL File: 'None' # Material Count: 1 newmtl material Ns 96.078431 Ka 1.000000 1.000000 1.000000 Kd 0.640000 0.640000 0.640000 Ks 0.500000 0.500000 0.500000 Ke 0.000000 0.000000 0.000000 Ni 1.000000 d 1.000000 illum 2 Last but not least, the error log. Exception loading model for variant drug:crop_pot#moisture=5 for blockstate "drug:crop_pot[moisture=5]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model drug:crop_pot#moisture=5 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:237) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:225) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:152) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:559) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1182) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more [16:39:25] [main/ERROR]: Exception loading model for variant drug:crop_pot#moisture=6 for blockstate "drug:crop_pot[moisture=6]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model drug:crop_pot#moisture=6 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:237) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:225) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:152) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:559) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1182) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more [16:39:25] [main/ERROR]: Exception loading model for variant drug:crop_pot#moisture=3 for blockstate "drug:crop_pot[moisture=3]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model drug:crop_pot#moisture=3 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:237) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:225) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:152) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:559) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1182) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more [16:39:25] [main/ERROR]: Exception loading model for variant drug:crop_pot#moisture=4 for blockstate "drug:crop_pot[moisture=4]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model drug:crop_pot#moisture=4 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:237) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:225) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:152) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:559) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1182) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more
    • July 12, 2018
    • 9 replies
  14. cmchenry

    Registering ItemBlock not working

    cmchenry replied to cmchenry's topic in Modder Support

    Okay so I figured it out. Ends up that the creative tab you set for the ItemBlock correlates to what you set in the block. No need to even set it inside the ItemBlock.
    • July 9, 2018
    • 1 reply
  15. cmchenry

    Registering ItemBlock not working

    cmchenry posted a topic in Modder Support

    I'm trying to register an ItemBlock for my custom block. It's just not appearing in the creative tab for whatever reason or from what I can tell in the game at all. All other items register fine, just not the ItemBlock. PS: I'm coding in Scala @SubscribeEvent def registerItems(e: RegistryEvent.Register[Item]): Unit = { e.getRegistry.registerAll(ItemHempBud, ItemHempSeed, ItemHempBioManipulator) } object BlockHempBioManipulator extends BlockContainer(Material.IRON) { var PROP_TOP: IProperty[java.lang.Integer] = _ setRegistryName(DrugMod.modid, "hemp_bio_manipulator") setUnlocalizedName(DrugMod.modid + ":hemp_bio_manipulator") setDefaultState(this.blockState.getBaseState.withProperty(PROP_TOP, 0: java.lang.Integer)) override def createNewTileEntity(worldIn: World, meta: Int): TileEntity = new TileEntityHempBioManipulator override def getRenderType(state: IBlockState): EnumBlockRenderType = EnumBlockRenderType.MODEL override def getStateFromMeta(meta: Int): IBlockState = getDefaultState.withProperty(PROP_TOP, meta: java.lang.Integer) override def getMetaFromState(state: IBlockState): Int = state.getValue(PROP_TOP) override def createBlockState(): BlockStateContainer = { PROP_TOP = PropertyInteger.create("top", 0, 1) new BlockStateContainer(this, PROP_TOP) } override def onBlockActivated(worldIn: World, pos: BlockPos, state: IBlockState, playerIn: EntityPlayer, hand: EnumHand, facing: EnumFacing, hitX: Float, hitY: Float, hitZ: Float): Boolean = { if (!worldIn.isRemote) playerIn.openGui(DrugMod, GuiHandler.GUI_HEMP_BIO_MANIPULATOR, worldIn, pos.getX, pos.getY, pos.getZ) super.onBlockActivated(worldIn, pos, state, playerIn, hand, facing, hitX, hitY, hitZ) } } object HempBioManipulatorStateMapper extends StateMapperBase { override def getModelResourceLocation(state: IBlockState): ModelResourceLocation = new ModelResourceLocation(state.getBlock.getRegistryName, "top=" + state.getValue(BlockHempBioManipulator.PROP_TOP)) } object ItemHempBioManipulator extends ItemBlock(BlockHempBioManipulator) { setRegistryName(DrugMod.modid, "hemp_bio_manipulator") setUnlocalizedName(DrugMod.modid + ":hemp_bio_manipulator") setCreativeTab(CreativeTabs.BREWING) } EDIT: So it is registering, just not in the creative tabs at all.
    • July 9, 2018
    • 1 reply
  16. cmchenry

    Can't change blockstate in Scala

    cmchenry replied to cmchenry's topic in Modder Support

    I posted a Stack Overflow question. Here is the solution to anyone who needs it. https://stackoverflow.com/questions/51236159/inferred-type-arguments-any-int-do-not-conform-to-methods-type-parameter-boun/51236893#51236893
    • July 9, 2018
    • 7 replies
  17. cmchenry

    Can't change blockstate in Scala

    cmchenry replied to cmchenry's topic in Modder Support

    I may just have to go back to normal Java. I really can't find any way around this online. SAD FACE.
    • July 8, 2018
    • 7 replies
  • All Activity
  • Home
  • cmchenry
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community