updated state doesn't seem to be working

This commit is contained in:
Mohammad-Ali Minaie
2018-03-10 23:21:12 -05:00
parent cadbe7e204
commit 117b3fd0f3
3 changed files with 10 additions and 3 deletions

View File

@@ -166,6 +166,8 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider,
NBTTagCompound tag = stack.getSubCompound("BlockEntityTag").copy(); NBTTagCompound tag = stack.getSubCompound("BlockEntityTag").copy();
//tile.writeNBT(tag); //tile.writeNBT(tag);
tile.setHot(tag.getBoolean("hot")); tile.setHot(tag.getBoolean("hot"));
tile.markDirty();
tile.updateBlock();
} }
} }

View File

@@ -80,6 +80,8 @@ public class TileNBTCrucible extends BaseTile implements ITickable {
if(this.getHeat() > 0){ if(this.getHeat() > 0){
this.setHeat( this.getHeat() - 1); this.setHeat( this.getHeat() - 1);
System.out.println(this.getHeat()); System.out.println(this.getHeat());
//this.updateBlock();
//this.markDirty();
} }
if(this.getHeat() == 0){ if(this.getHeat() == 0){
this.setHot(false); this.setHot(false);
@@ -87,6 +89,8 @@ public class TileNBTCrucible extends BaseTile implements ITickable {
this.setDrops(recipe.getDropsCooked()); this.setDrops(recipe.getDropsCooked());
this.setStatus(false); this.setStatus(false);
System.out.println("Ready to harvest: " + this.getDrops()); System.out.println("Ready to harvest: " + this.getDrops());
this.updateBlock();
this.markDirty();
} }
//CrucibleCrafting recipe = CrucibleCrafting.getRecipe(ingList.get(0), ingList.get(1), ingList.get(2), ingList.get(3), ingList.get(4)); //CrucibleCrafting recipe = CrucibleCrafting.getRecipe(ingList.get(0), ingList.get(1), ingList.get(2), ingList.get(3), ingList.get(4));
} }

View File

@@ -2,19 +2,20 @@
"forge_marker":1, "forge_marker":1,
"variants": { "variants": {
"normal": { "normal": {
"model": "forgecraft:crucibleshut",
"active": { "active": {
"true": { "true": {
"textures": { "textures": {
"particle": "forgecraft:blocks/stone_slab_hot", "particle": "forgecraft:blocks/stone_slab_hot",
"texture": "forgecraft:blocks/stone_slab_hot" "texture": "forgecraft:blocks/stone_slab_hot"
} },
"model": "forgecraft:crucibleshut"
}, },
"false": { "false": {
"textures": { "textures": {
"particle": "forgecraft:blocks/stone_slab", "particle": "forgecraft:blocks/stone_slab",
"texture": "forgecraft:blocks/stone_slab" "texture": "forgecraft:blocks/stone_slab"
} },
"model": "forgecraft:crucibleshut"
} }
} }
} }