Jump to content

[1.12.2] Issues about Model and Collision


Recommended Posts

Posted

Hi. I added thin Block looks like wooden slab or wooden pressure plate in my Mod. However, There are some issue :

  • Block model is not loaded (or not adapted).
  • Block has a larger hit box than appearance.

 

BlockRegisterer.java

  Reveal hidden contents

 

BlockManaita.java

  Reveal hidden contents

 

blockstates\manaita.json

  Reveal hidden contents

 

models\block\manaita_oak.json

  Reveal hidden contents

 

models\block\manaita_birch

  Reveal hidden contents

 

models\block\manaita

  Reveal hidden contents

 

Can anyone tell me why model is not adapted and block has strange collision box?

Posted
  On 2/20/2018 at 4:54 PM, K10 said:
	public static void RegisterBlock(RegistryEvent.Register<Block> e) {
		e.getRegistry().register(manaita);
		e.getRegistry().register(manaita2);
	}

	public static void RegisterItemBlock(RegistryEvent.Register<Item> e) {
		e.getRegistry().register(manaitaItem);
		e.getRegistry().register(manaitaItem2);
	}

 

Expand  

You haven't annotated these methods such that the event bus knows about them.

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

Sorry, I forgot to say that these methods is called from

@SubscribeEvent

public static void OnBlockRegistered(RegistryEvent.Register<Block> e);

@SubscribeEvent

public static void OnItemRegistered(RegistryEvent.Register<Item> e);

Posted
  Quote

Why do some of your class files not have the .java file extension? How does this code even compile?

Expand  

I mistook file name when I create file on github because I didn't know way to drag and drop file at first. I already fixed.

 

  Quote

Problematic code, issue 2.

Expand  

There are not enough document about forge tutorial in Japan, so I have to study old article...

 

  Quote

You are referencing client-only classes (such as Minecraft and ModelLoader) in common code. This will crash on a server, you must encapsulate this using @SidedProxy.

Expand  

Oh, I missed it! I have to add it in my code.

 

  Quote

ModelBakery.registerItemVariants is not needed if you are using ModelLoader.setCustomModelResourceLocation.

Expand  

OK, I see.

 

Thank you for your advices. I hava to rewrite the majority of my codes, so I recreate project and restart from first. I will report and ask later.

  • 2 weeks later...
Posted
  On 3/2/2018 at 7:03 AM, vpontin said:

Use Github Desktop if you have problems using git via command line.

Expand  
  On 9/14/2017 at 8:34 PM, diesieben07 said:

Please don't ever use this crap.

If you want a good Git client, use SourceTree (I don't know GitKraken, never used it) or (even better) use a good IDE (*cough* IntelliJ *cough*) that has built-in Git support.

Expand  

 

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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