update to tileanvil
This commit is contained in:
@@ -49,24 +49,24 @@ public class TileAnvil extends TileBaseSlot implements ITickable {
|
|||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
IBlockState state = world.getBlockState(this.pos);
|
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++){
|
for(int i=0; i<this.getSlotListSize(); i++){
|
||||||
if(this.getSlotStack(i).getItem() == ModItems.ironchunkhot){
|
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.setSlotStack(i, new ItemStack(ModBlocks.ironchunk, 1));
|
||||||
this.updateBlock();
|
this.updateBlock();
|
||||||
this.markDirty();
|
this.markDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.getSlotStack(i).getItem() == ModItems.ironingotballhot){
|
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.setSlotStack(i, new ItemStack(ModBlocks.ironball, 1));
|
||||||
this.updateBlock();
|
this.updateBlock();
|
||||||
this.markDirty();
|
this.markDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.getSlotStack(i).getItem() instanceof ToolPart){
|
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);
|
((ToolPart) this.getSlotStack(i).getItem()).setHot(this.getSlotStack(i), false);
|
||||||
this.updateBlock();
|
this.updateBlock();
|
||||||
this.markDirty();
|
this.markDirty();
|
||||||
|
|||||||
Reference in New Issue
Block a user