Initial 1.11.2 update

This commit is contained in:
Electroblob
2018-02-07 21:15:50 +00:00
parent 67f6be0671
commit 3df5597dcc
368 changed files with 17234 additions and 15082 deletions
@@ -3,14 +3,14 @@ package electroblob.wizardry.tileentity;
import net.minecraft.nbt.NBTTagCompound;
public class TileEntityMagicLight extends TileEntityTimer {
public int[] randomiser;
public int[] randomiser2;
public TileEntityMagicLight(){
super();
}
public TileEntityMagicLight(int maxTimer){
super(maxTimer);
randomiser = new int[30];
@@ -18,36 +18,36 @@ public class TileEntityMagicLight extends TileEntityTimer {
randomiser2 = new int[30];
randomiser2[0] = -1;
}
@Override
public void update(){
if(randomiser.length > 0 && randomiser[0] == -1){
for(int i=0; i<randomiser.length; i++){
randomiser[i] = this.worldObj.rand.nextInt(10);
for(int i = 0; i < randomiser.length; i++){
randomiser[i] = this.world.rand.nextInt(10);
}
}
if(randomiser2.length > 0 && randomiser2[0] == -1){
for(int i=0; i<randomiser2.length; i++){
randomiser2[i] = this.worldObj.rand.nextInt(10);
for(int i = 0; i < randomiser2.length; i++){
randomiser2[i] = this.world.rand.nextInt(10);
}
}
super.update();
}
@Override
public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound);
randomiser = tagCompound.getIntArray("randomiser");
randomiser2 = tagCompound.getIntArray("randomiser2");
}
@Override
public NBTTagCompound writeToNBT(NBTTagCompound tagCompound) {
super.writeToNBT(tagCompound);
tagCompound.setIntArray("randomiser", randomiser);
tagCompound.setIntArray("randomiser2", randomiser2);
@Override
public void readFromNBT(NBTTagCompound tagCompound){
super.readFromNBT(tagCompound);
randomiser = tagCompound.getIntArray("randomiser");
randomiser2 = tagCompound.getIntArray("randomiser2");
}
@Override
public NBTTagCompound writeToNBT(NBTTagCompound tagCompound){
super.writeToNBT(tagCompound);
tagCompound.setIntArray("randomiser", randomiser);
tagCompound.setIntArray("randomiser2", randomiser2);
return tagCompound;
}
}
}