-
Posts
107 -
Joined
-
Last visited
Everything posted by Cleverpanda
-
Unfortunately, that also did not work, and I have no other useful info to give. And i'm developing for 1.8 through 1.10.2, I just start with 1.8.
-
How do I do that when It requires my item to be instantiated which also requires my door, which happens in Init? If I do it in preinit, I get a null pointer crash. If I do it where I had it, it changes nothing.
-
hm. That changed stuff but didn't fix it. now Ive got: MultiModel minecraft:builtin/missing is empty (no base model or parts were provided/resolved) Which I don't think is important. And "Model definition not found" went away, but the item is still the missing model cube.
-
appending "inventory": {"texture": "varietytrees:items/door_apple"} to my blockstates didn't work and crashed the game with "Missing model, expected to find a string" file was valid json.
-
I've been trying to solve this for days now... I've made some custom doors and the door item refuses to find Its model... Sorry for additional post, but for the life of me, nothing works. The door block renders and functions normally. MAIN public static Block AppleDoor; public static Item AppleDoorItem; ... @EventHandler public void init(FMLInitializationEvent event) { String wood = "apple"; AppleDoor = createDoor(wood); AppleDoorItem = create_door(wood,(BlockDoor)AppleDoor); Minecraft.getMinecraft().getRenderItem().getItemModelMesher() .register(AppleDoorItem, 0, new ModelResourceLocation(MODID+":"+wood +"_door", "inventory")); System.out.println(AppleDoorItem); } private static BlockDoor createDoor(String wood){ BlockDoor block = new BlockVarietyDoor(wood); block.setUnlocalizedName(MODID+"."+wood+"_door"); GameRegistry.registerBlock(block,null,wood+"_door"); return block; } private static Item create_door(String wood,BlockDoor door){ Item i = new ItemVarietyDoor(wood,door); i.setUnlocalizedName(MODID+"."+wood+"_door"); String regName = wood+"_door"; GameRegistry.registerItem(i, regName); return i; } ItemVarietyDoor public class ItemVarietyDoor extends ItemDoor{ public ItemVarietyDoor(String wood,Block block) { super(block); this.setUnlocalizedName(VarietyTrees.MODID+"."+wood+"_door"); } } models/item/apple_door.json { "parent": "item/door_item", "textures": { "bottom": "varietytrees:blocks/door_apple_lower", "top": "varietytrees:blocks/door_apple_upper" } } models/block/apple_door_XXX all look basically like this { "parent": "block/door_top", "textures": { "bottom": "varietytrees:blocks/door_apple_lower", "top": "varietytrees:blocks/door_apple_upper" } } blockstates.json { "variants": { "facing=east,half=lower,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_bottom" }, "facing=south,half=lower,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_bottom", "y": 90 }, "facing=west,half=lower,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_bottom", "y": 180 }, "facing=north,half=lower,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_bottom", "y": 270 }, "facing=east,half=lower,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_bottom_rh" }, "facing=south,half=lower,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_bottom_rh", "y": 90 }, "facing=west,half=lower,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_bottom_rh", "y": 180 }, "facing=north,half=lower,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_bottom_rh", "y": 270 }, "facing=east,half=lower,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_bottom_rh", "y": 90 }, "facing=south,half=lower,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_bottom_rh", "y": 180 }, "facing=west,half=lower,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_bottom_rh", "y": 270 }, "facing=north,half=lower,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_bottom_rh" }, "facing=east,half=lower,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_bottom", "y": 270 }, "facing=south,half=lower,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_bottom" }, "facing=west,half=lower,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_bottom", "y": 90 }, "facing=north,half=lower,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_bottom", "y": 180 }, "facing=east,half=upper,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_top" }, "facing=south,half=upper,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_top", "y": 90 }, "facing=west,half=upper,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_top", "y": 180 }, "facing=north,half=upper,hinge=left,open=false,powered=false": { "model": "varietytrees:apple_door_top", "y": 270 }, "facing=east,half=upper,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_top_rh" }, "facing=south,half=upper,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_top_rh", "y": 90 }, "facing=west,half=upper,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_top_rh", "y": 180 }, "facing=north,half=upper,hinge=right,open=false,powered=false": { "model": "varietytrees:apple_door_top_rh", "y": 270 }, "facing=east,half=upper,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_top_rh", "y": 90 }, "facing=south,half=upper,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_top_rh", "y": 180 }, "facing=west,half=upper,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_top_rh", "y": 270 }, "facing=north,half=upper,hinge=left,open=true,powered=false": { "model": "varietytrees:apple_door_top_rh" }, "facing=east,half=upper,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_top", "y": 270 }, "facing=south,half=upper,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_top" }, "facing=west,half=upper,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_top", "y": 90 }, "facing=north,half=upper,hinge=right,open=true,powered=false": { "model": "varietytrees:apple_door_top", "y": 180 }, "facing=east,half=lower,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_bottom" }, "facing=south,half=lower,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_bottom", "y": 90 }, "facing=west,half=lower,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_bottom", "y": 180 }, "facing=north,half=lower,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_bottom", "y": 270 }, "facing=east,half=lower,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_bottom_rh" }, "facing=south,half=lower,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_bottom_rh", "y": 90 }, "facing=west,half=lower,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_bottom_rh", "y": 180 }, "facing=north,half=lower,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_bottom_rh", "y": 270 }, "facing=east,half=lower,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_bottom_rh", "y": 90 }, "facing=south,half=lower,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_bottom_rh", "y": 180 }, "facing=west,half=lower,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_bottom_rh", "y": 270 }, "facing=north,half=lower,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_bottom_rh" }, "facing=east,half=lower,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_bottom", "y": 270 }, "facing=south,half=lower,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_bottom" }, "facing=west,half=lower,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_bottom", "y": 90 }, "facing=north,half=lower,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_bottom", "y": 180 }, "facing=east,half=upper,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_top" }, "facing=south,half=upper,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_top", "y": 90 }, "facing=west,half=upper,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_top", "y": 180 }, "facing=north,half=upper,hinge=left,open=false,powered=true": { "model": "varietytrees:apple_door_top", "y": 270 }, "facing=east,half=upper,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_top_rh" }, "facing=south,half=upper,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_top_rh", "y": 90 }, "facing=west,half=upper,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_top_rh", "y": 180 }, "facing=north,half=upper,hinge=right,open=false,powered=true": { "model": "varietytrees:apple_door_top_rh", "y": 270 }, "facing=east,half=upper,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_top_rh", "y": 90 }, "facing=south,half=upper,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_top_rh", "y": 180 }, "facing=west,half=upper,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_top_rh", "y": 270 }, "facing=north,half=upper,hinge=left,open=true,powered=true": { "model": "varietytrees:apple_door_top_rh" }, "facing=east,half=upper,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_top", "y": 270 }, "facing=south,half=upper,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_top" }, "facing=west,half=upper,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_top", "y": 90 }, "facing=north,half=upper,hinge=right,open=true,powered=true": { "model": "varietytrees:apple_door_top", "y": 180 } } } Console Output: [FML]: Model definition for location varietytrees:apple_door#inventory not found I've read plenty of tutorials and troubleshooting on this, so please don't send those, either it's not that or I'm not doing it right. Help!
-
Yes. And its' file name is the same as what I registered the item renderer with
-
That worked! What an elegant solution. The only thing now is my Item is rendering as the missing texture cube. I double checked my json and it looks correct to me, so I'm not sure there. Console output is: Model definition for location varietytrees:apple_door#inventory not found
-
Hello! So I need to make my own ItemDoor class that extends ItemBlock then? I cannot use one that extends minecraft ItemDoor? Because Itemdoor does not extend ItemBlock..
-
AppleDoor = new BlockVarietyDoor("apple"); GameRegistry.registerBlock(AppleDoor, "apple_door"); AppleDoorItem = new ItemVarietyDoor(AppleDoor); GameRegistry.registerItem(AppleDoorItem, "apple_door"); RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); renderItem.getItemModelMesher().register(Item.getItemFromBlock(AppleDoor),0, new ModelResourceLocation(MODID + ":" + "apple_door", "inventory")); Crashes with: The name varietytrees:apple_door has been registered twice, for net.minecraft.item.ItemBlock@46916d68 and panda.varietytrees.trees.ItemVarietyDoor@79b07ccd. At the line GameRegistry.registerItem(AppleDoorItem, "apple_door"); Even though i am not using an itemblock
-
That part I actually did have working fine before. But maybe its part of the reason other parts didn't, so I overrode all of the state functions too. What else?
-
All I'm trying to do is add doors with no extra functionality for the wood blocks i've added. I've been at this for hours and Everything I try has problems no one can seem to help with. So I'll go back as far as I think is correct. Iv'e got an item that extends ItemDoor: public class ItemVarietyDoor extends ItemDoor{ public ItemVarietyDoor(Block block) { super(block); } } I've got a block that extends BlockDoor public class BlockVarietyDoor extends BlockDoor{ private String Wood; public BlockVarietyDoor(String wood) { super(Material.wood); this.setStepSound(Block.soundTypeWood); this.setHardness(3.0F); this.disableStats(); Wood = wood; } @Override public ItemStack getPickBlock(MovingObjectPosition target, World world, BlockPos pos, EntityPlayer player) { return new ItemStack(getItem()); } @Override public Item getItemDropped(IBlockState state, Random rand, int fortune) { return state.getValue(HALF) == BlockDoor.EnumDoorHalf.UPPER ? null : getItem(); } public Item getItem(){ return GameRegistry.findItem(VarietyTrees.MODID, Wood+"_door"); } } I've got a blockstates.json "apple_door": http://pastebin.com/E8aqEPJz I've got a block model json "apple_door_bottom": { "parent": "block/door_bottom", "textures": { "bottom": "varietytrees:blocks/door_apple_lower", "top": "varietytrees:blocks/door_apple_upper" } } I've got a block model json "apple_door_bottom_rh": { "parent": "block/door_bottom_rh", "textures": { "bottom": "varietytrees:blocks/door_apple_lower", "top": "varietytrees:blocks/door_apple_upper" } } I've got a block model json "apple_door_top": { "parent": "block/door_top", "textures": { "bottom": "varietytrees:blocks/door_apple_lower", "top": "varietytrees:blocks/door_apple_upper" } } I've got a block model json "apple_door_top_rh": { "parent": "block/door_top_rh", "textures": { "bottom": "varietytrees:blocks/door_apple_lower", "top": "varietytrees:blocks/door_apple_upper" } } What goes in my main class to get this to work properly? I know broadly what needs to go there, I need to register things and renderers, but every time I try, it's wrong
-
[SOLVED] Leaf decay Event or substitute?
Cleverpanda replied to Cleverpanda's topic in Modder Support
Yep. I also saw I can just add my drop to a list there, which is a nice time/memory saver. -
[SOLVED] Leaf decay Event or substitute?
Cleverpanda replied to Cleverpanda's topic in Modder Support
Figured it out. For those viewing after the fact, minecraftforge.event.world.BlockEvent.HarvestDropsEvent does exactly this, it's just not labeled that obviously. -
I'm looking for a way to add a drop to any leaf block in the game when it decays naturally. I've been using minecraftforge.event.world.BlockEvent.BreakEvent to get it to work when they are broken but apparently it does not trigger when leaves decay. I couldn't find an event for this, so i'm looking for something i've missed or a way to do this in every version from 1.7.10 through 1.10.2 (doesn't have to be the same method throughout, whatever works)
-
Mod works in IDE but not as a jar after building??
Cleverpanda replied to Cleverpanda's topic in Modder Support
Just double checked, All my build.gradle files have the recommended version of forge for their respective versions of MC in them. -
Mod works in IDE but not as a jar after building??
Cleverpanda replied to Cleverpanda's topic in Modder Support
Oh gosh..*facepalm* I though he meant my internal mod version.... As in "what mod version is this that you still havent cleaned up your code??" dummy. The problem affects all the versions as far as I can tell. 1.7.10 1.10 1.9.4 1.8.9 Using the current recommended builds of forge for all of them -
Mod works in IDE but not as a jar after building??
Cleverpanda replied to Cleverpanda's topic in Modder Support
1.1 currently. Initial release just two days ago (Because I /thought/ it was fully functional; it was in testing) and a server bugfix. Once I fix this current issue, I'll go back through and clean code and look for optimizations. Still no ideas? I'm unable to get anything else useful to solving the issue still -
Mod works in IDE but not as a jar after building??
Cleverpanda replied to Cleverpanda's topic in Modder Support
No good reason, I just have not cleaned up my code yet... -
Mod works in IDE but not as a jar after building??
Cleverpanda replied to Cleverpanda's topic in Modder Support
Okay. Like I said,I don't know what part of the code you'd like to see, since it works perfectly in Eclipse, so here's the github: https://github.com/cleverpanda/BirdsNests I've got MC versions as branches. I've ran all the jars on another client on a separate computer in my house, and in all the versions, the mod initializes and the item is registered and appears in the creative menu. It is supposed to also drop from leaves, but what it looks like is happening is it spawns in and then the game removes it in the same frame, because i can see a flash of the texture as it pops out but it does not make it to the inventory. Once again, everything works fine in Eclipse...? -
I'm kinda at a loss of how to tackle this one.. I can run my mod in eclipse in all of the versions iv'e made it for and it works as intended. When I build it with gradle (It looks to be buiding the correct src folder) and run it on an instance of minecraft NOT in my IDE, I'll get things like my items don't exist in game, or they do exist but they don't drop from what they're supposed to. any ideas as to what this could be? I'm currently trying to clear my bin folder with the compiled class files and recompile and see if I get different results when I run but now Eclipse won't build my mod??
-
[1.8][Solved] Event Handlers, adding chicken tempt item
Cleverpanda replied to Cleverpanda's topic in Modder Support
Thanks guys, the combination of both of those fixed the issue, ans I was pleasantly surprised when the chicken code worked as well. I moved that print statement into the check for a chicken and it is executing twice per spawn, is this once for server and once for client? Would this mean I should only execute the add AI task for the server to aid performance? -
[1.8][Solved] Event Handlers, adding chicken tempt item
Cleverpanda replied to Cleverpanda's topic in Modder Support
hmm.. I did that and nothing is changed. I wasn't able to get any other info to help debug either. -
[1.8][Solved] Event Handlers, adding chicken tempt item
Cleverpanda posted a topic in Modder Support
I'm trying to get when a chicken is spawned and add an AI task to it so it will accept my item as a tempt item, but I'm having issues with the event handler I think. I've regestered it below: It's a MinecraftForgeevent, I used the MinecraftForge bus, It's called server side; I added a check. But i'm not getting any console output from my code.... What am I doing wrong? @EventHandler public void Init(FMLInitializationEvent event) { if(event.getSide() == Side.SERVER) { System.out.println("Test-Server side"); MinecraftForge.EVENT_BUS.register(ChickenFollowHandler.class); } @SubscribeEvent public void onEntitySpawn(EntityJoinWorldEvent event) { System.out.println("something Spawned!"); if(event.entity instanceof EntityChicken){ EntityChicken chicken = (EntityChicken)event.entity; chicken.tasks.addTask(8, new EntityAITempt(chicken, 1.0D, Corn.kernels, false)); } } } -
[1.8] [SOLVED] Problems generating custom block in village
Cleverpanda replied to Cleverpanda's topic in Modder Support
I don't see how that could be possible, I used that variable to register the block, which has been working as expected for weeks. -
[1.8] [SOLVED] Problems generating custom block in village
Cleverpanda replied to Cleverpanda's topic in Modder Support
Alright so It looks like you're right with that function. I generated my block just fine at a world spawn point. I already know that I can generate other blocks in the dirt patches in the field, so that works too, but I've figured it out, thanks. I wanted to use world.setblockstate originally but I didn't see how I can get the position of the generated village part within addComponentParts() to do so. If youre reading this in the future, it can be done as follows but is not needed BlockPos pos = new BlockPos(this.getXWithOffset(0,0),this.getYWithOffset(0),this.getZWithOffset(0,0)); [solution] function func_175811_a works fine for me, I needed to change how I get my block to Block corn = GameRegistry.findBlock(Corn.MODID, "corn"); Instead of referencing the final instance I had been using in my main class for registration.