Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[UNSOLVED][1.10.2]Need help with TESR and tileentity item


Leomelonseeds
 Share

Recommended Posts

Thanks! Just a question, I set a boolean isBurning for my Grill, which sets the texture to the burning texture when it's burning. The problem is, when I place 2 grills, the texture doesn't show for anyone of them if one of them is not burning, and one is.

Apparently I'm addicted to these forums and can't help but read all the posts. So if I somehow help you, please click the "Like This" button, it helps.

Link to comment
Share on other sites

Ok ok... I will do it, and for IStateMapper, I just create a new class(like Draco18s') and implement it with ModelLoader.setCustomStateMapper in ClientProxy.preInit()?

 

The class implements it. setCustomStateMapper registers it.

But yes.

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.

Link to comment
Share on other sites

You need to ask the te if it is burning. If it is for the inventory, then it will always be false, no?

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.

Link to comment
Share on other sites

Where are you checking for isBurning right now, and how?

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.

Link to comment
Share on other sites

Here is my Grill update method(Not BlockGrill):

@Override
public void update() {
	// If there is nothing to smelt or there is no room in the output, reset cookTime and return
	if (canSmelt()) {
		BlockGrill.isBurning = true;
		int numberOfFuelBurning = burnFuel();

		// If fuel is available, keep cooking the item, otherwise start "uncooking" it at double speed
		if (numberOfFuelBurning > 0) {
			cookTime += numberOfFuelBurning;
		}	else {
			cookTime -= 2;
		}

		if (cookTime < 0) cookTime = 0;

		// If cookTime has reached maxCookTime smelt the item and reset cookTime
		if (cookTime >= COOK_TIME_FOR_COMPLETION) {
			smeltItem();
			cookTime = 0;
		}
	}	else {
		cookTime = 0;
		BlockGrill.isBurning = false;
	}

}

I copied some MInecraftByExample code.

Apparently I'm addicted to these forums and can't help but read all the posts. So if I somehow help you, please click the "Like This" button, it helps.

Link to comment
Share on other sites

BlockGrill.isBurning = false;

 

No shit all your blocks do the same thing. You can't store information in the block class like this, much less as a static variable.  You MUST encode it in the blockstate (metadata) or as the TileEntity information and reference it through such.

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.

Link to comment
Share on other sites

Which you need to access a field from your Block class that is not static.

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.

Link to comment
Share on other sites

Ok ill figure out how to do that. ALso:

Also, how do I get the particles to not be purple and black when I break the block?

When defining textures in your model or blockstate define a "particle" texture.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Just a question, does the minecraft source code use this.getBlockType when texturing the furnace and if it does, which class is it in? I can't seem to find it.

Apparently I'm addicted to these forums and can't help but read all the posts. So if I somehow help you, please click the "Like This" button, it helps.

Link to comment
Share on other sites

Diesieben07, isn't the minecraft TileEntityChestRenderer class a raw type? If not, can you point out which parts of code make it not raw?

Just a question, does the minecraft source code use this.getBlockType when texturing the furnace and if it does, which class is it in? I can't seem to find it.

Apparently I'm addicted to these forums and can't help but read all the posts. So if I somehow help you, please click the "Like This" button, it helps.

Link to comment
Share on other sites

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
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.

 Share




×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.