Fix #1436 Placing lit candles does not cause a lighting update, Fix #1435 Freshly crafted candle items are not the same as just-broken candle items.

This commit is contained in:
Nedelosk committed 2016-09-24 15:48:56 +02:00
1 parent 10aae6b6bc
commit 3be3ecfc8a
2 files changed
+8 -10

No files matched your search

@@ -286,6 +286,11 @@ public class BlockCandle extends BlockTorch implements IItemModelRegister, ITile
boolean isLit = isLit(stack);
tileCandle.setColour(colour);
tileCandle.setLit(isLit);
if (tileCandle.isLit()) {
world.theProfiler.startSection("checkLight");
world.checkLight(pos);
world.theProfiler.endSection();
}
}
@Override
@@ -322,19 +327,11 @@ public class BlockCandle extends BlockTorch implements IItemModelRegister, ITile
}
public ItemStack getUnlitCandle(int amount) {
ItemStack itemStack = new ItemStack(this, amount, 0);
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger(BlockCandle.colourTagName, 0xffffff);
itemStack.setTagCompound(tag);
return itemStack;
return new ItemStack(this, amount, 0);
}
public ItemStack getLitCandle(int amount) {
ItemStack itemStack = new ItemStack(this, amount, 1);
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger(BlockCandle.colourTagName, 0xffffff);
itemStack.setTagCompound(tag);
return itemStack;
return new ItemStack(this, amount, 1);
}
@Override
@@ -36,6 +36,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidUtil;