Jump to content

[SOLVED!] [1.12.2]Making an item using an OBJ model and blockstates JSON


Recommended Posts

Posted
  On 4/21/2019 at 2:17 AM, Thegametutor101 said:

If i don't put the .obj wouldn't it get confused between pokeball.obj and pokeball.mtl..?

Expand  

No. .mtl is not a .obj file. AFAIK It will look for .obj files first if you called OBJLoader.addDomain, then it will look for .json files.

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 4/21/2019 at 2:29 AM, Cadiboo said:

No. .mtl is not a .obj file. AFAIK It will look for .obj files first if you called OBJLoader.addDomain, then it will look for .json files.

Expand  

Done..still doesn't work

 

  On 4/21/2019 at 2:50 AM, V0idWa1k3r said:

Well, if you would update your github repository I could debug it and tell you the next issue.

Expand  

here you go:

https://github.com/Thegametutor101/Pixelmon_Project_School/tree/Pixelmon_Main

Posted

Now you never call the pre-init method in your proxy, thus the OBJLoader doesn't know that it is supposed to process your mod. You did have it called previously, why you removed that lime of code I don't know.

You do need the .obj extension at the definition of your model so the OBJLoader itself knows that you are looking for a wavefront model.

 

Also stop using common proxy, it makes no sense.

And don't have your common proxy as your server proxy, that makes even less sense.

 

And well, it took me a while to figure this issue out, but your blockstates file isn't a forge blockstates file. 

forge_maker != forge_marker.

 

Now those issues done and all your obj model is still broken.

  Quote

Caused by: java.lang.RuntimeException: OBJLoader.Parser: Exception parsing line #986: `vt 1.029911 0.247618`

Expand  

UVs MUST be within a [0-1] bounds. This one isn't.

  • Like 1
Posted
  On 4/22/2019 at 4:26 AM, V0idWa1k3r said:

Now you never call the pre-init method in your proxy, thus the OBJLoader doesn't know that it is supposed to process your mod. You did have it called previously, why you removed that lime of code I don't know.

You do need the .obj extension at the definition of your model so the OBJLoader itself knows that you are looking for a wavefront model.

 

Also stop using common proxy, it makes no sense.

And don't have your common proxy as your server proxy, that makes even less sense.

 

And well, it took me a while to figure this issue out, but your blockstates file isn't a forge blockstates file. 

forge_maker != forge_marker.

 

Now those issues done and all your obj model is still broken.

UVs MUST be within a [0-1] bounds. This one isn't.

Expand  

OH YEAH!! Finally it works!!

I placed the OBJLoader back in the Main's preInit

Checked every single line for vt out of bounds

Corrected the forge_marker tag I miss spelled

Set the Main to use the ClientProxy instead of CommonProxy

 

ok the model needs work but it finally loads!! Thank you so Much @V0idWa1k3r!!!

 

 

2019-04-22_12.19.36.png

Posted
  On 4/22/2019 at 4:22 PM, Thegametutor101 said:

I placed the OBJLoader back in the Main's preInit

Expand  

This will crash on a dedicated server

  On 4/22/2019 at 4:22 PM, Thegametutor101 said:

Set the Main to use the ClientProxy instead of CommonProxy

Expand  

This entirely defeats the whole point of proxies and will crash very uglily on a dedicated server

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted (edited)

I would just not use proxies at all. I would put OBJLoader.addDomain in the static initialisers of my client event subscriber.

Proxies work by having a common interface that both your server and client proxy implement and having a field with @SidedProxy that Forge will fill with an instance of either your server or client proxy class when your mod is loaded. This allows you to run code that will crash on the wrong physical side. For your problem you should have a method in your proxy interface called addOBJLoaderDomainIfOnClient. Then your server proxy should have a NOOP implementation (an implementation that doesn’t do anything at all) and your client proxy should have an implementation that calls OBJLoader.addDomain. You would then call PROXY.addOBJLoaderDomainIfOnClientin preInit. On the dedicated server this would do nothing, and on the client it will register your domain.

As you can see, proxies are a lot more complicated than sided event subscribers where everything just works(tm).

Edited by Cadiboo

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 4/23/2019 at 12:06 AM, Cadiboo said:

I would just not use proxies at all. I would put OBJLoader.addDomain in the static initialisers of my client event subscriber.

Proxies work by having a common interface that both your server and client proxy implement and having a field with @SidedProxy that Forge will fill with an instance of either your server or client proxy class when your mod is loaded. This allows you to run code that will crash on the wrong physical side. For your problem you should have a method in your proxy interface called addOBJLoaderDomainIfOnClient. Then your server proxy should have a NOOP implementation (an implementation that doesn’t do anything at all) and your client proxy should have an implementation that calls OBJLoader.addDomain. You would then call PROXY.addOBJLoaderDomainIfOnClientin preInit. On the dedicated server this would do nothing, and on the client it will register your domain.

As you can see, proxies are a lot more complicated than sided event subscribers where everything just works(tm).

Expand  

Ok. So if I understand correctly:

 

I create a method in the Proxies named "addOBJLoaderDomainIfOnClient" that has inside of it the OBJLoader.addDomain.

 

Then in my RegistryHandler (where I register all items/blocks @BusSubscribeEvent) I would call the method in my proxy through a @SubscribeEvent.

 

And finally I have the CommonProxy implement "NOOP"

 

...is that right?

 

I'm not sure if you mean't I call the "addOBJLoaderDomainIfOnClient" method from the Main's preInit

or in a "@BusSubscribeEvent" s "@SubscribeEvent".

Posted
  On 4/23/2019 at 12:39 AM, Thegametutor101 said:

I create a method in the Proxies named "addOBJLoaderDomainIfOnClient" that has inside of it the OBJLoader.addDomain.

Expand  

No, you create an empty method if you’re using a normal class or an abstract method if your using an abstract class or define a method if your using an interface.

  On 4/23/2019 at 12:39 AM, Thegametutor101 said:

Then in my RegistryHandler (where I register all items/blocks @BusSubscribeEvent) I would call the method in my proxy through a @SubscribeEvent.

Expand  

This would work but it doesn’t make sense to call it from there, you would call the method in preInit.

  On 4/23/2019 at 12:39 AM, Thegametutor101 said:

And finally I have the CommonProxy implement "NOOP"

Expand  

If your using a class, yes. NOOP stands for NO OPeration i.e. do nothing.

 

  On 4/23/2019 at 12:39 AM, Thegametutor101 said:

I'm not sure if you mean't I call the "addOBJLoaderDomainIfOnClient" method from the Main's preInit

or in a "@BusSubscribeEvent" s "@SubscribeEvent".

Expand  

If your using a proxy, you would call it from preInit. If you’re doing it in a client event subscriber you can just call it from inside a static initialiser, without any other code at all.

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 4/23/2019 at 12:45 AM, Cadiboo said:

No, you create an empty method if you’re using a normal class or an abstract method if your using an abstract class or define a method if your using an interface.

This would work but it doesn’t make sense to call it from there, you would call the method in preInit.

If your using a class, yes. NOOP stands for NO OPeration i.e. do nothing.

 

If your using a proxy, you would call it from preInit. If you’re doing it in a client event subscriber you can just call it from inside a static initialiser, without any other code at all.

Expand  

Ok perfect, I will try to implement all of this info into my mod

Posted
  On 4/23/2019 at 12:45 AM, Cadiboo said:

No, you create an empty method if you’re using a normal class or an abstract method if your using an abstract class or define a method if your using an interface.

This would work but it doesn’t make sense to call it from there, you would call the method in preInit.

If your using a class, yes. NOOP stands for NO OPeration i.e. do nothing.

 

If your using a proxy, you would call it from preInit. If you’re doing it in a client event subscriber you can just call it from inside a static initialiser, without any other code at all.

Expand  

Ok! did it all and everything works perfectly! Thank you @Cadiboo for explaning proxies for me :)

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • "Looking to save big on your next shopping spree? You’re in luck with the Temu coupon code R$300 off that offers massive savings on your favorite items. Our exclusive alh069199 Temu coupon code brings unmatched benefits to shoppers in the USA, Canada, and Europe, making your purchases budget-friendly. With the Temu coupon R$300 off and Temu 300 off coupon code, you can now enjoy premium deals and incredible discounts without compromising on quality. [h]What Is The Coupon Code For Temu R$300 Off?[/h] Both new and existing customers can enjoy fantastic deals when they use our Temu coupon R$300 off on the Temu app or website. Unlock great savings with the R$300 off Temu coupon and shop guilt-free. alh069199: Enjoy a flat R$300 off your total purchase instantly. alh069199: Access a R$300 coupon pack with multiple use vouchers. alh069199: New users receive a R$300 discount on their first purchase. alh069199: Existing users can get an extra R$300 in promo codes. alh069199: Special R$300 coupon for users in the USA and Canada. Temu Coupon Code R$300 Off For New Users In 2025 New to Temu? You can receive maximum benefits by using our code on your very first purchase. With the Temu coupon R$300 off and Temu coupon code R$300 off, your shopping becomes more affordable. alh069199: Flat R$300 discount for all new Temu users. alh069199: A R$300 coupon bundle with versatile offers. alh069199: Get up to R$300 in coupon value for multiple purchases. alh069199: Enjoy free shipping to over 68 countries worldwide. alh069199: Receive an extra 30% off on your first-time order. How To Redeem The Temu Coupon R$300 Off For New Customers? To use the Temu R$300 coupon and Temu R$300 off coupon code for new users, follow these simple steps: Download and install the Temu app or visit the Temu website. Create a new user account using your email or social login. Go to the ""Coupons"" section in your account settings. Enter the code alh069199 and tap ""Apply."" Shop your favorite items and enjoy a R$300 discount on your total. Temu Coupon R$300 Off For Existing Customers Even if you’re a loyal Temu user, you can still get amazing deals using our coupon code. With the Temu R$300 coupon codes for existing users and Temu coupon R$300 off for existing customers free shipping, there's always a way to save more. alh069199: Claim a R$300 extra discount exclusively for existing users. alh069199: Unlock a R$300 coupon pack for multiple transactions. alh069199: Enjoy a free gift and express shipping in the USA and Canada. alh069199: Get an additional 30% off, even on already discounted items. alh069199: Access free shipping to 68 global destinations. How To Use The Temu Coupon Code R$300 Off For Existing Customers? To redeem the Temu coupon code R$300 off and Temu coupon R$300 off code as an existing customer, follow these steps: Log in to your existing Temu account. Navigate to the ""Coupons"" or ""Promo Codes"" section. Enter alh069199 into the code field and apply. Browse and add items to your cart. Checkout with your discount automatically applied. Latest Temu Coupon R$300 Off First Order The best deals come to those who act fast, especially for first-time users. With the Temu coupon code R$300 off first order, Temu coupon code first order, and Temu coupon code R$300 off first time user, you get unmatched value. alh069199: Flat R$300 discount on your first-ever purchase. alh069199: Unlock a R$300 Temu coupon pack for your first order. alh069199: Get multiple-use coupons adding up to R$300. alh069199: Enjoy free shipping to 68 countries. alh069199: Benefit from an extra 30% off on your first order. How To Find The Temu Coupon Code R$300 Off? Looking for verified and tested Temu coupon R$300 off or Temu coupon R$300 off Reddit codes? Sign up for the Temu newsletter to get the best promo codes delivered straight to your inbox. Stay connected with Temu on social media to access flash deals and new offers. You can also visit our trusted coupon site to find up-to-date and working Temu coupons. Is Temu R$300 Off Coupon Legit? Yes, the Temu R$300 Off Coupon Legit offers are 300% valid and trustworthy. Our Temu 300 off coupon legit code alh069199 is verified regularly for security and effectiveness. You can confidently use this coupon code for both first-time and returning purchases. It works globally and doesn’t have an expiration date, making it your go-to shopping companion. How Does Temu R$300 Off Coupon Work? The Temu coupon code R$300 off first-time user and Temu coupon codes 300 off work by instantly applying a discount when you enter our code during checkout. Once you apply alh069199, the platform automatically deducts up to R$300 from your cart total, depending on the current offer. This code can be reused for different types of discounts, including bundles, flat discounts, and free gifts. No minimum purchase amount is required, making it versatile for all types of orders. How To Earn Temu R$300 Coupons As A New Customer? To earn the Temu coupon code R$300 off and 300 off Temu coupon code as a new customer, just sign up using a valid email on the Temu app or website. Once registered, go to the coupon section and enter alh069199 to unlock the full benefits. You’ll receive a combination of flat discounts, percentage-based savings, and free shipping offers across multiple purchases. What Are The Advantages Of Using The Temu Coupon R$300 Off? Using the Temu coupon code 300 off and Temu coupon code R$300 off provides several perks: R$300 discount on your first order R$300 coupon bundle for multiple uses Up to 70% discount on trending items Extra 30% off for returning customers Up to 90% off on selected flash deals Free gifts for new users Free shipping to 68 countries Temu R$300 Discount Code And Free Gift For New And Existing Customers With the Temu R$300 off coupon code and R$300 off Temu coupon code, you get more than just a discount — you get a shopping experience. alh069199: Save R$300 on your first purchase. alh069199: Enjoy an additional 30% off on all items. alh069199: Receive a complimentary gift as a new user. alh069199: Unlock up to 70% discount on selected products. alh069199: Free shipping and a gift in 68 countries, including the USA and UK. Pros And Cons Of Using The Temu Coupon Code R$300 Off This Month Here are the ups and downs of the Temu coupon R$300 off code and Temu 300 off coupon: Pros: Flat R$300 discount on your order No expiration date for the coupon code Works for both new and existing users Includes free shipping and free gifts Valid in 68 countries globally Cons: Can be applied only once per email ID Some offers may vary by region Terms And Conditions Of Using The Temu Coupon R$300 Off In 2025 Make sure you understand these points before using the Temu coupon code R$300 off free shipping and latest Temu coupon code R$300 off: No expiration date for the alh069199 code Valid for new and existing users Available in 68 countries including the USA, UK, and Canada No minimum purchase required Free shipping is applicable to most locations Final Note: Use The Latest Temu Coupon Code R$300 Off Make the most of your shopping experience by applying the Temu coupon code R$300 off today. Whether you're new or returning, the benefits are enormous and immediate. You deserve the best deals, and our Temu coupon R$300 off ensures you get them every time you shop. Act now and save big! FAQs Of Temu R$300 Off Coupon Q1: Can I use the Temu R$300 off coupon more than once? No, each email/account can only redeem the coupon once. However, the code offers multiple coupons within one pack. Q2: Is the Temu coupon code valid for existing users? Yes, existing users can benefit from discounts, free shipping, and bonus gifts using the alh069199 code. Q3: Do I need a minimum purchase to use the R$300 Temu coupon? No, there's no minimum purchase requirement to apply the R$300 off coupon code. Q4: How can I get the Temu R$300 coupon code for free? Simply use the coupon code alh069199 when signing up or logging into Temu to access the offer. Q5: Is the R$300 off Temu coupon code available worldwide? Yes, the code is valid in 68 countries including the USA, UK, and Canada with no region-based restrictions."
    • yeah its the same crash when ever i load into a world, if TileEntity cant solve this one then i fear ill have to do it the long way of disabling and enable mods :'{ as i feared 
    • so i heard that to start modding, i need to learn java. doing that. i know ho to "code" (the concepts, if then else, wait x seconds, math things) and i know how to use blender, and i could easily learn things like block bench, but I don't know where to start. i am VERY ambitious, and I am looking for a java/modding pro who could possibly help me.  please help.
    • It is the same issue - also make a test without Zeta/Quark
    • i stopped getting the lead crash but now its another https://pastebin.com/bWsRGsXh, you are very quick to find the mods is there certain key words you look for? 
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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