Jump to content

Recommended Posts

Posted
  On 5/4/2017 at 6:27 PM, Sawii00 said:

Exception loading model for variant food:stove#inventory for item "food:stove"

<snip>

Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
    at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78)

Expand  

Looks like you neglected to provide an "inventory" variant.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted
  On 5/4/2017 at 7:35 PM, Draco18s said:

1) use spoiler and code tags, not images and a copy paste dump

2) your item model is missing or improperly registered (READ the error, particularly the not where it says "File Not Found")

Expand  

Ok, I see it's looking for my model in the Item folder, but I do not understand why. I did not set anything...

Posted
  On 5/4/2017 at 10:25 PM, Sawii00 said:

Ok, I see it's looking for my model in the Item folder, but I do not understand why. I did not set anything...

Expand  

By default an ItemBlock (that's the item that places the block, the thing you have in your inventory) looks for either an "inventory" variant in the blockstates file, or a model file in the item folder.

Posted
  On 5/4/2017 at 10:38 PM, Jay Avery said:

By default an ItemBlock (that's the item that places the block, the thing you have in your inventory) looks for either an "inventory" variant in the blockstates file, or a model file in the item folder.

Expand  

mhh, makes sense i guess. I understand the itemBlock, but should't the block render at least? or is it all linked?

Posted

No, the block and item rendering is separate, so the ItemBlock problem shouldn't interfere with the placed block. What did your blockstates file look like when you used only textures and said it worked?

Posted
  On 5/4/2017 at 10:45 PM, Jay Avery said:

No, the block and item rendering is separate, so the ItemBlock problem shouldn't interfere with the placed block. What did your blockstates file look like when you used only textures and said it worked?

Expand  

I wasn't using any model, I'll replicate and post it in a minute

Posted
  On 5/2/2017 at 10:53 PM, Sawii00 said:

perfect, I'll try that too. For now this method works because I have just one Item I want to check, but Is there a way to add the pan (or any other item that goes in that single slot) inside a recipe? I that case I would not have to check for the content of the slot but I would just check the whole recipe. I will have probably to change the addRecipe method so that I can consider that extra slot.

Expand  

One option would be to add that slot to your recipe implementation.

An alternative would be to add a wrapper around your recipe that checks the item in the slot, then passes off the matching to the wrapped recipe. That way you can take full advantage of any normal crafting recipe (shaped, shapeless, oredictionary, custom).

Posted
  On 5/4/2017 at 11:56 PM, Alpvax said:

One option would be to add that slot to your recipe implementation.

An alternative would be to add a wrapper around your recipe that checks the item in the slot, then passes off the matching to the wrapped recipe. That way you can take full advantage of any normal crafting recipe (shaped, shapeless, oredictionary, custom).

Expand  

Mh... I think i'll have to study a little more before doing that. I have no idea how to do what you suggested yet.

Posted

Ok, I fixed my problems. I just followed a couple of tutorials and changed the layout of my blockstate. I also worked on the rendering and it is working pretty well.

Posted

Hi, I am proceeding with some more advanced and cool stuff. I am now working on a system where food decays if it is kept in fresh air, and to prevent that you need to place if in a fridge (custom block I made). When the food is rotten, its gonna give almost no food and it poisons the player. My question is: what method can I use to check if it is in that fridge ( it is basically a simple chest (for now)). 

Posted
  On 5/12/2017 at 11:47 PM, Sawii00 said:

what method can I use to check if it is in that fridge ( it is basically a simple chest (for now)). 

Expand  

It's impossible to get the container the item is contained within the Item class. It should be implemented in the container.

It'll be hard to implement rotting in other containers, as you'd better not access all of them every tick. Also there is an issue with items in unloaded TileEntity. So you need to invent your own solution with that.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted
  On 5/13/2017 at 1:52 AM, Abastro said:

It's impossible to get the container the item is contained within the Item class. It should be implemented in the container.

It'll be hard to implement rotting in other containers, as you'd better not access all of them every tick. Also there is an issue with items in unloaded TileEntity. So you need to invent your own solution with that.

Expand  

I mean, if I can find a way to check the container the item is in, I can just say (if it is not in the fridge) --> rots. This rotten thing is just a variable slowly decreasing its value

Posted
  On 5/13/2017 at 1:57 PM, Sawii00 said:

I mean, if I can find a way to check the container the item is in

Expand  

It's impossible unless you check for every containers every tick.

Also there are unloaded chests and tiles, mod-added bags, and such. You can't just rot those items continuously.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted
  On 5/13/2017 at 2:02 PM, Abastro said:

It's impossible unless you check for every containers every tick.

Also there are unloaded chests and tiles, mod-added bags, and such. You can't just rot those items continuously.

Expand  

I guess you are right! Did not think of that.... I'm so pissed off right now. I had cool ideas.

Posted

You're not the first person to have this idea.

 

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 (edited)
  On 5/13/2017 at 2:02 PM, Abastro said:

It's impossible unless you check for every containers every tick.

Also there are unloaded chests and tiles, mod-added bags, and such. You can't just rot those items continuously.

Expand  

I'm a n00b, and these might be really stupid suggestions. Tell me so, please, because I'd like to learn why these wouldn't work. :)

(Also, Java is not my native programming language, so forgive my logo-ish pseudo-code.)

 

1.a. You wouldn't have to check every inventory at every tick. You only need to check when you open that inventory.

You'd need to keep track of what tick the inventory was last opened at and subtract it from the current tick to figure out how likely the food inside is to be rotten. You could also choose whether or not to run the more specific "is it rotten?" check at all, based on how long it's been.

1.b. Even more specifically (and may be overkill/over complication), you don't have to add an inventory to the list of "needs food-rot-checking" if you don't put any food in a particular chest. When you add food to a chest, add the chest to the list; when you open a chest, check it against that list. When you close the chest, check if it should still be on that list (which should return false if there is no fresh food).

 

2. Each food item doesn't need to keep track of its own ticks. Just give it a probability to run for each tick (or bunch of ticks) since the last time it was checked.

ie:

set (days_variable) ((time since last check) / 24000)

if days_variable >= 1 (

repeat * (days_variable) (

if random 100 < 33 (set food_freshness (rotten))

))

 

3. Whittling down the things you need to check even more, you only need to check if food has gone rotten if its last known state was fresh. You probably don't need to go so far as making this it's own sub-list, but maybe you do.

 

 

(Thanks, Schrodinger.)

Edited by T.S.White
  • Like 1
Posted

Actually there must be a way. I just remebered that the MInechem does have something similar for radioactive elements. They decay when outside and "freeze" in the lead chest. Sadly it is not up to date with 1.11 so I cannot find how they did it.. I'll keep looking.

Posted

I created an item decay system. It uses a capability which stores the world time that the item was created, then any time the decay status needs to be checked the age is calculated using the current time. I haven't (yet) done anything with special containers that affect the rate of decay though, it would probably need a bit of an overhaul to my current system. The code is on github if anyone wants to see anyway.

Posted
  On 5/13/2017 at 4:39 PM, Jay Avery said:

I created an item decay system. It uses a capability which stores the world time that the item was created, then any time the decay status needs to be checked the age is calculated using the current time. I haven't (yet) done anything with special containers that affect the rate of decay though, it would probably need a bit of an overhaul to my current system. The code is on github if anyone wants to see anyway.

Expand  

Wow! I'll study that! I have not studied capabilities yet, but I'll try to understand it quickly. Thanks

Posted (edited)

@T.S.White, yes that works. That's what I mean by 'your own solution'. It means you need to design some system for that.

EDIT: You need to be careful, as it could be easily messed up and many issues can arise.

Edited by Abastro

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

Other considerations:

 

If any players use creative mode, then they might set time to zero as a way to move the sun to sunrise. That'll foul your time-keeping.

 

Also: Time can roll over. Its design only needs to cover a cycle of moon phases; I don't know how much larger its range might be.

 

Before relying on the tick-counter for long-term aging, you should look at its range and decide what to do if time ever appears to have gone backward.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

World#totalWorldTime is always accurate (it only increases, it never decreases), except for the /time command.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • But your Launcher does not find it   Java path is: /run/user/1000/doc/3f910b8/java Checking Java version... Java checker returned some invalid data we don't understand: Check the Azul Zulu site and select your OS and download the latest Java 8 build for Linux https://www.azul.com/downloads/?version=java-8-lts&package=jre#zulu After installation, check the path and put this path into your Launcher Java settings (Java Executable)
    • Try other builds of pehkui and origins++ until you find a working combination
    • Some Create addons are only compatible with Create 6 or Create 5 - so not both versions at the same time Try older builds of Create Stuff and Additions This is the last build before the Create 6 update: https://www.curseforge.com/minecraft/mc-mods/create-stuff-additions/files/6168370
    • ✅ Crobo Coupon Code: 51k3b0je — Get Your \$25 Amazon Gift Card Bonus! If you’re new to Crobo and want to make the most out of your first transaction, you’ve come to the right place. The **Crobo coupon code: 51k3b0je** is a fantastic way to get started. By using this code, you can unlock an exclusive **\$25 Amazon gift card** after completing your first eligible transfer. Let’s dive deep into how the **Crobo coupon code: 51k3b0je** works, why you should use it, and how to claim your reward. --- 🌟 What is Crobo? Crobo is a trusted, modern platform designed for **international money transfers**. It offers fast, secure, and low-cost transactions, making it a favorite choice for individuals and businesses alike. Crobo is committed to transparency, low fees, and competitive exchange rates. And with promo deals like the **Crobo coupon code: 51k3b0je**, it becomes even more attractive. Crobo focuses on providing customers with: * Quick transfer speeds * Minimal fees * Safe, encrypted transactions * Great referral and promo code rewards When you choose Crobo, you’re choosing a platform that values your time, money, and loyalty. And now with the **Crobo coupon code: 51k3b0je**, you can start your Crobo journey with a **bonus reward**! ---# 💥 What is the Crobo Coupon Code: 51k3b0je? The **Crobo coupon code: 51k3b0je** is a **special promotional code** designed for new users. By entering this code during signup, you’ll be eligible for: ✅ A **\$25 Amazon gift card** after your first qualifying transfer. ✅ Access to Crobo’s referral system to earn more rewards. ✅ The ability to combine with future seasonal Crobo discounts. Unlike generic promo codes that just offer small fee reductions, the **Crobo coupon code: 51k3b0je** directly gives you a tangible, valuable reward — perfect for online shopping or gifting. --- ### 🎯 Why Use Crobo Coupon Code: 51k3b0je? There are many reasons why users choose to apply the **Crobo coupon code: 51k3b0je**: 🌟 **Free bonus reward** — Your first transfer can instantly earn you a \$25 Amazon gift card. 🌟 **Trusted platform** — Crobo is known for secure, fast, and affordable transfers. 🌟 **Easy to apply** — Simply enter **Crobo coupon code: 51k3b0je** at signup — no complicated steps. 🌟 **Referral opportunities** — Once you’ve used **Crobo coupon code: 51k3b0je**, you can invite friends and earn more rewards. 🌟 **Stackable savings** — Pair **Crobo coupon code: 51k3b0je** with Crobo’s ongoing offers or holiday deals for even more benefits. --- ### 📝 How to Use Crobo Coupon Code: 51k3b0je Getting started with **Crobo coupon code: 51k3b0je** is quick and easy. Just follow these steps: 1️⃣ **Download the Crobo app** (available on Google Play Store and Apple App Store) or visit the official Crobo website. 2️⃣ **Start the sign-up process** by entering your basic details (name, email, phone number, etc.). 3️⃣ When prompted, enter **Crobo coupon code: 51k3b0je** in the promo code or coupon code field. 4️⃣ Complete your first transaction — be sure to meet the minimum amount required to qualify for the reward (usually specified in Crobo’s promo terms). 5️⃣ After the transaction is verified, receive your **\$25 Amazon gift card** directly via email or within your Crobo account. --- ### 💡 Tips to Maximize Your Crobo Coupon Code: 51k3b0je Bonus 👉 **Transfer the minimum qualifying amount or more** — this ensures you meet the conditions for the gift card. 👉 **Refer friends after your signup** — Crobo allows users who’ve signed up with codes like **Crobo coupon code: 51k3b0je** to share their own code for extra bonuses. 👉 **Check for additional Crobo promotions** — sometimes Crobo offers seasonal or regional deals that stack with the coupon code. 👉 **Complete your transaction soon after signup** — many bonuses have time limits, so act quickly! --- ### 🚀 Frequently Asked Questions about Crobo Coupon Code: 51k3b0je **Q: Can I use Crobo coupon code: 51k3b0je if I already have a Crobo account?** A: No — the **Crobo coupon code: 51k3b0je** is intended for **new users only**. It must be applied during the initial registration process. --- **Q: How long does it take to get the \$25 Amazon gift card after using Crobo coupon code: 51k3b0je?** A: Typically, the gift card is sent **within a few business days** after your first qualifying transfer is completed and verified. --- **Q: Are there hidden fees when using Crobo coupon code: 51k3b0je?** A: No — Crobo is transparent about its fees. The **Crobo coupon code: 51k3b0je** simply adds a bonus reward without increasing your costs. --- **Q: Can I combine Crobo coupon code: 51k3b0je with other promo codes?** A: The **Crobo coupon code: 51k3b0je** is generally applied as a standalone signup bonus. However, Crobo often offers **ongoing promotions** that may apply to future transactions. ---  📌 Reference Crobo promo code: {51k3b0je} Crobo discount code: {51k3b0je} --- # 🌍 Final Thoughts If you want to enjoy safe, fast, and affordable money transfers with an added bonus, **Crobo coupon code: 51k3b0je** is your best option. Not only will you experience excellent service, but you’ll also earn a **\$25 Amazon gift card** — a reward that you can use immediately for shopping or gifts. 👉 **Don’t wait — sign up today using Crobo coupon code: 51k3b0je and claim your bonus!**
  • Topics

×
×
  • Create New...

Important Information

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