Added manual entries for control panel related things
Fixed some problems when playing on a dedicated server
This commit is contained in:
parent
7cc0d9d9fe
commit
c680f9a466
|
@ -70,7 +70,7 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
deobfCompile "net.industrial-craft:industrialcraft-2:2.6.+"
|
||||
//deobfCompile "blusunrize:ImmersiveEngineering:0.10-+:deobf"
|
||||
deobfCompile "blusunrize:ImmersiveEngineering:0.10-+:deobf"
|
||||
}
|
||||
|
||||
jar {
|
||||
|
|
|
@ -49,6 +49,7 @@ import net.minecraft.client.gui.Gui;
|
|||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -207,6 +208,32 @@ public class ClientProxy extends CommonProxy {
|
|||
m.addEntry("industrialWires.jacobs", "industrialWires",
|
||||
new ManualPages.CraftingMulti(m, "industrialWires.jacobs0", new ItemStack(IndustrialWires.jacobsLadder, 1, 0), new ItemStack(IndustrialWires.jacobsLadder, 1, 1), new ItemStack(IndustrialWires.jacobsLadder, 1, 2)),
|
||||
new ManualPages.Text(m, "industrialWires.jacobs1"));
|
||||
|
||||
|
||||
m.addEntry("industrialWires.intro", "control_panels",
|
||||
new ManualPages.Text(m, "industrialWires.intro0"),
|
||||
new ManualPages.Text(m, "industrialWires.intro1"),
|
||||
new ManualPages.Crafting(m, "industrialWires.intro2", new ItemStack(Blocks.BEACON)),//IndustrialWires.panel, 1, BlockTypes_Panel.DUMMY.ordinal()))//TODO recipes
|
||||
new ManualPages.Text(m, "industrialWires.intor3")
|
||||
);
|
||||
m.addEntry("industrialWires.panel_creator", "control_panels",
|
||||
new ManualPages.Crafting(m, "industrialWires.panel_creator0", new ItemStack(Blocks.BEACON)),//IndustrialWires.panel, 1, BlockTypes_Panel.CREATOR.ordinal()))//TODO recipes
|
||||
new ManualPages.Text(m, "industrialWires.panel_creator1"),
|
||||
new ManualPages.Text(m, "industrialWires.panel_creator2")
|
||||
);
|
||||
m.addEntry("industrialWires.redstone", "control_panels",
|
||||
new ManualPages.Crafting(m, "industrialWires.redstone0", new ItemStack(Blocks.BEACON)),//IndustrialWires.panel, 1, BlockTypes_Panel.RS_WIRE.ordinal()))//TODO recipes
|
||||
new ManualPages.Text(m, "industrialWires.redstone1")
|
||||
);
|
||||
m.addEntry("industrialWires.components", "control_panels",
|
||||
new ManualPages.Crafting(m, "industrialWires.button", new ItemStack(Blocks.BEACON)),//IndustrialWires.panelComponent, 1, 0)),//TODO recipes
|
||||
new ManualPages.Crafting(m, "industrialWires.label", new ItemStack(Blocks.BEACON)),//IndustrialWires.panelComponent, 1, 1)),//TODO recipes
|
||||
new ManualPages.Crafting(m, "industrialWires.indicator_light", new ItemStack(Blocks.BEACON)),//IndustrialWires.panelComponent, 1, 2)),//TODO recipes
|
||||
new ManualPages.Crafting(m, "industrialWires.slider", new ItemStack(Blocks.BEACON)),//IndustrialWires.panelComponent, 1, 3)),//TODO recipes
|
||||
new ManualPages.CraftingMulti(m, "industrialWires.toggle_switch", new ItemStack(Blocks.BEACON)),//IndustrialWires.panelComponent, 1, 5), new ItemStack(IndustrialWires.panelComponent, 1, 6)),//TODO recipes
|
||||
new ManualPages.Text(m, "industrialWires.toggle_switch1"),
|
||||
new ManualPages.Crafting(m, "industrialWires.variac", new ItemStack(Blocks.BEACON))//IndustrialWires.panelComponent, 1, 4)),//TODO recipes
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -90,6 +90,8 @@ public class GuiPanelCreator extends GuiContainer {
|
|||
} else {
|
||||
tooltip = I18n.format(IndustrialWires.MODID+".desc.enable_snap");
|
||||
}
|
||||
} else if (buttonList.get(3).isMouseOver()) {
|
||||
tooltip = I18n.format(IndustrialWires.MODID+".desc.disassemble");
|
||||
}
|
||||
if (tooltip!=null) {
|
||||
ClientUtils.drawHoveringText(ImmutableList.of(tooltip), mouseX, mouseY, mc.fontRendererObj);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package malte0811.industrialWires.client.panelmodel;
|
||||
|
||||
import blusunrize.immersiveengineering.api.IEApi;
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
@ -48,7 +49,10 @@ public class PanelModel implements IBakedModel {
|
|||
.maximumSize(100)
|
||||
.expireAfterAccess(60, TimeUnit.SECONDS)
|
||||
.build();
|
||||
|
||||
static {
|
||||
IEApi.renderCacheClearers.add(modelCache::invalidateAll);
|
||||
IEApi.renderCacheClearers.add(PanelItemOverride.ITEM_MODEL_CACHE::invalidateAll);
|
||||
}
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(@Nullable IBlockState state, @Nullable EnumFacing side, long rand) {
|
||||
if (side!=null) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.client.settings.GameSettings;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
@ -41,7 +40,6 @@ public class RawModelFontRenderer extends FontRenderer {
|
|||
|
||||
public RawModelFontRenderer(GameSettings settings, ResourceLocation font, TextureManager manager, boolean isUnicode, float scale) {
|
||||
super(settings, font, manager, isUnicode);
|
||||
manager.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
this.scale = scale/(9*16);
|
||||
onResourceManagerReload(null);
|
||||
}
|
||||
|
@ -101,5 +99,8 @@ public class RawModelFontRenderer extends FontRenderer {
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void bindTexture(ResourceLocation location) {
|
||||
//NO-OP
|
||||
}
|
||||
}
|
|
@ -19,20 +19,22 @@
|
|||
package malte0811.industrialWires.controlpanel;
|
||||
|
||||
import blusunrize.immersiveengineering.common.util.chickenbones.Matrix4;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
import malte0811.industrialWires.blocks.controlpanel.TileEntityPanel;
|
||||
import malte0811.industrialWires.client.RawQuad;
|
||||
import malte0811.industrialWires.client.gui.GuiPanelCreator;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import org.lwjgl.util.vector.Vector3f;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class CoveredToggleSwitch extends ToggleSwitch {
|
||||
private float[] color = {1, 0, 0, 1};
|
||||
private int color = 0xff0000;
|
||||
private SwitchState state = SwitchState.CLOSED;
|
||||
|
||||
public CoveredToggleSwitch() {
|
||||
|
@ -42,6 +44,7 @@ public class CoveredToggleSwitch extends ToggleSwitch {
|
|||
|
||||
@Override
|
||||
public List<RawQuad> getQuads() {
|
||||
float[] color = PanelUtils.getFloatColor(true, this.color);
|
||||
active = state.active;
|
||||
List<RawQuad> ret = super.getQuads();
|
||||
Matrix4 rot = null;
|
||||
|
@ -50,7 +53,7 @@ public class CoveredToggleSwitch extends ToggleSwitch {
|
|||
rot.rotate(-Math.PI*.4, 1, 0, 0);
|
||||
}
|
||||
PanelUtils.addColoredBox(color, color, null, new Vector3f(0, 0, 0), new Vector3f(sizeX, getHeight(), sizeY), ret,
|
||||
false, rot);
|
||||
false, rot, true);
|
||||
ret.remove(ret.size()-2);//remove front face
|
||||
ret.remove(ret.size()-1);//remove front face
|
||||
return ret;
|
||||
|
@ -71,7 +74,8 @@ public class CoveredToggleSwitch extends ToggleSwitch {
|
|||
|
||||
@Override
|
||||
public void renderInGUI(GuiPanelCreator gui) {
|
||||
super.renderInGUIDefault(gui, 0xff0000);//TODO maybe something nicer?
|
||||
super.renderInGUIDefault(gui, 0xff000000|this.color);
|
||||
super.renderInGUI(gui);
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,11 +86,13 @@ public class CoveredToggleSwitch extends ToggleSwitch {
|
|||
}
|
||||
nbt.setByte(RS_CHANNEL, rsOutputChannel);
|
||||
nbt.setInteger(RS_ID, rsOutputId);
|
||||
nbt.setInteger(COLOR, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readCustomNBT(NBTTagCompound nbt) {
|
||||
state = SwitchState.values()[nbt.getInteger("state")];
|
||||
color = nbt.getInteger(COLOR);
|
||||
rsOutputChannel = nbt.getByte(RS_CHANNEL);
|
||||
rsOutputId = nbt.getInteger(RS_ID);
|
||||
}
|
||||
|
@ -105,6 +111,42 @@ public class CoveredToggleSwitch extends ToggleSwitch {
|
|||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatConfig[] getFloatOptions() {
|
||||
float[] color = PanelUtils.getFloatColor(true, this.color);
|
||||
int x = 70;
|
||||
int yOffset = 10;
|
||||
return new FloatConfig[]{
|
||||
new FloatConfig("red", x, yOffset, color[0], 60),
|
||||
new FloatConfig("green", x, yOffset+20, color[1], 60),
|
||||
new FloatConfig("blue", x, yOffset+40, color[2], 60)
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyConfigOption(ConfigType type, int id, NBTBase value) {
|
||||
super.applyConfigOption(type, id, value);
|
||||
if (type==ConfigType.FLOAT) {
|
||||
color = PanelUtils.setColor(color, id, value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fomatConfigName(ConfigType type, int id) {
|
||||
if (type==ConfigType.FLOAT) {
|
||||
return I18n.format(IndustrialWires.MODID+".desc."+(id==0?"red":(id==1?"green":"blue")));
|
||||
}
|
||||
return super.fomatConfigName(type, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String fomatConfigDescription(ConfigType type, int id) {
|
||||
if (type==ConfigType.FLOAT) {
|
||||
return null;
|
||||
}
|
||||
return super.fomatConfigDescription(type, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
@ -116,7 +158,7 @@ public class CoveredToggleSwitch extends ToggleSwitch {
|
|||
if (active != that.active) return false;
|
||||
if (rsOutputId != that.rsOutputId) return false;
|
||||
if (rsOutputChannel != that.rsOutputChannel) return false;
|
||||
if (!Arrays.equals(color, that.color)) return false;
|
||||
if (color != that.color) return false;
|
||||
return state == that.state;
|
||||
}
|
||||
|
||||
|
@ -126,7 +168,7 @@ public class CoveredToggleSwitch extends ToggleSwitch {
|
|||
int result = super.hashCode();
|
||||
result = 31 * result + rsOutputId;
|
||||
result = 31 * result + (int) rsOutputChannel;
|
||||
result = 31 * result + Arrays.hashCode(color);
|
||||
result = 31 * result + color;
|
||||
result = 31 * result + (state != null ? state.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,8 @@ import net.minecraft.util.math.Vec3i;
|
|||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.client.model.obj.OBJModel;
|
||||
import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.util.vector.Vector3f;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
@ -60,6 +62,7 @@ public final class PanelUtils {
|
|||
private PanelUtils() {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static List<BakedQuad> generateQuads(PanelRenderProperties components) {
|
||||
if (PANEL_TEXTURE == null) {
|
||||
PANEL_TEXTURE = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(IndustrialWires.MODID + ":blocks/control_panel");
|
||||
|
@ -109,6 +112,7 @@ public final class PanelUtils {
|
|||
return ret;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static BakedQuad bakeQuad(RawQuad raw, Matrix4 transform, Matrix4 transfNormal, boolean flip) {
|
||||
VertexFormat format = DefaultVertexFormats.ITEM;
|
||||
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder(format);
|
||||
|
@ -130,6 +134,7 @@ public final class PanelUtils {
|
|||
}
|
||||
|
||||
//mostly copied from IE's ClientUtils, it has protected access there...
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void putVertexData(VertexFormat format, UnpackedBakedQuad.Builder builder, Vector3f pos, OBJModel.Normal faceNormal, double u, double v, TextureAtlasSprite sprite, float[] colorA) {
|
||||
for (int e = 0; e < format.getElementCount(); e++)
|
||||
switch (format.getElement(e).getUsage()) {
|
||||
|
@ -158,22 +163,27 @@ public final class PanelUtils {
|
|||
private static final float[] UV_FULL = {0, 0, 16, 16};
|
||||
private static final float[] WHITE = {1, 1, 1, 1};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void addTexturedBox(Vector3f min, Vector3f size, List<RawQuad> out, float[] uvs, TextureAtlasSprite tex) {
|
||||
addBox(WHITE, WHITE, WHITE, min, size, out, true, uvs, tex, null, false);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void addColoredBox(float[] colorTop, float[] colorSides, float[] colorBottom, Vector3f min, Vector3f size, List<RawQuad> out, boolean doBottom) {
|
||||
addBox(colorTop, colorSides, colorBottom, min, size, out, doBottom, UV_FULL, ModelLoader.White.INSTANCE, null, false);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void addColoredBox(float[] colorTop, float[] colorSides, float[] colorBottom, Vector3f min, Vector3f size, List<RawQuad> out, boolean doBottom, @Nullable Matrix4 mat) {
|
||||
addBox(colorTop, colorSides, colorBottom, min, size, out, doBottom, UV_FULL, ModelLoader.White.INSTANCE, mat, false);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void addColoredBox(float[] colorTop, float[] colorSides, float[] colorBottom, Vector3f min, Vector3f size, List<RawQuad> out, boolean doBottom, @Nullable Matrix4 mat, boolean inside) {
|
||||
addBox(colorTop, colorSides, colorBottom, min, size, out, doBottom, UV_FULL, ModelLoader.White.INSTANCE, mat, inside);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void addBox(float[] colorTop, float[] colorSides, float[] colorBottom, Vector3f min, Vector3f size, List<RawQuad> out, boolean doBottom, float[] uvs, TextureAtlasSprite tex,
|
||||
@Nullable Matrix4 mat, boolean inside) {
|
||||
addQuad(out, new Vector3f(min.x, min.y + size.y, min.z), new Vector3f(min.x, min.y + size.y, min.z + size.z),
|
||||
|
@ -198,14 +208,17 @@ public final class PanelUtils {
|
|||
EnumFacing.SOUTH, colorSides, tex, uvs, mat, inside);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void addColoredQuad(List<RawQuad> out, Vector3f v0, Vector3f v1, Vector3f v2, Vector3f v3, EnumFacing dir, float[] color) {
|
||||
addQuad(out, v0, v1, v2, v3, dir, color, Minecraft.getMinecraft().getTextureMapBlocks().getTextureExtry(ModelLoader.White.LOCATION.toString()), UV_FULL, null, false);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void addColoredQuad(List<RawQuad> out, Vector3f v0, Vector3f v1, Vector3f v2, Vector3f v3, EnumFacing dir, float[] color, @Nullable Matrix4 mat) {
|
||||
addQuad(out, v0, v1, v2, v3, dir, color, Minecraft.getMinecraft().getTextureMapBlocks().getTextureExtry(ModelLoader.White.LOCATION.toString()), UV_FULL, mat, false);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void addQuad(List<RawQuad> out, Vector3f v0, Vector3f v1, Vector3f v2, Vector3f v3, EnumFacing dir, float[] color, TextureAtlasSprite tex, float[] uvs, @Nullable Matrix4 mat, boolean bidirectional) {
|
||||
Vec3i dirV = dir.getDirectionVec();
|
||||
RawQuad quad = new RawQuad(v0, v1, v2, v3, dir, tex,
|
||||
|
@ -214,13 +227,15 @@ public final class PanelUtils {
|
|||
quad = quad.apply(mat);
|
||||
}
|
||||
out.add(quad);
|
||||
dirV = dir.getOpposite().getDirectionVec();
|
||||
quad = new RawQuad(v3, v2, v1, v0, dir, tex,
|
||||
color, new Vector3f(dirV.getX(), dirV.getY(), dirV.getZ()), uvs);
|
||||
if (mat!=null) {
|
||||
quad = quad.apply(mat);
|
||||
if (bidirectional) {
|
||||
dirV = dir.getOpposite().getDirectionVec();
|
||||
quad = new RawQuad(v3, v2, v1, v0, dir, tex,
|
||||
color, new Vector3f(dirV.getX(), dirV.getY(), dirV.getZ()), uvs);
|
||||
if (mat != null) {
|
||||
quad = quad.apply(mat);
|
||||
}
|
||||
out.add(quad);
|
||||
}
|
||||
out.add(quad);
|
||||
}
|
||||
|
||||
public static void addInfo(ItemStack stack, List<String> list, NBTTagCompound data) {
|
||||
|
@ -256,6 +271,9 @@ public final class PanelUtils {
|
|||
case 5://Toggle switch
|
||||
addCommonInfo(data, list, false, true);
|
||||
break;
|
||||
case 6://Covered toggle switch
|
||||
addCommonInfo(data, list, true, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -147,14 +147,14 @@ public class ToggleSwitch extends PanelComponent implements IConfigurableCompone
|
|||
return .0625F*3/2;
|
||||
}
|
||||
|
||||
@Override//TODO implement
|
||||
@Override
|
||||
public void renderInGUI(GuiPanelCreator gui) {
|
||||
AxisAlignedBB aabb = getBlockRelativeAABB();
|
||||
double zOffset = (aabb.maxY-aabb.minY-sizeX)/2;
|
||||
double zOffset = (aabb.maxZ-aabb.minZ-sizeX)/2;
|
||||
int left = (int) (gui.getX0()+aabb.minX*gui.panelSize);
|
||||
int top = (int) Math.floor(gui.getY0()+(aabb.minZ+zOffset)*gui.panelSize);
|
||||
int top = (int) Math.ceil(gui.getY0()+(aabb.minZ+zOffset)*gui.panelSize);
|
||||
int right = (int) (gui.getX0()+aabb.maxX*gui.panelSize);
|
||||
int bottom = (int) Math.ceil(gui.getY0()+(aabb.maxZ-zOffset)*gui.panelSize);
|
||||
int bottom = (int) Math.floor(gui.getY0()+(aabb.maxZ-zOffset)*gui.panelSize);
|
||||
Gui.drawRect(left, top, right, bottom, GRAY_INT);
|
||||
double xOffset = (aabb.maxX-aabb.minX-rodRadius)/2;
|
||||
left = (int) (gui.getX0()+(aabb.minX+xOffset)*gui.panelSize);
|
||||
|
@ -220,7 +220,6 @@ public class ToggleSwitch extends PanelComponent implements IConfigurableCompone
|
|||
@Override
|
||||
public String fomatConfigName(ConfigType type, int id) {
|
||||
switch (type) {
|
||||
case BOOL:
|
||||
case RS_CHANNEL:
|
||||
case INT:
|
||||
return null;
|
||||
|
|
|
@ -36,6 +36,8 @@ import net.minecraft.util.EnumHand;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -67,6 +69,7 @@ public class ItemPanelComponent extends Item {
|
|||
}
|
||||
|
||||
@Nonnull
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public FontRenderer getFontRenderer(ItemStack stack) {
|
||||
return ClientProxy.itemFont;//TODO non-core-IE solution?
|
||||
|
|
|
@ -61,7 +61,7 @@ public class MessageGUIInteract implements IMessage {
|
|||
return null;
|
||||
}
|
||||
private void handle(MessageGUIInteract msg, EntityPlayerMP player) {
|
||||
if (player.getDistanceSqToCenter(msg.pos)<100) {//closer than 10 blocks TODO use player reach distance?
|
||||
if (player.getDistanceSqToCenter(msg.pos)<100) {//closer than 10 blocks
|
||||
TileEntity te = player.worldObj.getTileEntity(msg.pos);
|
||||
if (te instanceof INetGUI) {
|
||||
((INetGUI) te).onChange(msg.data, player);
|
||||
|
|
|
@ -68,7 +68,7 @@ public class MessagePanelInteract implements IMessage {
|
|||
return null;
|
||||
}
|
||||
private void handle(MessagePanelInteract msg, EntityPlayerMP player) {
|
||||
if (player.getDistanceSqToCenter(msg.pos)<100) {//closer than 10 blocks TODO use player reach distance?
|
||||
if (player.getDistanceSqToCenter(msg.pos)<100) {//closer than 10 blocks
|
||||
TileEntity te = player.worldObj.getTileEntity(msg.pos);
|
||||
if (te instanceof TileEntityPanel) {
|
||||
((TileEntityPanel) te).interactServer(msg.hitRelative, msg.pcId, player);
|
||||
|
|
|
@ -43,7 +43,8 @@ industrialwires.desc.enable_snap=Snap new components to the 16*16 grid
|
|||
industrialwires.desc.disable_snap=Allow free placing of components
|
||||
industrialwires.desc.latching=Latching
|
||||
industrialwires.desc.latching_info=Does this button stay on indefinitely?
|
||||
industrialwires.desc.rschannel_info=The channel/color to output a signal to
|
||||
industrialwires.desc.latching_info=Does this button stay on indefinitely?
|
||||
industrialwires.desc.disassemble=Disassemble the panel
|
||||
industrialwires.desc.rsid_info=The ID of the redstone wire controller to output a signal to
|
||||
industrialwires.desc.label_text=The text in this label
|
||||
industrialwires.desc.red=Red
|
||||
|
@ -68,6 +69,7 @@ death.attack.industrialwires.jacobs_ladder=%1$s was electrocuted by a Jacob's La
|
|||
itemGroup.industrialwires=Industrial Wires
|
||||
|
||||
ie.manual.category.industrialWires.name=Industrial Wires
|
||||
ie.manual.category.control_panels.name=Control Panels
|
||||
|
||||
ie.manual.entry.industrialWires.wires.name=Industrial Wires
|
||||
ie.manual.entry.industrialWires.wires.subtext=No complex impedance!
|
||||
|
@ -84,4 +86,34 @@ ie.manual.entry.industrialWires.mechConv2=lost with each conversion.<br>As a lit
|
|||
ie.manual.entry.industrialWires.jacobs.name=Jacob's Ladders
|
||||
ie.manual.entry.industrialWires.jacobs.subtext=Probably contain PCB's!
|
||||
ie.manual.entry.industrialWires.jacobs0=By applying a high voltage between 2 electrodes forming a "V" one can create an arc travelling upwards. They don't serve a particular purpose apart from being a nice-looking waste of power. Power can be supplied using either Flux or EU. The energy usage varies with the size of the ladder.
|
||||
ie.manual.entry.industrialWires.jacobs1=These are the required power values in EU: <config;dA;iwJacobsUsage>. Due to the voltages involved touching the ladder while active is not a good idea. Applying salt to the electrodes will cause the arc to be colored orange for a short time due to the sodium contained in the salt.
|
||||
ie.manual.entry.industrialWires.jacobs1=These are the required power values in EU: <config;dA;iwJacobsUsage>. Due to the voltages involved touching the ladder while active is not a good idea. Applying salt to the electrodes will cause the arc to be colored orange for a short time due to the sodium contained in the salt.
|
||||
|
||||
|
||||
|
||||
ie.manual.entry.industrialWires.intro.name=Introduction
|
||||
ie.manual.entry.industrialWires.intro.subtext=
|
||||
ie.manual.entry.industrialWires.intro0=Control Panels allow you to monitor and control a large amount of redstone signals using only a few blocks. Those signals can currently be connected using redstone wires and connectors.<br>Buttons, switches, indicator lights and other things that can be placed on a control panel are called §l(Panel) Components§r<br>To create a control panel you will need a Panel Creator, the individual components and a basic machine casing as the enclosure of the panel. Each
|
||||
ie.manual.entry.industrialWires.intro1=component is described in the entry "Panel Components". Right-clicking with a panel component opens up a GUI in which the properties of the component, like the redstone channel and ID or the color, can be configured.
|
||||
ie.manual.entry.industrialWires.intro2=A §l(panel) network§r is formed by panel blocks connected to each other, directly or through other panel blocks. Panel blocks include the control panel itself, the panel connector and the Redstone Wire Controller. If multiple components in one network are configured to modify the same
|
||||
ie.manual.entry.industrialWires.intro3=redstone signal, the resulting behavior is undefined (but won't crash the game). Having multiple components accepting the same signal on a network is valid though.
|
||||
|
||||
ie.manual.entry.industrialWires.panel_creator.name=Panel Creator
|
||||
ie.manual.entry.industrialWires.panel_creator.subtext=
|
||||
ie.manual.entry.industrialWires.panel_creator0=The GUI of the panel creator consists of two major sections: The controls on the left and the panel on the right. Components can be placed on the panel by "placing" the items in the corresponding point in the GUI. If the component is surrounded by a red area, it can not be placed in that
|
||||
ie.manual.entry.industrialWires.panel_creator1=position on the panel. This usually means that it is either overlapping with an other component or isn't completely on the panel. The top button on the left (D) disassembles an existing control panel when it is placed in the slot beneath the button: The components of that panel are placed in the GUI, allowing them to be repositioned. The machine casing is lost in this process. The next button (C) turns a machine casing in the slot into a control panel with the components as positioned in the right of the GUI. The button
|
||||
ie.manual.entry.industrialWires.panel_creator2=labeled R removes all components from the GUI panel area and places them in your inventory. Finally the last button (S) changes between being able to place components anywhere on the panel to only being able to place them on a 16x16 grid.
|
||||
|
||||
ie.manual.entry.industrialWires.redstone.name=Redstone Connections
|
||||
ie.manual.entry.industrialWires.redstone.subtext=AKA blood vessels
|
||||
ie.manual.entry.industrialWires.redstone0=A panel network can contain any amount of §lRedstone Wire Controllers§r. Each controller should be assigned a different ID in its GUI. Each component that interacts with redstone signals has two settings in its GUI: A redstone channel color and a controller ID. To get the redstone signals out of and
|
||||
ie.manual.entry.industrialWires.redstone1=into the controller it needs to be connected to redstone connectors from Immersive Engineering.
|
||||
|
||||
ie.manual.entry.industrialWires.components.name=Panel Components
|
||||
ie.manual.entry.industrialWires.components.subtext=
|
||||
ie.manual.entry.industrialWires.button=A simple button that activates a redstone signal when pressed. Its color can be changed. The button either stays on until clicked again (latching) or tuns off after half a second (non-latching).
|
||||
ie.manual.entry.industrialWires.label=A text that can be placed on the control panel, for example to indicate the purpose of some other component. The color and obviously the text can be edited.
|
||||
ie.manual.entry.industrialWires.indicator_light=A small indicator that brightens as the input redstone signal is increased. The color can be changed.
|
||||
ie.manual.entry.industrialWires.slider=A sliding switch that can set an output redstone signal to any desired signal strength. It can be either vertically or horizontally aligned and can have any length between one eighth of a block and one block. The color of the sliding knob can be changed.
|
||||
ie.manual.entry.industrialWires.toggle_switch=A switch to turn a signal on or off. The covered version includes a cover to prevent accidental activation: When clicked for the first time the cover will open, the signal will be turned on by clicking once again. Another click will close the cover and turn off the output signal. If the cover was
|
||||
ie.manual.entry.industrialWires.toggle_switch1=opened by accident it can be closed by shift-right-clicking the switch. The color of the cover can be configured.
|
||||
ie.manual.entry.industrialWires.variac=A Variac® is a variable autotransformer. The output signal of the transformer increases as the knob is turned to the right. The signal strenght can only be increased by one unit per click.
|
Loading…
Reference in a new issue