
jjattack
Members-
Posts
14 -
Joined
-
Last visited
Everything posted by jjattack
-
I'm going to move onto slabs which i have been avoiding... although something tells me there has to be a work around for this, either by duping the vanilla class blocks into believing the new ones are acceptable blocks or, maybe, doing something in the subscribe placeblock event. I don't know java very well obviously, but it doesn't seem an overly complex thing to do in terms of things it can do. I'l mark this as unresolved for now.
-
No, it works fine with my new blocks, but they aren't compatible with the vanilla blocks in minecraft. The code that makes them connect is only in the extended fence wall and gate classes. The original fences/walls/gates classes therefore don't connect. I'm grasping at straws, and i really don't know the lingo as you are about to see but could there be a way to detect the blocks neighbor and send it a false message? I.e. If neighbor is VanillaFence - pass argument that it is also a Vanilla Fence? ... or something like that lol.
-
Not sure if what I want to happen is possible or not, so here's an attempt at explaining. The Wall Class: So, i need to be able to reproduce the behaviour of for the Vanilla fences, walls and fence gates as it is in the modded versions. I'm going to guess you can't change vanilla block behavior in this way? If not, would it be possible to add code into the wall class that would detect if the neighbor was a vanilla gate/wall and give it access that way?
-
I copied BlockFenceGate to create the BasicFenceGate class, although i changed it's constructor from accepting BlockPlanks.EnumType to Material and MapColor. I tried to create a direct copy of fence, and then extend that, although that produces no different results. I guess the real question should be asking is how to extend BlockFenceGate correctly, although the fact the item model shows up in game correctly suggests the blockstate may be wrong after all. I really have no clue lol. Edit: Also, I register the models in the proxies: Further Edit - having looked back through the forums the same problem was already discussed. I changed the blockstate to: and it all works. Thanks MCrafterzz for your old post! Further further edit: Getting it to work with my walls and fences however is a different story, and it looks as though I will need to do the same with the wall class as with the fence gate. Is this the preferable method of adding new variants of existing blocks then, rather than extending the base files? I have this code in my wall class, is it possible to have something which would make neighboring blocks have the same effect? allowing you to have vanilla fences/walls work with new ones? Or is there another way?
-
Sorry for bumping, but i'm no closer to figuring it out. The blockstate should work as far as i can tell. Not sure where its gone wrong.
-
That could be problematic... although the files do exist in the minecraft models folder, I made a copy of what was in them, renamed and linked the model files to the new ones, but that didn't work either. I don't quite understand how the json links to the code, other than the name. Is there any information on this anywhere?
-
I forgot the interface which it uses. I'm probably missing something obvious, although the models work on the fences walls and stars which are registered the same way. import net.minecraft.item.Item; public interface ItemModelProvider { void registerItemModel(Item item); }
-
Hi all, I am fairly new to forge and have been working things out slowly with stairs, fences and walls, but cannot get fence gates to work at all. I was unable to find a work around to extend BlockFence, so I have a copy of it (almost) extending BlockHorizontal, which i'm pretty sure is wrong to begin with.. however, it is working in game as an item showing the correct texture , but when placing it it only appears as a pink and black box. No matter how many times i go over the blockstate and model jsons i cant find any faults with them, so the error must be in the code which I just don't understand enough of to figure out. Any help would be greatly appreciated So here it is: BasicFenceGate class Blocks class blockstate "coe_gate_stone.json" model files (4 of them - names the same as in the blockstate)