Posted April 2, 20178 yr Hello, I'm trying to create a custom door (ie, a vanilla door with a different texture). Here's my code. Basically, I created a new class called ModBlockDoor that extends the vanilla BlockDoor. The project compiles perfectly, and runs without a hitch. The only problem is that in game, when I place the door, it only places the bottom of the door. The top doesn't get place at all (I know because I'm able to jump over the bottom of the door). Can anyone let me know how to fix this? I figure I'd need to override some functions in my class, but I'm not sure which ones. Also, do I need a door item? It seems to work without it?
April 2, 20178 yr The door item is the thing that places both blocks of the door - so yes, you need it and it is the solution to your problem.
April 2, 20178 yr Author I found what I was doing wrong. You can't register a block and an ItemBlock with the same name. So I have an item now that successfully places a door. I just need to find out how to make the texture show up. Thanks, Edited April 2, 20178 yr by DragonFerocity ....
April 2, 20178 yr 26 minutes ago, DragonFerocity said: Does this mean that I don't need an ItemBlock for a door? Just a block and an item? Yes. If you registered an itemblock with your door, that would mean you could place the top/bottom parts independently, which wouldn't make any sense. 26 minutes ago, DragonFerocity said: Is there a way to register items and blocks independently with the same name? As you state, you can already do this. An ItemBlock is just an Item that places a block when right clicked. It is not a block. You are crashing because you are setting the registry name of your ItemBlock to the same registry name as your Door placer.
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.