update to tileanvil

This commit is contained in:
Mohammad-Ali Minaie
2017-04-01 23:02:51 -04:00
parent 0c93042f9e
commit 9b5b3b0b3a

View File

@@ -49,24 +49,24 @@ public class TileAnvil extends TileBaseSlot implements ITickable {
if (!world.isRemote) {
IBlockState state = world.getBlockState(this.pos);
if ( ThreadLocalRandom.current().nextInt(0,500) == 0 ) {
if ( ThreadLocalRandom.current().nextInt(0,10000) == 0 ) {
for(int i=0; i<this.getSlotListSize(); i++){
if(this.getSlotStack(i).getItem() == ModItems.ironchunkhot){
if(ThreadLocalRandom.current().nextInt(0,10) == 1){
if(ThreadLocalRandom.current().nextInt(0,100) == 1){
this.setSlotStack(i, new ItemStack(ModBlocks.ironchunk, 1));
this.updateBlock();
this.markDirty();
}
}
if(this.getSlotStack(i).getItem() == ModItems.ironingotballhot){
if(ThreadLocalRandom.current().nextInt(0,20) == 2){
if(ThreadLocalRandom.current().nextInt(0,100) == 2){
this.setSlotStack(i, new ItemStack(ModBlocks.ironball, 1));
this.updateBlock();
this.markDirty();
}
}
if(this.getSlotStack(i).getItem() instanceof ToolPart){
if(ThreadLocalRandom.current().nextInt(0,10) == 0){
if(ThreadLocalRandom.current().nextInt(0,100) == 0){
((ToolPart) this.getSlotStack(i).getItem()).setHot(this.getSlotStack(i), false);
this.updateBlock();
this.markDirty();