Jump to content

Recommended Posts

Posted

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

 

  Reveal hidden contents

 

 

Blocks class

 

  Reveal hidden contents

 

 

blockstate "coe_gate_stone.json"

 

  Reveal hidden contents

 

 

model files (4 of them - names the same as in the blockstate)

 

  Reveal hidden contents

 

Posted

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);

 

}

Posted
  Quote
// This

"parent": "block/fence_gate_open",

// and

"parent": "block/fence_gate_closed",

// Don't exist in vanilla 1.10

 

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?

Posted

registry name is used as a lookup for the blockstate file.

 

If the registry name is set as "asdfqwer123" then it will look in assets/yourmodid/blockstates/ for a file named "asdfqwer1234.json"

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
  Quote
Copy the fence gates files from vanilla into your mod. Then extends your mod fence gate files instead of the vanilla fence gate files

 

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:

 

  Reveal hidden contents

 

 

 

 

Further Edit - having looked back through the forums the same problem was already discussed.

I changed the blockstate to:

 

  Reveal hidden contents

 

 

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?

 

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • My name is Richie Leo, and I’m sharing this message with a heart full of gratitude and hope. Several months ago, I was a victim of a devastating online scam that cost me a staggering $873,463. I was devastated, confused, and had nearly given up on ever recovering my money — until I came across Wizard George Cyber Service. Through their exceptional cyber recovery expertise and deep investigative skills, Wizard George and his team were able to trace, track, and recover the full amount that was stolen from me. Their professionalism, speed, and transparency truly amazed me. If you’re reading this and you’ve been scammed — whether it’s crypto, investment fraud, or any kind of online theft — don’t give up. I strongly recommend reaching out to Wizard George Cyber Service. 📧 Em: wizardgeorgecyberservice(AT) g m a l L. C o M
    • Alright, here is the log file https://mclo.gs/5eCwafV
    • Please read the FAQ (https://forums.minecraftforge.net/topic/125488-rules-and-frequently-asked-questions-faq/) and post log files as described there, using a site such as https://mclo.gs/ and post the link here.  
    • I tried updating the mods in my modpack which caused incompatibilities so i have tried to revert them back to their older versions i was using before. In the logs it doesnt show me any clear incompatibilities except for tfmg & entity texture features, but when i try to remove those it still doesn't work. I have tried removing the forge-client.toml file which was a suggestion i found on  a few other posts. This is the log file i get. [inline log removed] Any help would be appreciated. Thanks in advance
    • I don't use KubeJS, never even heard of it. But after doing what "Ugdhar" suggested earlier in this post with the "config/Mekanism/generator-storage.toml", I tried going into an individual save's serverconfig folder, and just deleting everything except the parcool folder (I have that mod installed.) Then, a bit of loading and temporary freezing later, seems to have worked. Even when quitting to menu and loading back in, or also when quitting to menu, exiting to desktop, and re-launching MC, choose a save and loading it.
  • Topics

×
×
  • Create New...

Important Information

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