This commit is contained in:
Aleksey 2021-06-27 17:30:15 +03:00
parent 30204a2aee
commit daefcc4dbf
5 changed files with 12 additions and 8 deletions

View file

@ -52,7 +52,7 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
.resistance(100F)
.requiresCorrectToolForDrops()
.sound(SoundType.STONE));
this.registerDefaultState(this.stateDefinition.any()
registerDefaultState(this.stateDefinition.any()
.setValue(FACING, Direction.NORTH)
.setValue(LIT, false));
}
@ -75,7 +75,7 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
@Override
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
return this.defaultBlockState().setValue(FACING, ctx.getHorizontalDirection().getOpposite());
return defaultBlockState().setValue(FACING, ctx.getHorizontalDirection().getOpposite());
}
@Override

View file

@ -246,7 +246,7 @@ public class EndStoneSmelterBlockEntity extends BaseContainerBlockEntity impleme
if (recipe == null) {
recipe = level.getRecipeManager().getRecipeFor(RecipeType.BLASTING, this, level).orElse(null);
}
boolean accepted = this.canAcceptRecipeOutput(recipe);
boolean accepted = canAcceptRecipeOutput(recipe);
if (!burning && accepted) {
burnTime = getFuelTime(fuel);
fuelTime = burnTime;
@ -265,7 +265,7 @@ public class EndStoneSmelterBlockEntity extends BaseContainerBlockEntity impleme
}
if (burning && accepted) {
this.smeltTime++;
smeltTime++;
if (smeltTime == smeltTimeTotal) {
smeltTime = 0;
smeltTimeTotal = getSmeltTime();
@ -276,7 +276,7 @@ public class EndStoneSmelterBlockEntity extends BaseContainerBlockEntity impleme
smeltTime = 0;
}
}
burning = isBurning();
if (initialBurning != burning) {
level.setBlock(worldPosition, level.getBlockState(worldPosition).setValue(EndStoneSmelter.LIT, burning), 3);
setChanged();