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

    • I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com   I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com
    • There is an issue with Modular Force Field System (mffs) Remove it or try other builds
    • I never imagined I would be writing this kind of testimony, but I feel it’s important to share my experience with Malice Cyber Recovery and how they helped me recover $230,000 I lost to crypto scammers. A few months ago, I got involved in a crypto investment opportunity that seemed legitimate at first. The scammers were incredibly convincing. They showed me impressive returns, sent regular updates, and even gave me access to what looked like a real trading platform. I was initially cautious, but after seeing the returns, I began to invest more, ultimately transferring over $230,000. Unfortunately, after a few weeks, when I tried to withdraw my funds, I found that the platform had disappeared, and I could no longer contact anyone involved. It was clear I had been scammed, and I felt completely helpless. For weeks, I tried everything to get my money back—contacting the authorities, reaching out to the platform’s so-called support team (who of course were unreachable), and trying to trace the transactions myself. But everything led to dead ends. The more I researched, the more I realized just how hard it was to recover stolen crypto. I began to lose hope. That’s when I came across Malice Cyber Recovery. At first, I was skeptical. Could they really help me recover my funds after everything I had been through? I decided to reach out anyway, just to see if they could offer any guidance. From the very first conversation, their team was not only professional but also deeply empathetic. They understood exactly how I was feeling and immediately made it clear that they were dedicated to helping me recover my lost funds. Malice Cyber Recovery’s team got to work quickly. They walked me through every step of the process, explaining the methods they would use to track down my stolen crypto. Their knowledge of blockchain technology and how to trace crypto transactions was incredibly impressive. They didn’t just give me vague promises they showed me the action they were taking and the progress they were making, which gave me hope that my money wasn’t gone forever. One of the most reassuring aspects of working with Malice Cyber Recovery was their transparency. They kept me updated regularly, letting me know what they were doing, what obstacles they encountered, and how they were overcoming them. It wasn’t an easy process; tracing funds through blockchain and dealing with scammers who hide behind fake identities and complex networks is incredibly difficult. But Malice Cyber Recovery’s team was relentless. They used advanced tools and techniques to trace the flow of my funds, and within just a few weeks, they managed to locate a significant portion of my lost funds. I couldn’t believe it when they informed me that they had successfully recovered a large chunk of my money. I never thought I’d see that $230,000 again. The recovery process wasn’t instantaneous it  took time, patience, and persistence but Malice Cyber Recovery delivered on their promise.  
    • Almost, just the java -server -Xmx4G -Xms4G -Dlog4j.configurationFile=log4jformattingfix.xml -jar forge-1.12.2-14.23.5.2860.jar nogui and if that doesn't work, try java --version
    • What so just copy and paste " java -server -Xmx4G -Xms4G -Dlog4j.configurationFile=log4jformattingfix.xml -jar forge-1.12.2-14.23.5.2860.jar nogui Pause >nul " into a cmd terminal? If that's what you mean, nothing happens
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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