Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void updateEntity() {
- //System.out.println(shouldRun());
- Block testBlock = this.worldObj.getBlock(xCoord, yCoord + 1, zCoord);
- if (shouldRun() == true && !worldObj.isRemote) {
- ticks ++;
- //System.out.println(ticks);
- fuelTicks ++;
- Block change;
- int x1 = this.xCoord;
- int y1 = this.yCoord + 1;
- int z1 = this.zCoord;
- for(int i = 0; i < TestForgeCrafting.blockToCheck.size(); i++) {
- if (TestForgeCrafting.blockToCheck.get(i) == testBlock){
- cookTime = TestForgeCrafting.cookTable.get(i);
- change = TestForgeCrafting.blockToCook.get(i);
- //System.out.println(change);
- if (ticks == cookTime) {
- worldObj.setBlock(x1, y1, z1, change);
- ticks = 0;
- }
- System.out.println(ticks + " " + fuelTicks + " " + getItemBurnTime(this.getStackInSlot(0)));
- if (fuelTicks == getItemBurnTime(this.getStackInSlot(0))){
- if(this.getStackInSlot(0).stackSize > 0){
- decrStackSize(0, 1);
- }
- fuelTicks = 0;
- }
- }
- }
- }
- for(int i = 0; i < TestForgeCrafting.blockToCheck.size(); i++) {
- if (TestForgeCrafting.blockToCheck.get(i) != testBlock){
- ticks = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement