Merge branch 'HbmMods:master' into master
13
changelog
@ -1,11 +1,22 @@
|
||||
## Changed
|
||||
* Updated RBMK visuals
|
||||
* The indentations on most RBMK passive elements have been removed, heavily reducing tri count and allowing face culling, making RBMKs render much more efficiently
|
||||
* The caps no longer render as part of the TESR and instead use much more performant ISBRH rendering
|
||||
* Due to most passive elements no longer needing TESRs for their caps, most parts no longer use any TESRs at all
|
||||
* This should fix various issues regarding lower-end hardware (especially Pojav) as well as issues with TESRs getting skipped due to the sheer number of things to render
|
||||
* Control rods now show their set color as part of the model
|
||||
* Improved buzzsaw tree detection
|
||||
* Instead of just clearing a pillar, it now tries to detect branches
|
||||
* The max size of trees that can be successfully harvested is now way bigger
|
||||
* This means that things like 2x2 jungle trees can now be automated
|
||||
* Annihilating radioactive items now creates that item's radiation value x5 as chunk radiation
|
||||
* The maximum per tick is a 1000 RAD/s increase to prevent world-destroying radiation levels from annihilating demon cores
|
||||
|
||||
## Fixed
|
||||
* Fixed NBTStack serialization omitting the stack size most of the time, preventing deserialization (mainly in the precision assembler config)
|
||||
* Fixed precision assembler not being listed in the creative inventory
|
||||
* Fixed OpenComputers integration for the CCGT
|
||||
* Fixed tool abilities switching when clicking on a block with a special interaction
|
||||
* Fixed tool abilities switching when clicking on a block with a special interaction
|
||||
* Fixed outdated info on the QMAW pages involving AA and BSCCO due to the fusion reactor update
|
||||
* Fixed ammo container giving 9mm instead of .22 for the akimbo target pistols
|
||||
* Fixed RBMK control rods incorrectly showing up in the red group when no group is set
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine.rbmk;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.handler.neutron.NeutronNodeWorld;
|
||||
import com.hbm.handler.neutron.RBMKNeutronHandler.RBMKNeutronNode;
|
||||
@ -35,12 +36,17 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
|
||||
|
||||
public static boolean dropLids = true;
|
||||
public static boolean digamma = false;
|
||||
|
||||
public static boolean renderLid = false;
|
||||
|
||||
public static final int LID_NONE = 0;
|
||||
public static final int LID_STANDARD = 1;
|
||||
public static final int LID_GLASS = 2;
|
||||
public static int renderLid = LID_NONE;
|
||||
public static boolean overrideOnlyRenderSides = false;
|
||||
|
||||
public IIcon coverTextureTop;
|
||||
public IIcon coverTextureSide;
|
||||
public IIcon glassTextureTop;
|
||||
public IIcon glassTextureSide;
|
||||
public IIcon textureTop;
|
||||
|
||||
protected RBMKBase() {
|
||||
@ -55,7 +61,7 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
||||
if(overrideOnlyRenderSides && side < 2) return false;
|
||||
if(renderLid && side > 1) return true;
|
||||
if(renderLid != LID_NONE && side > 1) return true;
|
||||
return super.shouldSideBeRendered(world, x, y, z, side);
|
||||
}
|
||||
|
||||
@ -64,14 +70,18 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
this.blockIcon = reg.registerIcon(this.getTextureName() + "_side");
|
||||
this.textureTop = reg.registerIcon(this.getTextureName() + "_top");
|
||||
if(this == ModBlocks.rbmk_control || this == ModBlocks.rbmk_control_auto || this == ModBlocks.rbmk_control_mod) return;
|
||||
this.coverTextureTop = reg.registerIcon(this.getTextureName() + "_cover_top");
|
||||
this.coverTextureSide = reg.registerIcon(this.getTextureName() + "_cover_side");
|
||||
this.glassTextureTop = reg.registerIcon(this.getTextureName() + "_glass_top");
|
||||
this.glassTextureSide = reg.registerIcon(this.getTextureName() + "_glass_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if(renderLid) return side == 0 || side == 1 ? coverTextureTop : coverTextureSide;
|
||||
if(renderLid == LID_STANDARD) return side == 0 || side == 1 ? coverTextureTop : coverTextureSide;
|
||||
if(renderLid == LID_GLASS) return side == 0 || side == 1 ? glassTextureTop : glassTextureSide;
|
||||
return side == 0 || side == 1 ? textureTop : blockIcon;
|
||||
}
|
||||
|
||||
@ -150,6 +160,12 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
|
||||
public static final ForgeDirection DIR_NO_LID = ForgeDirection.NORTH;
|
||||
public static final ForgeDirection DIR_NORMAL_LID = ForgeDirection.EAST;
|
||||
public static final ForgeDirection DIR_GLASS_LID = ForgeDirection.SOUTH;
|
||||
|
||||
public static int metaToLid(int meta) {
|
||||
if(meta - 10 == DIR_NORMAL_LID.ordinal()) return LID_STANDARD;
|
||||
if(meta - 10 == DIR_GLASS_LID.ordinal()) return LID_GLASS;
|
||||
return LID_NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
@ -89,7 +89,7 @@ public class XFactory22lr {
|
||||
.ps(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_STAR_F_ANIMS).orchestra(Orchestras.ORCHESTRA_STAR_F_AKIMBO)
|
||||
).setDefaultAmmo(EnumAmmo.P9_SP, 30).setUnlocalizedName("gun_star_f_akimbo");
|
||||
).setDefaultAmmo(EnumAmmo.P22_SP, 30).setUnlocalizedName("gun_star_f_akimbo");
|
||||
}
|
||||
|
||||
public static Function<ItemStack, String> LAMBDA_NAME_SILENCED = (stack) -> {
|
||||
|
||||
@ -410,17 +410,8 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKControlAuto.class, new RenderRBMKControlRod());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCraneConsole.class, new RenderCraneConsole());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKConsole.class, new RenderRBMKConsole());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKAbsorber.class, new RenderRBMKLid());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKBlank.class, new RenderRBMKLid());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKBoiler.class, new RenderRBMKLid());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKModerator.class, new RenderRBMKLid());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKOutgasser.class, new RenderRBMKLid());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKReflector.class, new RenderRBMKLid());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKRod.class, new RenderRBMKLid());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKRodReaSim.class, new RenderRBMKLid());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKCooler.class, new RenderRBMKLid());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKStorage.class, new RenderRBMKLid());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKHeater.class, new RenderRBMKLid());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKRod.class, new RenderRBMKFuelChannel());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKRodReaSim.class, new RenderRBMKFuelChannel());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKAutoloader.class, new RenderRBMKAutoloader());
|
||||
//ITER
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITER.class, new RenderITER());
|
||||
|
||||
@ -23,6 +23,7 @@ public class RenderRBMKControl implements ISimpleBlockRenderingHandler {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
RBMKBase.renderLid = RBMKBase.LID_NONE;
|
||||
IIcon iicon = block.getIcon(0, 0);
|
||||
tessellator.setColorOpaque_F(1, 1, 1);
|
||||
|
||||
@ -99,30 +100,27 @@ public class RenderRBMKControl implements ISimpleBlockRenderingHandler {
|
||||
int[] pos = ((BlockDummyable) block).findCore(world, x, y, z);
|
||||
if(pos != null) {
|
||||
int coreMeta = world.getBlockMetadata(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(coreMeta - 10 == RBMKBase.DIR_NORMAL_LID.ordinal()) {
|
||||
tessellator.addTranslation(0, 1, 0);
|
||||
int lid = RBMKBase.metaToLid(coreMeta);
|
||||
|
||||
if(lid != RBMKBase.LID_NONE) {
|
||||
renderer.setRenderBounds(0, 0, 0, 1, 0.25, 1);
|
||||
RBMKBase.renderLid = true;
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
RBMKBase.renderLid = false;
|
||||
tessellator.addTranslation(0, -1, 0);
|
||||
RBMKBase.renderLid = lid;
|
||||
renderer.renderStandardBlock(block, x, y + 1, z);
|
||||
RBMKBase.renderLid = RBMKBase.LID_NONE;
|
||||
hasLid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!hasLid) {
|
||||
tessellator.addTranslation(0, 1, 0);
|
||||
renderer.setRenderBounds(0.0625, 0, 0.0625, 0.4375, 0.125, 0.4375);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.renderStandardBlock(block, x, y + 1, z);
|
||||
renderer.setRenderBounds(0.0625, 0, 0.5625, 0.4375, 0.125, 0.9375);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.renderStandardBlock(block, x, y + 1, z);
|
||||
renderer.setRenderBounds(0.5625, 0, 0.5625, 0.9375, 0.125, 0.9375);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.renderStandardBlock(block, x, y + 1, z);
|
||||
renderer.setRenderBounds(0.5625, 0, 0.0625, 0.9375, 0.125, 0.4375);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
tessellator.addTranslation(0, -1, 0);
|
||||
renderer.renderStandardBlock(block, x, y + 1, z);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
@ -130,13 +128,6 @@ public class RenderRBMKControl implements ISimpleBlockRenderingHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return RBMKBase.renderIDControl;
|
||||
}
|
||||
@Override public boolean shouldRender3DInInventory(int modelId) { return true; }
|
||||
@Override public int getRenderId() { return RBMKBase.renderIDControl; }
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ public class RenderRBMKReflector implements ISimpleBlockRenderingHandler {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
RBMKBase.renderLid = RBMKBase.LID_NONE;
|
||||
tessellator.setColorOpaque_F(1, 1, 1);
|
||||
|
||||
GL11.glTranslated(0, -0.675, 0);
|
||||
@ -55,14 +56,13 @@ public class RenderRBMKReflector implements ISimpleBlockRenderingHandler {
|
||||
int[] pos = ((BlockDummyable) block).findCore(world, x, y, z);
|
||||
if(pos != null) {
|
||||
int coreMeta = world.getBlockMetadata(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(coreMeta - 10 == RBMKBase.DIR_NORMAL_LID.ordinal()) {
|
||||
tessellator.addTranslation(0, 1, 0);
|
||||
int lid = RBMKBase.metaToLid(coreMeta);
|
||||
|
||||
if(lid != RBMKBase.LID_NONE) {
|
||||
renderer.setRenderBounds(0, 0, 0, 1, 0.25, 1);
|
||||
RBMKBase.renderLid = true;
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
RBMKBase.renderLid = false;
|
||||
tessellator.addTranslation(0, -1, 0);
|
||||
RBMKBase.renderLid = lid;
|
||||
renderer.renderStandardBlock(block, x, y + 1, z);
|
||||
RBMKBase.renderLid = RBMKBase.LID_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -70,13 +70,6 @@ public class RenderRBMKReflector implements ISimpleBlockRenderingHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return RBMKBase.renderIDPassive;
|
||||
}
|
||||
@Override public boolean shouldRender3DInInventory(int modelId) { return true; }
|
||||
@Override public int getRenderId() { return RBMKBase.renderIDPassive; }
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@ public class RenderRBMKRod implements ISimpleBlockRenderingHandler {
|
||||
GL11.glPushMatrix();
|
||||
RBMKRod rod = (RBMKRod) block;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
RBMKBase.renderLid = RBMKBase.LID_NONE;
|
||||
IIcon iicon = block.getIcon(0, 0);
|
||||
IIcon sideIcon = block.getIcon(2, 0);
|
||||
tessellator.setColorOpaque_F(1, 1, 1);
|
||||
@ -81,14 +82,13 @@ public class RenderRBMKRod implements ISimpleBlockRenderingHandler {
|
||||
int[] pos = ((BlockDummyable) block).findCore(world, x, y, z);
|
||||
if(pos != null) {
|
||||
int coreMeta = world.getBlockMetadata(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(coreMeta - 10 == RBMKBase.DIR_NORMAL_LID.ordinal()) {
|
||||
tessellator.addTranslation(0, 1, 0);
|
||||
int lid = RBMKBase.metaToLid(coreMeta);
|
||||
|
||||
if(lid != RBMKBase.LID_NONE) {
|
||||
renderer.setRenderBounds(0, 0, 0, 1, 0.25, 1);
|
||||
RBMKBase.renderLid = true;
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
RBMKBase.renderLid = false;
|
||||
tessellator.addTranslation(0, -1, 0);
|
||||
RBMKBase.renderLid = lid;
|
||||
renderer.renderStandardBlock(block, x, y + 1, z);
|
||||
RBMKBase.renderLid = RBMKBase.LID_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -96,13 +96,6 @@ public class RenderRBMKRod implements ISimpleBlockRenderingHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return RBMKBase.renderIDRods;
|
||||
}
|
||||
@Override public boolean shouldRender3DInInventory(int modelId) { return true; }
|
||||
@Override public int getRenderId() { return RBMKBase.renderIDRods; }
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControl;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlManual;
|
||||
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
@ -12,8 +13,16 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderRBMKControlRod extends TileEntitySpecialRenderer {
|
||||
|
||||
private ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control.png");
|
||||
|
||||
private ResourceLocation[] textures = new ResourceLocation[] {
|
||||
new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control_red.png"),
|
||||
new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control_yellow.png"),
|
||||
new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control_green.png"),
|
||||
new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control_blue.png"),
|
||||
new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control_purple.png"),
|
||||
};
|
||||
private ResourceLocation textureStandard = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control.png");
|
||||
private ResourceLocation textureAuto = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control_auto.png");
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float i) {
|
||||
@ -43,6 +52,14 @@ public class RenderRBMKControlRod extends TileEntitySpecialRenderer {
|
||||
int lY = brightness / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)lX / 1.0F, (float)lY / 1.0F);
|
||||
|
||||
ResourceLocation texture = textureAuto;
|
||||
|
||||
if(control instanceof TileEntityRBMKControlManual) {
|
||||
TileEntityRBMKControlManual crm = (TileEntityRBMKControlManual) control;
|
||||
if(crm.color == null) texture = textureStandard;
|
||||
else texture = textures[crm.color.ordinal()];
|
||||
}
|
||||
|
||||
bindTexture(texture);
|
||||
|
||||
double level = control.lastLevel + (control.level - control.lastLevel) * i;
|
||||
|
||||
@ -11,7 +11,7 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderRBMKLid extends TileEntitySpecialRenderer {
|
||||
public class RenderRBMKFuelChannel extends TileEntitySpecialRenderer {
|
||||
|
||||
private static final ResourceLocation texture_rods = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_element_fuel.png");
|
||||
|
||||
@ -2,6 +2,9 @@ package com.hbm.tileentity.machine;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.hazard.HazardRegistry;
|
||||
import com.hbm.hazard.HazardSystem;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.container.ContainerMachineAnnihilator;
|
||||
@ -67,6 +70,7 @@ public class TileEntityMachineAnnihilator extends TileEntityMachineBase implemen
|
||||
boolean didSomething = false;
|
||||
|
||||
if(slots[0] != null) {
|
||||
onDestroy(slots[0]);
|
||||
tryAddPayout(data.pushToPool(pool, slots[0], false));
|
||||
this.slots[0] = null;
|
||||
this.markChanged();
|
||||
@ -100,6 +104,7 @@ public class TileEntityMachineAnnihilator extends TileEntityMachineBase implemen
|
||||
if(slots[9] != null) {
|
||||
ItemStack single = slots[9].copy();
|
||||
single.stackSize = 1;
|
||||
onDestroy(single);
|
||||
ItemStack payout = data.pushToPool(pool, single, true);
|
||||
this.decrStackSize(9, 1);
|
||||
if(payout != null) {
|
||||
@ -117,6 +122,14 @@ public class TileEntityMachineAnnihilator extends TileEntityMachineBase implemen
|
||||
}
|
||||
}
|
||||
|
||||
public void onDestroy(ItemStack stack) {
|
||||
float radiation = HazardSystem.getHazardLevelFromStack(stack, HazardRegistry.RADIATION);
|
||||
if(radiation > 0) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||
ChunkRadiationManager.proxy.incrementRad(worldObj, this.xCoord - dir.offsetX * 3, this.yCoord + 9, this.zCoord - dir.offsetZ * 3, Math.min(radiation * 5F, 1_000F));
|
||||
}
|
||||
}
|
||||
|
||||
public DirPos[] getConPos() {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
@ -36,25 +36,18 @@ public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase im
|
||||
public void updateEntity() {
|
||||
|
||||
if(worldObj.isRemote) {
|
||||
|
||||
this.lastLevel = this.level;
|
||||
|
||||
} else {
|
||||
|
||||
if(level < targetLevel) {
|
||||
|
||||
level += speed * RBMKDials.getControlSpeed(worldObj);
|
||||
|
||||
if(level > targetLevel)
|
||||
level = targetLevel;
|
||||
if(level > targetLevel) level = targetLevel;
|
||||
}
|
||||
|
||||
if(level > targetLevel) {
|
||||
|
||||
level -= speed * RBMKDials.getControlSpeed(worldObj);
|
||||
|
||||
if(level < targetLevel)
|
||||
level = targetLevel;
|
||||
if(level < targetLevel) level = targetLevel;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -117,16 +117,17 @@ public class TileEntityRBMKControlManual extends TileEntityRBMKControl implement
|
||||
buf.writeDouble(this.startingLevel);
|
||||
if(this.color != null)
|
||||
buf.writeInt(this.color.ordinal());
|
||||
else
|
||||
buf.writeInt(-1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
this.startingLevel = buf.readDouble();
|
||||
if(buf.isReadable(1)) {
|
||||
int color = buf.readInt();
|
||||
this.color = RBMKColor.values()[MathHelper.clamp_int(color, 0, RBMKColor.values().length)];
|
||||
}
|
||||
int color = buf.readInt();
|
||||
this.color = RBMKColor.values()[MathHelper.clamp_int(color, 0, RBMKColor.values().length)];
|
||||
if(color == -1) this.color = null;
|
||||
}
|
||||
|
||||
public static enum RBMKColor {
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"ru_RU": "Продвинутый сплав"
|
||||
},
|
||||
"content": {
|
||||
"en_US": "Made in a [[blast furnace|Blast Furnace]] from [[steel|Steel]] and [[Minecraft grade copper|Minecraft Grade Copper]]. Makes better-than-diamond gear. Also used in some high-powered magnets for the [[fusion reactor|Fusion Reactor]] and the [[exposure chamber|Exposure Chamber]].",
|
||||
"en_US": "Made in a [[blast furnace|Blast Furnace]] from [[steel|Steel]] and [[Minecraft grade copper|Minecraft Grade Copper]]. Makes better-than-diamond gear. Also used in some high-powered magnets for the [[exposure chamber|Exposure Chamber]].",
|
||||
"uk_UA": "Виготовлено в [[доменній печі|Blast Furnace]] зі [[сталі|Steel]] та [[червоної міді|Minecraft Grade Copper]]. З нього робиться спорядження краще за алмазне. Також використовується в деяких потужних магнітах для [[термоядерного реактору|Fusion Reactor]] та [[камери опромінювання|Exposure Chamber]].",
|
||||
"ru_RU": "Изготовлено в [[доменной печи|Blast Furnace]] из [[стали|Steel]] и [[красной меди|Minecraft Grade Copper]]. Из него делают инструменты, превосходящие алмазные. Также используется в некоторых мощных магнитах для [[термоядерного реактора|Fusion Reactor]] и [[камеры облучения|Exposure Chamber]].",
|
||||
"zh_CN": "在[[高炉|Blast Furnace]]中使用[[钢|Steel]]和[[紫铜|Minecraft Grade Copper]]制成。其制成的工具比钻石更加优质。同时也能用于制作[[聚变反应堆|Fusion Reactor]]和[[辐照舱|Exposure Chamber]]的高能磁铁。"
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"zh_CN": "BSCCO超导体"
|
||||
},
|
||||
"content": {
|
||||
"en_US": "Powerful superconductor, used in high tier circuits and coils for the [[particle accelerator|Particle Accelerator]]. Requires [[bismuth|Bismuth]], and is therefore only obtainable after building an [[RBMK]].",
|
||||
"en_US": "Powerful superconductor, used in high tier circuits and coils for the [[particle accelerator|Particle Accelerator]] as well as the [[fusion reactor|Fusion Reactor Vessel]]. Requires [[bismuth|Bismuth]], and is therefore only obtainable after building an [[RBMK]].",
|
||||
"uk_UA": "Потужний надпровідник, що використовується у високоякісних платах та котушках для [[прискорювача часток|Particle Accelerator]]. Потребує [[вісмут|Bismuth]], і тому доступний лише після побудови [[РБМК|RBMK]].",
|
||||
"ru_RU": "Мощный сверхпроводник, используемый в высокоуровневых цепях и катушках для [[ускорителя частиц|Particle Accelerator]]. Требует [[висмут|Bismuth]], и поэтому доступен только после постройки [[РБМК|RBMK]].",
|
||||
"zh_CN": "强力的超导体,用于制作高等级的电路及用于[[粒子加速器|Particle Accelerator]]的线圈。需要[[铋|Bismuth]]制作,因此只能在建造[[RBMK]]后获得。"
|
||||
|
||||
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 307 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 459 B After Width: | Height: | Size: 496 B |
|
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 459 B |
|
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 188 B |
|
After Width: | Height: | Size: 415 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 988 B After Width: | Height: | Size: 613 B |
|
Before Width: | Height: | Size: 1000 B After Width: | Height: | Size: 629 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 425 B |
|
Before Width: | Height: | Size: 1019 B After Width: | Height: | Size: 1019 B |
|
After Width: | Height: | Size: 624 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 215 B |
|
After Width: | Height: | Size: 589 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 425 B |
|
After Width: | Height: | Size: 670 B |
|
After Width: | Height: | Size: 603 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 425 B |
|
After Width: | Height: | Size: 594 B |
|
After Width: | Height: | Size: 188 B |
|
After Width: | Height: | Size: 339 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 364 B |
|
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 204 B |
|
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 355 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 215 B |
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 434 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 425 B |
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 357 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 215 B |
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 432 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 425 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 425 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 425 B |
|
After Width: | Height: | Size: 188 B |
|
After Width: | Height: | Size: 415 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 370 B After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 307 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 363 B After Width: | Height: | Size: 300 B |
|
After Width: | Height: | Size: 188 B |
|
After Width: | Height: | Size: 383 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 274 B |
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 307 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 449 B |
|
After Width: | Height: | Size: 188 B |
|
After Width: | Height: | Size: 322 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 270 B |