mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Added crafting data to getData and getColumnData, and made the OC pressAZ5 function play the cool sound
This commit is contained in:
parent
890eb49747
commit
cf5bf4be8c
@ -23,14 +23,13 @@ import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import li.cil.oc.api.machine.Arguments;
|
||||
@ -631,6 +630,15 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
TileEntityRBMKOutgasser irradiationChannel = (TileEntityRBMKOutgasser)te;
|
||||
data_table.put("fluxProgress", irradiationChannel.progress);
|
||||
data_table.put("requiredFlux", irradiationChannel.duration);
|
||||
ItemStack input = irradiationChannel.getStackInSlot(0);
|
||||
if (input != null){
|
||||
data_table.put("craftingName", input.getUnlocalizedName());
|
||||
data_table.put("craftingNumber", input.stackSize);
|
||||
}
|
||||
else {
|
||||
data_table.put("craftingName", "");
|
||||
data_table.put("craftingNumber", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if(te instanceof TileEntityRBMKHeater){
|
||||
@ -760,6 +768,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] pressAZ5(Context context, Arguments args) {
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5,"hbm:block.shutdown",1.0F, 1.0F);
|
||||
boolean hasRods = false;
|
||||
for(int i = -7; i <= 7; i++) {
|
||||
for(int j = -7; j <= 7; j++) {
|
||||
|
||||
@ -277,9 +277,9 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCrafting(Context context, Arguments args) {
|
||||
if (slots[0] == null)
|
||||
return new Object[] { null, null };
|
||||
return new Object[] { "", 0 };
|
||||
else
|
||||
return new Object[]{slots[0].getUnlocalizedName(), slots[0].stackSize};
|
||||
return new Object[]{slots[0].getUnlocalizedName(), slots[0].stackSize };
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@ -291,7 +291,11 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {gas.getFill(), gas.getMaxFill(), progress, gas.getTankType().getID(), xCoord, yCoord, zCoord};
|
||||
ItemStack input = slots[0];
|
||||
if (input != null)
|
||||
return new Object[] {gas.getFill(), gas.getMaxFill(), progress, gas.getTankType().getID(), xCoord, yCoord, zCoord, input.getUnlocalizedName(), input.stackSize };
|
||||
else
|
||||
return new Object[] {gas.getFill(), gas.getMaxFill(), progress, gas.getTankType().getID(), xCoord, yCoord, zCoord, "", 0 };
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user