mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fixed strandcaster UV
This commit is contained in:
parent
9eb4cbe6c9
commit
6b885274a9
@ -1,6 +1,8 @@
|
||||
## Added
|
||||
* Large Radar
|
||||
* A giant version of the radar with 3x the scan range
|
||||
* Strand caster
|
||||
* Watercooled foundry basin that processes large amounts of material at once
|
||||
|
||||
## Changed
|
||||
* Nuclear craters have been reworked
|
||||
@ -23,7 +25,8 @@
|
||||
* Trenchmaster general damage multiplier has been halved, making it twice as strong
|
||||
* Updated generation rules for layers like schist and hematite, they will now only replace things tagged as stone, just like most ores
|
||||
* Mushroom clouds now have two additional outer condensation rings, those are not entirely finished and are still subject to change
|
||||
* Small radars are now a tad cheaper
|
||||
* Small radars are now a lot cheaper
|
||||
* Increased crucible pouring speed by 50%
|
||||
|
||||
## Fixed
|
||||
* Fixed a rare crash caused by radars force-loading chunks conflicting with certain mods' chunk loading changes
|
||||
@ -32,3 +35,5 @@
|
||||
* Fixed large thermobaric artillery rocket still using the wrong slag block
|
||||
* Fixed some of the assembly templates having broken names due to using the wrong way of translating the output
|
||||
* Fixed the soyuz launcher's NEI construction recipe showing the wrong amount of blocks
|
||||
* Fixed molten meteorite cobble dropping itself in addition to turning into lava
|
||||
* Fixed S~Cola RAD not being radish-colored
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=4837
|
||||
mod_build_number=4844
|
||||
|
||||
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
|
||||
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models,\
|
||||
|
||||
@ -205,6 +205,9 @@ public class BlockOre extends Block {
|
||||
if(this == ModBlocks.ore_cobalt || this == ModBlocks.ore_nether_cobalt) {
|
||||
return ModItems.fragment_cobalt;
|
||||
}
|
||||
if(this == ModBlocks.block_meteor_molten) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
@ -345,8 +348,7 @@ public class BlockOre extends Block {
|
||||
public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int i) {
|
||||
|
||||
if(this == ModBlocks.block_meteor_molten) {
|
||||
if(!world.isRemote)
|
||||
world.setBlock(x, y, z, Blocks.lava);
|
||||
if(!world.isRemote) world.setBlock(x, y, z, Blocks.lava);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -314,8 +314,8 @@ public class OreDictManager {
|
||||
GOLD.plate(plate_gold).dust(powder_gold).ore(ore_gneiss_gold);
|
||||
LAPIS.dust(powder_lapis);
|
||||
NETHERQUARTZ.gem(Items.quartz).dust(powder_quartz).ore(Blocks.quartz_ore);
|
||||
DIAMOND.dust(powder_diamond).ore(gravel_diamond);
|
||||
EMERALD.dust(powder_emerald);
|
||||
DIAMOND.dust(powder_diamond).ore(gravel_diamond, ore_sellafield_diamond);
|
||||
EMERALD.dust(powder_emerald, ore_sellafield_emerald);
|
||||
|
||||
/*
|
||||
* RADIOACTIVE
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.inventory.gui;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineStrandCaster;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.inventory.material.NTMMaterial.SmeltingBehavior;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineStrandCaster;
|
||||
import com.hbm.util.I18nUtil;
|
||||
@ -21,78 +20,77 @@ import java.util.List;
|
||||
|
||||
public class GUIMachineStrandCaster extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_strand_caster.png");
|
||||
private TileEntityMachineStrandCaster caster;
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_strand_caster.png");
|
||||
private TileEntityMachineStrandCaster caster;
|
||||
|
||||
public GUIMachineStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster tedf) {
|
||||
super(new ContainerMachineStrandCaster(invPlayer, tedf));
|
||||
caster = tedf;
|
||||
public GUIMachineStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster tedf) {
|
||||
super(new ContainerMachineStrandCaster(invPlayer, tedf));
|
||||
caster = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 214;
|
||||
}
|
||||
this.xSize = 176;
|
||||
this.ySize = 214;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float interp) {
|
||||
super.drawScreen(x, y, interp);
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float interp) {
|
||||
super.drawScreen(x, y, interp);
|
||||
|
||||
drawStackInfo(x, y, 16, 17);
|
||||
drawStackInfo(x, y, 16, 17);
|
||||
|
||||
caster.water.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 14, 16, 24);
|
||||
caster.steam.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 64, 16, 24);
|
||||
}
|
||||
caster.water.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 14, 16, 24);
|
||||
caster.steam.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 65, 16, 24);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.caster.hasCustomInventoryName() ? this.caster.getInventoryName() : I18n.format(this.caster.getInventoryName());
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.caster.hasCustomInventoryName() ? this.caster.getInventoryName() : I18n.format(this.caster.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 4, 0xffffff);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 4, 0xffffff);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
if (caster.amount != 0) {
|
||||
if(caster.amount != 0) {
|
||||
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
|
||||
int targetHeight = Math.min((caster.amount) * 79 / caster.getCapacity(), 92);
|
||||
int targetHeight = Math.min((caster.amount) * 79 / caster.getCapacity(), 92);
|
||||
|
||||
int hex = caster.type.moltenColor;
|
||||
//hex = 0xC18336;
|
||||
Color color = new Color(hex);
|
||||
GL11.glColor3f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F);
|
||||
drawTexturedModalRect(guiLeft + 17, guiTop + 93 - targetHeight, 176, 89 - targetHeight, 34, targetHeight);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1F, 1F, 1F, 0.3F);
|
||||
drawTexturedModalRect(guiLeft + 17, guiTop + 93 - targetHeight, 176, 89 - targetHeight, 34, targetHeight);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
int hex = caster.type.moltenColor;
|
||||
// hex = 0xC18336;
|
||||
Color color = new Color(hex);
|
||||
GL11.glColor3f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F);
|
||||
drawTexturedModalRect(guiLeft + 17, guiTop + 93 - targetHeight, 176, 89 - targetHeight, 34, targetHeight);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1F, 1F, 1F, 0.3F);
|
||||
drawTexturedModalRect(guiLeft + 17, guiTop + 93 - targetHeight, 176, 89 - targetHeight, 34, targetHeight);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
}
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor3f(255, 255, 255);
|
||||
}
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor3f(255, 255, 255);
|
||||
|
||||
caster.water.renderTank(guiLeft + 82, guiTop + 38, this.zLevel, 16, 24);
|
||||
caster.steam.renderTank(guiLeft + 82, guiTop + 90, this.zLevel, 16, 24);
|
||||
caster.water.renderTank(guiLeft + 82, guiTop + 38, this.zLevel, 16, 24);
|
||||
caster.steam.renderTank(guiLeft + 82, guiTop + 89, this.zLevel, 16, 24);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void drawStackInfo(int mouseX, int mouseY, int x, int y) {
|
||||
|
||||
protected void drawStackInfo(int mouseX, int mouseY, int x, int y) {
|
||||
List<String> list = new ArrayList();
|
||||
|
||||
List<String> list = new ArrayList();
|
||||
|
||||
if (caster.type == null) list.add(EnumChatFormatting.RED + "Empty");
|
||||
else
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey(caster.type.getUnlocalizedName()) + ": " + Mats.formatAmount(caster.amount, Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)));
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + x, guiTop + y, 36, 81, mouseX, mouseY, list);
|
||||
}
|
||||
if(caster.type == null)
|
||||
list.add(EnumChatFormatting.RED + "Empty");
|
||||
else
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey(caster.type.getUnlocalizedName()) + ": " + Mats.formatAmount(caster.amount, Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)));
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + x, guiTop + y, 36, 81, mouseX, mouseY, list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (4837)";
|
||||
public static final String VERSION = "1.0.27 BETA (4844)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -56,6 +56,7 @@ public class RenderRadarScreen extends TileEntitySpecialRenderer implements IIte
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
tess.draw();
|
||||
|
||||
@ -16,7 +16,6 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.awt.*;
|
||||
import java.nio.DoubleBuffer;
|
||||
|
||||
public class RenderStrandCaster extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
@ -70,7 +69,7 @@ public class RenderStrandCaster extends TileEntitySpecialRenderer implements IIt
|
||||
buf.put(new double[] { 0, 0, -1, 0.5} );
|
||||
buf.rewind();
|
||||
GL11.glClipPlane(GL11.GL_CLIP_PLANE0, buf);
|
||||
GL11.glTranslated(0,0,-offset + 3.4);
|
||||
GL11.glTranslated(0,0,Math.max(-offset + 3.4, 0));
|
||||
ResourceManager.strand_caster.renderPart("plate");
|
||||
GL11.glDisable(GL11.GL_CLIP_PLANE0);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -45,6 +45,7 @@ public class RenderAccessoryUtility {
|
||||
private static ResourceLocation vaer = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeVaer.png");
|
||||
private static ResourceLocation adam = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeAdam.png");
|
||||
private static ResourceLocation alcater = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeAlcater.png");
|
||||
private static ResourceLocation jame = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeJame.png");
|
||||
|
||||
public static ResourceLocation getCloakFromPlayer(EntityPlayer player) {
|
||||
|
||||
@ -127,6 +128,9 @@ public class RenderAccessoryUtility {
|
||||
if(uuid.equals(Library.Alcater)) {
|
||||
return alcater;
|
||||
}
|
||||
if(uuid.equals(Library.ege444)) {
|
||||
return jame;
|
||||
}
|
||||
if(Library.contributors.contains(uuid)) {
|
||||
return wiki;
|
||||
}
|
||||
|
||||
@ -34,300 +34,299 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
//god thank you bob for this base class
|
||||
public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase implements IGUIProvider, ICrucibleAcceptor, ISidedInventory, IFluidStandardTransceiver, INBTPacketReceiver, IInventory {
|
||||
|
||||
public FluidTank water;
|
||||
public FluidTank steam;
|
||||
public FluidTank water;
|
||||
public FluidTank steam;
|
||||
|
||||
public String getName() {
|
||||
return "container.machineStrandCaster";
|
||||
}
|
||||
public String getName() {
|
||||
return "container.machineStrandCaster";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return getName();
|
||||
}
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
public TileEntityMachineStrandCaster() {
|
||||
super(7);
|
||||
water = new FluidTank(Fluids.WATER, 64_000);
|
||||
steam = new FluidTank(Fluids.SPENTSTEAM, 64_000);
|
||||
}
|
||||
public TileEntityMachineStrandCaster() {
|
||||
super(7);
|
||||
water = new FluidTank(Fluids.WATER, 64_000);
|
||||
steam = new FluidTank(Fluids.SPENTSTEAM, 64_000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if (!worldObj.isRemote) {
|
||||
if(this.lastType != this.type || this.lastAmount != this.amount) {
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
this.lastType = this.type;
|
||||
this.lastAmount = this.amount;
|
||||
}
|
||||
|
||||
if (this.lastType != this.type || this.lastAmount != this.amount) {
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
this.lastType = this.type;
|
||||
this.lastAmount = this.amount;
|
||||
}
|
||||
if(this.amount >= this.getCapacity()) {
|
||||
// In case of overfill problems, spit out the excess as scrap
|
||||
if(amount > getCapacity()) {
|
||||
ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(type, amount));
|
||||
EntityItem item = new EntityItem(worldObj, xCoord + 0.5, yCoord + 2, zCoord + 0.5, scrap);
|
||||
worldObj.spawnEntityInWorld(item);
|
||||
}
|
||||
this.amount = this.getCapacity();
|
||||
|
||||
if (this.amount >= this.getCapacity()) {
|
||||
//In case of overfill problems, spit out the excess as scrap
|
||||
if (amount > getCapacity()) {
|
||||
ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(type, amount));
|
||||
EntityItem item = new EntityItem(worldObj, xCoord + 0.5, yCoord + 2, zCoord + 0.5, scrap);
|
||||
worldObj.spawnEntityInWorld(item);
|
||||
}
|
||||
this.amount = this.getCapacity();
|
||||
}
|
||||
|
||||
}
|
||||
if(this.amount == 0) {
|
||||
this.type = null;
|
||||
}
|
||||
|
||||
if (this.amount == 0) {
|
||||
this.type = null;
|
||||
}
|
||||
this.updateConnections();
|
||||
|
||||
this.updateConnections();
|
||||
ItemMold.Mold mold = this.getInstalledMold();
|
||||
|
||||
ItemMold.Mold mold = this.getInstalledMold();
|
||||
if(canProcess()) {
|
||||
|
||||
if (canProcess()) {
|
||||
int itemsCasted = Math.min(amount / mold.getCost(), 9);
|
||||
|
||||
int itemsCasted = Math.min(amount / mold.getCost(), 9);
|
||||
for(int j = 0; j < itemsCasted; j++) {
|
||||
this.amount -= mold.getCost();
|
||||
|
||||
for (int j = 0; j < itemsCasted; j++) {
|
||||
this.amount -= mold.getCost();
|
||||
ItemStack out = mold.getOutput(type);
|
||||
|
||||
ItemStack out = mold.getOutput(type);
|
||||
|
||||
for (int i = 1; i < 7; i++) {
|
||||
if (slots[i] == null) {
|
||||
slots[i] = out.copy();
|
||||
break;
|
||||
}
|
||||
|
||||
if (slots[i].isItemEqual(out) && slots[i].stackSize + out.stackSize <= out.getMaxStackSize()) {
|
||||
slots[i].stackSize += out.stackSize;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
markChanged();
|
||||
|
||||
water.setFill(water.getFill() - getWaterRequired() * itemsCasted);
|
||||
steam.setFill(steam.getFill() + getWaterRequired() * itemsCasted);
|
||||
}
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
water.writeToNBT(data, "w");
|
||||
steam.writeToNBT(data, "s");
|
||||
|
||||
this.networkPack(data, 150);
|
||||
|
||||
}
|
||||
|
||||
public boolean canProcess() {
|
||||
ItemMold.Mold mold = this.getInstalledMold();
|
||||
if (type != null && mold != null && this.amount >= mold.getCost() * 9 && mold.getOutput(type) != null) {
|
||||
for (int i = 1; i < 7; i++) {
|
||||
if (slots[i] == null || slots[i].isItemEqual(mold.getOutput(type)) && slots[i].stackSize + mold.getOutput(type).stackSize <= mold.getOutput(type).getMaxStackSize())
|
||||
return water.getFill() >= getWaterRequired() && steam.getFill() < steam.getMaxFill();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public DirPos[] getFluidConPos() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
return new DirPos[]{
|
||||
new DirPos(xCoord + rot.offsetX * 2 - dir.offsetX, yCoord, zCoord + rot.offsetZ * 2 - dir.offsetZ, rot),
|
||||
new DirPos(xCoord - rot.offsetX - dir.offsetX, yCoord, zCoord - rot.offsetZ - dir.offsetZ, rot.getOpposite()),
|
||||
new DirPos(xCoord + rot.offsetX * 2 - dir.offsetX * 5, yCoord, zCoord + rot.offsetZ * 2 - dir.offsetZ * 5, rot),
|
||||
new DirPos(xCoord - rot.offsetX - dir.offsetX * 5, yCoord, zCoord - rot.offsetZ + dir.offsetZ * 5, rot.getOpposite()),
|
||||
};
|
||||
}
|
||||
|
||||
public int[][] getMetalPourPos() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
return new int[][]{
|
||||
new int[]{xCoord + rot.offsetX - dir.offsetX, yCoord + 2, zCoord + rot.offsetZ - dir.offsetZ},
|
||||
new int[]{xCoord - dir.offsetX, yCoord + 2, zCoord - dir.offsetZ},
|
||||
new int[]{xCoord + rot.offsetX, yCoord + 2, zCoord + rot.offsetZ},
|
||||
new int[]{xCoord, yCoord + 2, zCoord},
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemMold.Mold getInstalledMold() {
|
||||
if (slots[0] == null) return null;
|
||||
|
||||
if (slots[0].getItem() == ModItems.mold) {
|
||||
return ((ItemMold) slots[0].getItem()).getMold(slots[0]);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMoldSize() {
|
||||
return getInstalledMold().size;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptPartialPour(World world, int x, int y, int z, double dX, double dY, double dZ, ForgeDirection side, Mats.MaterialStack stack) {
|
||||
|
||||
if (side != ForgeDirection.UP) return false;
|
||||
for (int[] pos : getMetalPourPos()) {
|
||||
if (pos[0] == x && pos[1] == y && pos[2] == z) {
|
||||
return this.standardCheck(world, x, y, z, side, stack);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean standardCheck(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) {
|
||||
if (this.type != null && this.type != stack.material) return false;
|
||||
return !(this.amount >= this.getCapacity() || getInstalledMold() == null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCapacity() {
|
||||
ItemMold.Mold mold = this.getInstalledMold();
|
||||
return mold == null ? 50000 : mold.getCost() * 10;
|
||||
}
|
||||
|
||||
private int getWaterRequired() {
|
||||
return getInstalledMold() != null ? 5 * getInstalledMold().getCost() : 50;
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
for (DirPos pos : getFluidConPos()) {
|
||||
this.trySubscribe(water.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
for (DirPos pos : getFluidConPos()) {
|
||||
sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return new FluidTank[]{steam};
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[]{water};
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return new FluidTank[]{water, steam};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerMachineStrandCaster(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineStrandCaster(player.inventory, this);
|
||||
}
|
||||
|
||||
public void networkPack(NBTTagCompound nbt, int range) {
|
||||
if (!worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAllAround(new NBTPacket(nbt, xCoord, yCoord, zCoord), new NetworkRegistry.TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, range));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
water.readFromNBT(nbt, "w");
|
||||
steam.readFromNBT(nbt, "s");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
water.writeToNBT(nbt, "w");
|
||||
steam.writeToNBT(nbt, "s");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
water.readFromNBT(nbt, "w");
|
||||
steam.readFromNBT(nbt, "s");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
|
||||
if (i == 0) {
|
||||
return stack.getItem() == ModItems.mold;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int meta) {
|
||||
return new int[]{1, 2, 3, 4, 5, 6};
|
||||
}
|
||||
|
||||
public void markChanged() {
|
||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) {
|
||||
return false;
|
||||
} else {
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 128;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int slot, ItemStack itemStack, int side) {
|
||||
return this.isItemValidForSlot(slot, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack itemStack, int side) {
|
||||
return !this.isItemValidForSlot(slot, itemStack);
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if (bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 7,
|
||||
yCoord,
|
||||
zCoord - 7,
|
||||
xCoord + 7,
|
||||
yCoord + 3,
|
||||
zCoord + 7
|
||||
);
|
||||
}
|
||||
return bb;
|
||||
}
|
||||
for(int i = 1; i < 7; i++) {
|
||||
if(slots[i] == null) {
|
||||
slots[i] = out.copy();
|
||||
break;
|
||||
}
|
||||
|
||||
if(slots[i].isItemEqual(out) && slots[i].stackSize + out.stackSize <= out.getMaxStackSize()) {
|
||||
slots[i].stackSize += out.stackSize;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
markChanged();
|
||||
|
||||
water.setFill(water.getFill() - getWaterRequired() * itemsCasted);
|
||||
steam.setFill(steam.getFill() + getWaterRequired() * itemsCasted);
|
||||
}
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
water.writeToNBT(data, "w");
|
||||
steam.writeToNBT(data, "s");
|
||||
|
||||
this.networkPack(data, 150);
|
||||
|
||||
}
|
||||
|
||||
public boolean canProcess() {
|
||||
ItemMold.Mold mold = this.getInstalledMold();
|
||||
if(type != null && mold != null && this.amount >= mold.getCost() * 9 && mold.getOutput(type) != null) {
|
||||
for(int i = 1; i < 7; i++) {
|
||||
if(slots[i] == null || slots[i].isItemEqual(mold.getOutput(type)) && slots[i].stackSize + mold.getOutput(type).stackSize <= mold.getOutput(type).getMaxStackSize())
|
||||
return water.getFill() >= getWaterRequired() && steam.getFill() < steam.getMaxFill();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public DirPos[] getFluidConPos() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord + rot.offsetX * 2 - dir.offsetX, yCoord, zCoord + rot.offsetZ * 2 - dir.offsetZ, rot),
|
||||
new DirPos(xCoord - rot.offsetX - dir.offsetX, yCoord, zCoord - rot.offsetZ - dir.offsetZ, rot.getOpposite()),
|
||||
new DirPos(xCoord + rot.offsetX * 2 - dir.offsetX * 5, yCoord, zCoord + rot.offsetZ * 2 - dir.offsetZ * 5, rot),
|
||||
new DirPos(xCoord - rot.offsetX - dir.offsetX * 5, yCoord, zCoord - rot.offsetZ + dir.offsetZ * 5, rot.getOpposite())
|
||||
};
|
||||
}
|
||||
|
||||
public int[][] getMetalPourPos() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
return new int[][] {
|
||||
new int[] { xCoord + rot.offsetX - dir.offsetX, yCoord + 2, zCoord + rot.offsetZ - dir.offsetZ },
|
||||
new int[] { xCoord - dir.offsetX, yCoord + 2, zCoord - dir.offsetZ },
|
||||
new int[] { xCoord + rot.offsetX, yCoord + 2, zCoord + rot.offsetZ },
|
||||
new int[] { xCoord, yCoord + 2, zCoord }
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemMold.Mold getInstalledMold() {
|
||||
if(slots[0] == null)
|
||||
return null;
|
||||
|
||||
if(slots[0].getItem() == ModItems.mold) {
|
||||
return ((ItemMold) slots[0].getItem()).getMold(slots[0]);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMoldSize() {
|
||||
return getInstalledMold().size;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptPartialPour(World world, int x, int y, int z, double dX, double dY, double dZ, ForgeDirection side, Mats.MaterialStack stack) {
|
||||
|
||||
if(side != ForgeDirection.UP)
|
||||
return false;
|
||||
for(int[] pos : getMetalPourPos()) {
|
||||
if(pos[0] == x && pos[1] == y && pos[2] == z) {
|
||||
return this.standardCheck(world, x, y, z, side, stack);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean standardCheck(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) {
|
||||
if(this.type != null && this.type != stack.material)
|
||||
return false;
|
||||
return !(this.amount >= this.getCapacity() || getInstalledMold() == null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCapacity() {
|
||||
ItemMold.Mold mold = this.getInstalledMold();
|
||||
return mold == null ? 50000 : mold.getCost() * 10;
|
||||
}
|
||||
|
||||
private int getWaterRequired() {
|
||||
return getInstalledMold() != null ? 5 * getInstalledMold().getCost() : 50;
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
for(DirPos pos : getFluidConPos()) {
|
||||
this.trySubscribe(water.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
for(DirPos pos : getFluidConPos()) {
|
||||
sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return new FluidTank[] { steam };
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[] { water };
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return new FluidTank[] { water, steam };
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerMachineStrandCaster(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineStrandCaster(player.inventory, this);
|
||||
}
|
||||
|
||||
public void networkPack(NBTTagCompound nbt, int range) {
|
||||
if(!worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAllAround(new NBTPacket(nbt, xCoord, yCoord, zCoord), new NetworkRegistry.TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, range));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
water.readFromNBT(nbt, "w");
|
||||
steam.readFromNBT(nbt, "s");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
water.writeToNBT(nbt, "w");
|
||||
steam.writeToNBT(nbt, "s");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
water.readFromNBT(nbt, "w");
|
||||
steam.readFromNBT(nbt, "s");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
|
||||
if(i == 0) {
|
||||
return stack.getItem() == ModItems.mold;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int meta) {
|
||||
return new int[] { 1, 2, 3, 4, 5, 6 };
|
||||
}
|
||||
|
||||
public void markChanged() {
|
||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) {
|
||||
return false;
|
||||
} else {
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 128;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int slot, ItemStack itemStack, int side) {
|
||||
return this.isItemValidForSlot(slot, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack itemStack, int side) {
|
||||
return !this.isItemValidForSlot(slot, itemStack);
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 7,
|
||||
yCoord,
|
||||
zCoord - 7,
|
||||
xCoord + 7,
|
||||
yCoord + 3,
|
||||
zCoord + 7);
|
||||
}
|
||||
return bb;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4299,6 +4299,10 @@ tile.ore_random.name=%s-Erz
|
||||
tile.ore_rare.name=Seltenerden-Erz
|
||||
tile.ore_reiium.name=Reiit
|
||||
tile.ore_schrabidium.name=Schrabidiumerz
|
||||
tile.ore_sellafield_diamond.name=Sellafit-Diamanterz
|
||||
tile.ore_sellafield_emerald.name=Sellafit-Smaragderz
|
||||
tile.ore_sellafield_schrabidium.name=Sellafit-Schrabidiumerz
|
||||
tile.ore_sellafield_uranium_scorched.name=Verschmortes Sellafit-Uranerz
|
||||
tile.ore_sulfur.name=Schwefelerz
|
||||
tile.ore_tektite_osmiridium.name=Osmiridiumreiches Tektit
|
||||
tile.ore_thorium.name=Thoriumerz
|
||||
|
||||
@ -5291,6 +5291,10 @@ tile.ore_random.name=%s Ore
|
||||
tile.ore_rare.name=Rare Earth Ore
|
||||
tile.ore_reiium.name=Reiite
|
||||
tile.ore_schrabidium.name=Schrabidium Ore
|
||||
tile.ore_sellafield_diamond.name=Sellafite Diamond Ore
|
||||
tile.ore_sellafield_emerald.name=Sellafite Emerald Ore
|
||||
tile.ore_sellafield_schrabidium.name=Sellafite Schrabidium Ore
|
||||
tile.ore_sellafield_uranium_scorched.name=Scorched Sellafite Uranium Ore
|
||||
tile.ore_sulfur.name=Sulfur Ore
|
||||
tile.ore_tektite_osmiridium.name=Osmiridium-Infused Tektite
|
||||
tile.ore_thorium.name=Thorium Ore
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 300 B |
BIN
src/main/resources/assets/hbm/textures/models/capes/CapeJame.png
Normal file
BIN
src/main/resources/assets/hbm/textures/models/capes/CapeJame.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 852 B |
Loading…
x
Reference in New Issue
Block a user