diff --git a/build.gradle b/build.gradle index f94f44a..cf41012 100644 --- a/build.gradle +++ b/build.gradle @@ -373,7 +373,7 @@ catch (Exception ignored) { // Pulls version first from the VERSION env and then git tag String identifiedVersion = null -String versionOverride = '0.0.18p23' +String versionOverride = '0.0.18p24' try { // Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty if (versionOverride == null) { diff --git a/src/main/java/reobf/proghatches/block/BlockReactorSyncer.java b/src/main/java/reobf/proghatches/block/BlockReactorSyncer.java index 3f87d95..f99c186 100644 --- a/src/main/java/reobf/proghatches/block/BlockReactorSyncer.java +++ b/src/main/java/reobf/proghatches/block/BlockReactorSyncer.java @@ -2,6 +2,12 @@ import java.util.Random; +import com.gtnewhorizons.modularui.api.UIInfos; +import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; + +import appeng.core.AppEng; +import appeng.core.sync.GuiBridge; +import appeng.items.tools.quartz.ToolQuartzCuttingKnife; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -9,6 +15,7 @@ import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -16,6 +23,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.event.ForgeEventFactory; public class BlockReactorSyncer extends BlockContainer{ @@ -88,6 +96,18 @@ public IIcon getIcon(int side, int meta) { return Blocks.iron_block.getIcon(0, 0); } +@Override +public boolean onBlockActivated(World worldIn, int x, int y, int z, EntityPlayer player, int side, float subX, + float subY, float subZ) { + + + b: { + if (NetworkUtils.isClient()) + break b; + UIInfos.TILE_MODULAR_UI.open(player, worldIn, x, y, z); + } + return true; +} } diff --git a/src/main/java/reobf/proghatches/block/TileReactorSyncer.java b/src/main/java/reobf/proghatches/block/TileReactorSyncer.java index f3d0925..f469748 100644 --- a/src/main/java/reobf/proghatches/block/TileReactorSyncer.java +++ b/src/main/java/reobf/proghatches/block/TileReactorSyncer.java @@ -1,13 +1,39 @@ package reobf.proghatches.block; +import java.util.Arrays; +import java.util.function.Supplier; + +import com.gtnewhorizons.modularui.api.ModularUITextures; +import com.gtnewhorizons.modularui.api.drawable.AdaptableUITexture; +import com.gtnewhorizons.modularui.api.drawable.IDrawable; +import com.gtnewhorizons.modularui.api.drawable.UITexture; +import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; +import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI; +import com.gtnewhorizons.modularui.api.screen.ModularWindow; +import com.gtnewhorizons.modularui.api.screen.UIBuildContext; +import com.gtnewhorizons.modularui.common.widget.ButtonWidget; +import com.gtnewhorizons.modularui.common.widget.DrawableWidget; +import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; +import com.gtnewhorizons.modularui.common.widget.FluidSlotWidget; +import com.gtnewhorizons.modularui.common.widget.Scrollable; +import com.gtnewhorizons.modularui.common.widget.SlotGroup; +import com.gtnewhorizons.modularui.common.widget.SlotWidget; +import com.gtnewhorizons.modularui.common.widget.TextWidget; +import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; + +import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GUITextureSet; import ic2.core.block.reactor.tileentity.TileEntityNuclearReactorElectric; import ic2.core.block.reactor.tileentity.TileEntityReactorAccessHatch; import ic2.core.block.reactor.tileentity.TileEntityReactorChamberElectric; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; +import reobf.proghatches.block.TileIOHub.UIFactory; +import reobf.proghatches.gt.metatileentity.util.MappingItemHandler; import reobf.proghatches.main.MyMod; -public class TileReactorSyncer extends TileEntity{ +public class TileReactorSyncer extends TileEntity implements ITileWithModularUI{ private boolean isDead; @@ -22,13 +48,12 @@ public void validate() { public void pretick(){ if((!isDead)&&(!isInvalid())){ TileEntityNuclearReactorElectric reactor=findTarget(); - if(reactor!=null) tick=reactor.updateTicker%20; - - //int new_power=(tick>5&&tick<15)?15:0; - int new_power=(tick!=0)?15:0; + if(reactor!=null) + tick=reactor.updateTicker%20;else tick=-1; + + int new_power=tick!=-1?values[tick]:0; if(power!=new_power){ - //worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, blockType); worldObj.scheduleBlockUpdate(xCoord, yCoord, zCoord, getBlockType() , 0); @@ -73,4 +98,159 @@ public void updateEntity() { super.updateEntity(); isDead = false; } + + + @Override + public ModularWindow createWindow(UIBuildContext buildContext) { + return new UIFactory(buildContext).createWindow(); + + }protected class UIFactory { + + private final UIBuildContext uiBuildContext; + + public UIFactory(UIBuildContext buildContext) { + this.uiBuildContext = buildContext; + } + + public ModularWindow createWindow() { + ModularWindow.Builder builder = ModularWindow.builder(getGUIWidth(), getGUIHeight()); + builder.setBackground(ModularUITextures.VANILLA_BACKGROUND); + // builder.setGuiTint(getUIBuildContext().getGuiColorization()); + if (doesBindPlayerInventory()) + builder.bindPlayerInventory(getUIBuildContext().getPlayer()); + + addTitleToUI(builder); + addUIWidgets(builder); + + return builder.build(); + } + + /** + * Override this to add widgets for your UI. + */ + + // IItemHandlerModifiable fakeInv=new ItemHandlerModifiable(); + + /** + * @param builderx + */ + /** + * @param builderx + */ + protected void addUIWidgets(ModularWindow.Builder builderx) { + Scrollable builder=new Scrollable().setHorizontalScroll(); + for(int i=0;i<20;i++){ + + + + final int fi=i; + builder.widget(new TextFieldWidget() + .setGetterInt(()->values[fi]) + .setSetterInt(s->{values[fi]= + Math.max(Math.min(s, 15),0);markDirty(); + } + + ) + + .setSynced(true,true) + .setPos(20*fi, 0) + .setSize(20,20) + .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2) + )); + + builder.widget(new ButtonWidget() + .setOnClick((a,b)->{values[fi]=15;markDirty();}) + .setBackground(GT_UITextures.BUTTON_STANDARD,GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_UP) + .setPos(20*fi, 40) + .setSize(20,20) + ); + builder.widget(new ButtonWidget() + .setOnClick((a,b)->{values[fi]=0;markDirty();}) + .setBackground(GT_UITextures.BUTTON_STANDARD,GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_DOWN) + .setPos(20*fi, 60) + .setSize(20,20) + ); + builder.widget(new DrawableWidget().setDrawable(GT_UITextures.PICTURE_RADIATION_WARNING) + .setPos(0, 20) + .setSize(20,20) + ); + + builder.widget(new TextWidget(fi+"").setPos(20*fi+3, 60+20)); + + + + + } + + builder.setPos(3+20+20, 3) + .setSize(getGUIWidth()-6-40,80+10); + builderx + .widget(builder); + builderx.widget(TextWidget.localised("tile.reactor_syncer.info.rs").setPos(3, 3+10)); + builderx.widget(TextWidget.localised("tile.reactor_syncer.info.update").setPos(3, 3+10+20)); + + builderx.widget(TextWidget.localised("tile.reactor_syncer.info.max").setPos(3, 3+10+40)); + builderx.widget(TextWidget.localised("tile.reactor_syncer.info.min").setPos(3, 3+10+60)); + + } + + public UIBuildContext getUIBuildContext() { + return uiBuildContext; + } + + /* + * public boolean isCoverValid() { return !getUIBuildContext().getTile() + * .isDead() && getUIBuildContext().getTile() + * .getCoverBehaviorAtSideNew(getUIBuildContext().getCoverSide()) != + * GregTech_API.sNoBehavior; } + */ + + protected void addTitleToUI(ModularWindow.Builder builder) { + /* + * ItemStack coverItem = + * GT_Utility.intToStack(getUIBuildContext().getCoverID()); if + * (coverItem != null) { builder.widget( new + * ItemDrawable(coverItem).asWidget() .setPos(5, 5) .setSize(16, + * 16)) .widget( new + * TextWidget(coverItem.getDisplayName()).setDefaultColor( + * COLOR_TITLE.get()) .setPos(25, 9)); } + */ + } + + protected int getGUIWidth() { + return 176; + } + + protected int getGUIHeight() { + return 107 + 18 * 3 + 18; + } + + protected boolean doesBindPlayerInventory() { + return true; + } + + protected int getTextColorOrDefault(String textType, int defaultColor) { + return defaultColor; + } + + protected final Supplier COLOR_TITLE = () -> getTextColorOrDefault("title", 0x222222); + protected final Supplier COLOR_TEXT_GRAY = () -> getTextColorOrDefault("text_gray", 0x555555); + protected final Supplier COLOR_TEXT_WARN = () -> getTextColorOrDefault("text_warn", 0xff0000); + } + int[] values=new int[20]; + + @Override + public void writeToNBT(NBTTagCompound compound) { + for(int i=0;i<20;i++){ + compound.setInteger("##"+i, values[i]); + } + super.writeToNBT(compound); + } + @Override + public void readFromNBT(NBTTagCompound compound) { + for(int i=0;i<20;i++){ + values[i]=compound.getInteger("##"+i ); + } + super.readFromNBT(compound); + } } diff --git a/src/main/java/reobf/proghatches/eucrafting/AECover.java b/src/main/java/reobf/proghatches/eucrafting/AECover.java index 09c4e02..0888e3e 100644 --- a/src/main/java/reobf/proghatches/eucrafting/AECover.java +++ b/src/main/java/reobf/proghatches/eucrafting/AECover.java @@ -43,6 +43,7 @@ import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.ISerializableObject; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_AssemblyLine; +import gregtech.crossmod.waila.GregtechWailaDataProvider; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; @@ -222,7 +223,7 @@ public TileEntity fakeTile() { return null; } } - static int h0="gregtech.crossmod.waila.GregtechWailaDataProvider".hashCode(); + static int h0=GregtechWailaDataProvider.class.getName().hashCode(); public static interface Data extends ISerializableObject, IGridProxyable { @@ -242,11 +243,11 @@ default public boolean isWailaCall(){ return getNBTData; }else{ String s=StackTraceUtil.getCallerMethod(6); - if (s.hashCode()==h0&&s.equals("gregtech.crossmod.waila.GregtechWailaDataProvider")) { + if (s.hashCode()==h0&&s.equals(GregtechWailaDataProvider.class.getName())) { return true; } s=StackTraceUtil.getCallerMethod(5); - if (s.hashCode()==h0&&s.equals("gregtech.crossmod.waila.GregtechWailaDataProvider")) { + if (s.hashCode()==h0&&s.equals(GregtechWailaDataProvider.class.getName())) { return true; } } @@ -594,7 +595,7 @@ public Data createDataObject() { if(getWailaBody){ return new DummyData();} }else{ String s=StackTraceUtil.getCallerMethod(6); - if(s.hashCode()==h0&&s.equals("gregtech.crossmod.waila.GregtechWailaDataProvider")){ + if(s.hashCode()==h0&&s.equals(GregtechWailaDataProvider.class.getName())){ // do not actually load cover data on client side // or there'll be some performance issue diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatchInventoryMappingSlave.java b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatchInventoryMappingSlave.java index 9022dee..c849e79 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatchInventoryMappingSlave.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatchInventoryMappingSlave.java @@ -103,7 +103,7 @@ public class PatternDualInputHatchInventoryMappingSlave currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + for(int i=0;i<((IInventory) accessor.getTileEntity()).getSizeInventory();i++) currenttip.add(StatCollector.translateToLocal("proghatches.provider.waila") - + Optional.ofNullable(((IInventory) accessor.getTileEntity()).getStackInSlot(i)) + + Optional.ofNullable(ItemStack.loadItemStackFromNBT(accessor.getNBTData().getCompoundTag("#"+i))) .map(s -> s.getDisplayName() + "@" + s.getItemDamage()).orElse("") ); diff --git a/src/main/java/reobf/proghatches/main/Config.java b/src/main/java/reobf/proghatches/main/Config.java index c7bd895..758dd53 100644 --- a/src/main/java/reobf/proghatches/main/Config.java +++ b/src/main/java/reobf/proghatches/main/Config.java @@ -98,14 +98,19 @@ public static void get(GT_Multiblock_Tooltip_Builder obj, String key, boolean de String func = str.substring(0, a0); String args = str.substring(a0 + 1, a1); String type = str.substring(a1 + 1 + 2, str.length()); + + MethodType tp = MethodType.fromMethodDescriptorString( type + (func.equals("toolTipFinisher") ? "V" - : "Lgregtech/api/util/GT_Multiblock_Tooltip_Builder;") + : "L"+GT_Multiblock_Tooltip_Builder.class.getName().replace(".", "/")+";") , Config.class.getClassLoader()); call(obj, args, MethodHandles.lookup().findVirtual(GT_Multiblock_Tooltip_Builder.class, func, tp), tp); - + + + + } } catch (Exception e) { diff --git a/src/main/java/reobf/proghatches/main/MyMod.java b/src/main/java/reobf/proghatches/main/MyMod.java index 2b718ad..86d78a8 100644 --- a/src/main/java/reobf/proghatches/main/MyMod.java +++ b/src/main/java/reobf/proghatches/main/MyMod.java @@ -7,6 +7,9 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Deque; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.Optional; import java.util.WeakHashMap; @@ -48,7 +51,9 @@ import com.glodblock.github.client.gui.GuiDualInterface; import com.glodblock.github.client.gui.container.ContainerDualInterface; import com.glodblock.github.common.parts.PartFluidP2PInterface; +import com.glodblock.github.crossmod.opencomputers.DriverLevelMaintainer; import com.glodblock.github.inventory.FluidConvertingInventoryAdaptor; +import com.glodblock.github.loader.ItemAndBlockHolder; import appeng.api.AEApi; import appeng.api.config.FuzzyMode; @@ -98,6 +103,7 @@ import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; +import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -111,15 +117,17 @@ import gregtech.common.covers.CoverInfo; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_HeatExchanger; import gregtech.crossmod.waila.GregtechWailaDataProvider; +import li.cil.oc.api.Driver; import reobf.proghatches.Tags; import reobf.proghatches.block.ChunkTrackingGridCahce; +import reobf.proghatches.block.TileIOHub; import reobf.proghatches.eucrafting.BlockEUInterface; import reobf.proghatches.eucrafting.AECover; import reobf.proghatches.eucrafting.AECover.IMemoryCardSensitive; import reobf.proghatches.eucrafting.InterfaceData; import reobf.proghatches.eucrafting.PartEUP2PInterface; import reobf.proghatches.eucrafting.TileFluidInterface_EU; - +import reobf.proghatches.gt.metatileentity.DualInputHachOC; import reobf.proghatches.gt.metatileentity.PatternDualInputHatch; import reobf.proghatches.gt.metatileentity.PatternDualInputHatchInventoryMappingSlave; import reobf.proghatches.gt.metatileentity.ProgrammingCircuitProvider; @@ -129,19 +137,20 @@ import reobf.proghatches.item.ItemProgrammingCircuit; import reobf.proghatches.lang.LangManager; import reobf.proghatches.main.mixin.mixins.MixinFixPipeCoverBug; +import reobf.proghatches.main.registration.Registration; import reobf.proghatches.net.MasterSetMessage; import reobf.proghatches.net.OpenPartGuiMessage; import reobf.proghatches.net.PriorityMessage; import reobf.proghatches.net.RenameMessage; import reobf.proghatches.net.UpgradesMessage; +import reobf.proghatches.oc.ItemAPICard; +import reobf.proghatches.oc.ItemGTRedstoneCard; import reobf.proghatches.oc.WirelessPeripheralManager; import reobf.proghatches.util.ProghatchesUtil; import tconstruct.armor.player.TPlayerStats; import thaumcraft.common.entities.golems.ItemGolemCore; -@Mod(modid = Tags.MODID, version = Tags.VERSION, name = Tags.MODNAME, acceptedMinecraftVersions = "[1.7.10]", -dependencies = "required-after:appliedenergistics2;required-after:gregtech;" -,acceptableRemoteVersions="*" +@Mod(modid = Tags.MODID, version = Tags.VERSION, name = Tags.MODNAME, acceptedMinecraftVersions = "[1.7.10]", dependencies = "required-after:appliedenergistics2;required-after:gregtech;", acceptableRemoteVersions = "*" /* * ,dependencies= "required-after:neenergistics;" */ @@ -149,32 +158,43 @@ public class MyMod { public static final Logger LOG = LogManager.getLogger(Tags.MODID); public static MyMod instance; - {CraftingCPUCluster.class.getDeclaredFields(); - instance = this;} - - static{ - class test extends Item{@Override public int getItemStackLimit() {return 0;}} - try{ - Boolean b1=(Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); - boolean b2=test.class.getDeclaredMethod("getItemStackLimit")!=null; - if(((b1!=null)&&b1)==false&&b2==true){ - - - - for(int i=0;i<20;i++) - { - LOG.fatal("!!!ATTENTION!!!"); - LOG.fatal("You are using dev version of ProgrammableHatches in obfuscated env! Use the one without '-dev' suffix!"); - LOG.fatal("Will stop the game, since it's impossible to proceed."); - }; - - FMLCommonHandler.instance().exitJava(1, false); - //throw new AssertionError("You are using dev version of ProgrammableHatches in obfuscated env! Use the one without '-dev' suffix!"); + { + DualityInterface.class.getDeclaredFields(); + instance = this; } - }catch(Exception e){} + + static { + class test extends Item { + @Override + public int getItemStackLimit() { + return 0; + } + } + try { + Boolean b1 = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); + boolean b2 = test.class.getDeclaredMethod("getItemStackLimit") != null; + if (((b1 != null) && b1) == false && b2 == true) { + + for (int i = 0; i < 20; i++) { + LOG.fatal("!!!ATTENTION!!!"); + LOG.fatal( + "You are using dev version of ProgrammableHatches in obfuscated env! Use the one without '-dev' suffix!"); + LOG.fatal("Will stop the game, since it's impossible to proceed."); + } + ; + + FMLCommonHandler.instance().exitJava(1, false); + // throw new AssertionError("You are using dev version of + // ProgrammableHatches in obfuscated env! Use the one without + // '-dev' suffix!"); + } + } catch (Exception e) { + } } - public static Deque scheduled=new ArrayDeque(); - //public static ShutDownReason ACCESS_LOOP=new SimpleShutDownReason("proghatch.access_loop", true){public String getID() {return "proghatch.access_loop";};}; + public static Deque scheduled = new ArrayDeque(); + // public static ShutDownReason ACCESS_LOOP=new + // SimpleShutDownReason("proghatch.access_loop", true){public String getID() + // {return "proghatch.access_loop";};}; public static SimpleNetworkWrapper net = new SimpleNetworkWrapper(Tags.MODID); public static Item progcircuit; public static Item toolkit; @@ -199,7 +219,7 @@ class test extends Item{@Override public int getItemStackLimit() {return 0;}} public static Item euinterface_p2p; public static Item book; public static Item fixer; - //public static Item eu_tool; + // public static Item eu_tool; public static Item plunger; public static Item lazer_p2p_part; public static Item upgrades; @@ -220,20 +240,46 @@ public void preInit(FMLPreInitializationEvent event) { net.registerMessage(new RenameMessage.Handler(), RenameMessage.class, 2, Side.SERVER); net.registerMessage(new UpgradesMessage.Handler(), UpgradesMessage.class, 3, Side.CLIENT); net.registerMessage(new MasterSetMessage.Handler(), MasterSetMessage.class, 4, Side.CLIENT); - + proxy.preInit(event); } + public static Map OCApi = new HashMap<>(); + @Mod.EventHandler - + public void init(FMLInitializationEvent event) { proxy.init(event); - AEApi.instance().partHelper().registerNewLayer("reobf.proghatches.fmp.LazerLayer", "reobf.proghatches.eucrafting.ILazer"); - + AEApi.instance().partHelper().registerNewLayer("reobf.proghatches.fmp.LazerLayer", + "reobf.proghatches.eucrafting.ILazer"); + FMLCommonHandler.instance().bus().register(this); MinecraftForge.EVENT_BUS.register(this); + + OCApi.put(iohub, TileIOHub.OCApi.class); + OCApi.put(oc_api, ItemAPICard.APIEnv.class); + OCApi.put(oc_redstone, ItemGTRedstoneCard.RedstoneEnv.class); + OCApi.put(new ItemStack( GregTech_API.sBlockMachines, + 1, + Config.metaTileEntityOffset+Registration.DualInputHatchOCOffset), DualInputHachOC.class); + OCApi.forEach((k, v) -> Driver.add(new li.cil.oc.api.driver.EnvironmentProvider() { + + @Override + public Class getEnvironment(ItemStack itemStack) { + Object kk = k; + if (kk instanceof Block) { + kk = Item.getItemFromBlock((Block) kk); + } + if (itemStack != null && (itemStack.getItem() == kk||(kk instanceof ItemStack?( + ((ItemStack)kk).getItem()==itemStack.getItem()&&((ItemStack)kk).getItemDamage()==itemStack.getItemDamage() + ):false))) { + return v; + } + return null; + } + })); } - + @SubscribeEvent public void overrideTutorialBookClickBehaviour(PlayerInteractEvent ev) { if (Optional.ofNullable(ev.entityPlayer.getHeldItem()).map(ItemStack::getItem) @@ -256,17 +302,23 @@ public void overrideTutorialBookClickBehaviour(PlayerInteractEvent ev) { @SubscribeEvent public void join(PlayerLoggedInEvent e) { - //if(Config.fixCircuit) - //e.player.addChatComponentMessage(new ChatComponentTranslation("proghatch.join.fixCircuit")); - - /* if (e.player.getEntityData().hasKey("ProgrammableHatchesTutorialGet3") == false) { - e.player.getEntityData().setBoolean("ProgrammableHatchesTutorialGet3", true); -*/ - - if(e.player.getExtendedProperties(GET_PROGHATCHBOOK)!=null){ - Prop p=(Prop) e.player.getExtendedProperties(GET_PROGHATCHBOOK); - if(p.get){return;} - p.get=true; + // if(Config.fixCircuit) + // e.player.addChatComponentMessage(new + // ChatComponentTranslation("proghatch.join.fixCircuit")); + + /* + * if + * (e.player.getEntityData().hasKey("ProgrammableHatchesTutorialGet3") + * == false) { e.player.getEntityData().setBoolean( + * "ProgrammableHatchesTutorialGet3", true); + */ + + if (e.player.getExtendedProperties(GET_PROGHATCHBOOK) != null) { + Prop p = (Prop) e.player.getExtendedProperties(GET_PROGHATCHBOOK); + if (p.get) { + return; + } + p.get = true; EntityItem entityitem = e.player.dropPlayerItemWithRandomChoice( Optional.of(tutorial("programmable_hatches.eucreafting.tutorial")).map(s -> { s.stackTagCompound.setString("proghatchesSpecialTag", "true"); @@ -280,21 +332,21 @@ public void join(PlayerLoggedInEvent e) { }).get(), false); entityitem.delayBeforeCanPickup = 0; entityitem.func_145797_a(e.player.getCommandSenderName()); - - - } ; } + /** + * @param event + */ @Mod.EventHandler - + public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); - //Api.INSTANCE.registries().p2pTunnel().addNewAttunement(null, null); - //ShutDownReasonRegistry.register(ACCESS_LOOP); + // Api.INSTANCE.registries().p2pTunnel().addNewAttunement(null, null); + // ShutDownReasonRegistry.register(ACCESS_LOOP); NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); for (ItemStack s : new ItemStack[] { new ItemStack(block_euinterface), new ItemStack(euinterface_p2p) }) @@ -314,21 +366,34 @@ public void postInit(FMLPostInitializationEvent event) { InterfaceTerminalRegistry.instance().register(TileFluidInterface_EU.class); InterfaceTerminalRegistry.instance().register(PatternDualInputHatch.Inst.class); InterfaceTerminalRegistry.instance().register(PatternDualInputHatchInventoryMappingSlave.class); - - //InterfaceTerminalRegistry.instance().register(ProgrammingCircuitProvider.class); - //InterfaceTerminalRegistry.instance().register(LargeProgrammingCircuitProvider.class); - - - - // ItemList list=new ItemList(); - // list.add(AEItemStack.create(ItemProgrammingCircuit.wrap(new ItemStack(Blocks.cactus)))); - // list.findFuzzy(AEItemStack.create(ItemProgrammingCircuit.wrap(new ItemStack(Blocks.bed))), FuzzyMode.IGNORE_ALL); + + // InterfaceTerminalRegistry.instance().register(ProgrammingCircuitProvider.class); + // InterfaceTerminalRegistry.instance().register(LargeProgrammingCircuitProvider.class); + + try { + Field f = BlockingModeIgnoreList.class.getDeclaredField("IgnoredItems"); + f.setAccessible(true); + ((List) f.get(null)).add(Items.apple); + + } catch (Exception e) { + + e.printStackTrace(); + } + + // ItemList list=new ItemList(); + // list.add(AEItemStack.create(ItemProgrammingCircuit.wrap(new + // ItemStack(Blocks.cactus)))); + // list.findFuzzy(AEItemStack.create(ItemProgrammingCircuit.wrap(new + // ItemStack(Blocks.bed))), FuzzyMode.IGNORE_ALL); + } + @SubscribeEvent(priority = EventPriority.HIGH, receiveCanceled = false) public void tick(final TickEvent.ServerTickEvent event) { - while(scheduled.isEmpty()==false) - scheduled.removeLast().run(); + while (scheduled.isEmpty() == false) + scheduled.removeLast().run(); } + @SubscribeEvent(priority = EventPriority.HIGH, receiveCanceled = false) public void playerInteract(final PlayerInteractEvent event) { @@ -373,14 +438,14 @@ public void playerInteract(final PlayerInteractEvent event) { } @Mod.EventHandler - + public void serverStarting(FMLServerStartingEvent event) { proxy.serverStarting(event); WirelessPeripheralManager.stations.clear(); WirelessPeripheralManager.cards.clear(); ChunkTrackingGridCahce.callbacks.clear(); - //Just in case weak references are not GCed in time - //only useful for intergreted server? + // Just in case weak references are not GCed in time + // only useful for intergreted server? event.registerServerCommand(new CommandAnchor()); } @@ -401,8 +466,9 @@ public static ItemStack tutorial(Item it, String key) { ArrayList pages = new ArrayList<>(); int size = Integer.valueOf(LangManager.translateToLocalFormatted(key + ".pages")); - for (int i = 0; i < size; i++){ - //System.out.println(LangManager.translateToLocalFormatted(key + ".pages." + i)); + for (int i = 0; i < size; i++) { + // System.out.println(LangManager.translateToLocalFormatted(key + + // ".pages." + i)); pages.add(LangManager.translateToLocalFormatted(key + ".pages." + i).replace("\\n", "\n")); } ItemStack is = ProghatchesUtil.getWrittenBook(it, "ProgrammableHatchesTutorial", key, "programmable_hatches", @@ -459,65 +525,83 @@ public void breakBlock(BlockEvent.BreakEvent b) { } } + @SubscribeEvent - public void onUnload(WorldEvent.Unload event) { - if(event.world.isRemote)return; - //World unloading seems to not post ChunkEvent.Unload? - //Well, warning twice is better than not warning, right? - try{ - ChunkTrackingGridCahce.callbacks.forEach((a,b)->{ - if(a!=null){a.unload(event.world);} - }); - }catch(Throwable t){t.printStackTrace();} - - } + public void onUnload(WorldEvent.Unload event) { + if (event.world.isRemote) + return; + // World unloading seems to not post ChunkEvent.Unload? + // Well, warning twice is better than not warning, right? + try { + ChunkTrackingGridCahce.callbacks.forEach((a, b) -> { + if (a != null) { + a.unload(event.world); + } + }); + } catch (Throwable t) { + t.printStackTrace(); + } + + } + @SubscribeEvent - public void onUnload(ChunkEvent.Unload event) { - if(event.world.isRemote)return; - //on client side, out-of-sight causes chunk unload! That's not what we want, so ignore it. - try{ - ChunkTrackingGridCahce.callbacks.forEach((a,b)->{ - if(a!=null){a.unload(event.getChunk());} - }); - }catch(Throwable t){t.printStackTrace();} - } - public static final String GET_PROGHATCHBOOK="GET_PROGHATCHBOOK"; - @SubscribeEvent - - public void onEntityConstructing(EntityEvent.EntityConstructing event) { - if (event.entity instanceof EntityPlayer &&((EntityPlayer) event.entity).getExtendedProperties("GET_PROGHATCHBOOK") == null) { - event.entity.registerExtendedProperties(GET_PROGHATCHBOOK, new Prop()); - } - } - - public static class Prop implements IExtendedEntityProperties { + public void onUnload(ChunkEvent.Unload event) { + if (event.world.isRemote) + return; + // on client side, out-of-sight causes chunk unload! That's not what we + // want, so ignore it. + try { + ChunkTrackingGridCahce.callbacks.forEach((a, b) -> { + if (a != null) { + a.unload(event.getChunk()); + } + }); + } catch (Throwable t) { + t.printStackTrace(); + } + } + + public static final String GET_PROGHATCHBOOK = "GET_PROGHATCHBOOK"; + + @SubscribeEvent + + public void onEntityConstructing(EntityEvent.EntityConstructing event) { + if (event.entity instanceof EntityPlayer + && ((EntityPlayer) event.entity).getExtendedProperties("GET_PROGHATCHBOOK") == null) { + event.entity.registerExtendedProperties(GET_PROGHATCHBOOK, new Prop()); + } + } + + public static class Prop implements IExtendedEntityProperties { boolean get; public int alert_mask; + @Override public void saveNBTData(NBTTagCompound compound) { - + compound.setInteger("alert_mask", alert_mask); - compound.setBoolean(GET_PROGHATCHBOOK+"_get", get); + compound.setBoolean(GET_PROGHATCHBOOK + "_get", get); } @Override public void loadNBTData(NBTTagCompound compound) { - get=compound.getBoolean(GET_PROGHATCHBOOK+"_get"); - alert_mask=compound.getInteger("alert_mask"); + get = compound.getBoolean(GET_PROGHATCHBOOK + "_get"); + alert_mask = compound.getInteger("alert_mask"); } @Override public void init(Entity entity, World world) { - - - }} - - public static WeakHashMap callbacks=new WeakHashMap<>(); + + } + } + + public static WeakHashMap callbacks = new WeakHashMap<>(); public static Block reactorsyncer; + @SubscribeEvent(priority = EventPriority.HIGH, receiveCanceled = false) public void pretick(final TickEvent.ServerTickEvent event) { - if(event.phase==Phase.START&&event.side==Side.SERVER){ - callbacks.forEach((a,b)->b.run()); + if (event.phase == Phase.START && event.side == Side.SERVER) { + callbacks.forEach((a, b) -> b.run()); } } } diff --git a/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java b/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java index 41b7566..957d6ee 100644 --- a/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java +++ b/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java @@ -191,6 +191,7 @@ public List getMixins() { retLate.add("part2.MixinIsWailaCall"); retLate.add("part2.MixinOC"); retLate.add("part2.MixinRecursiveSlotClickProtection"); + //retLate.add("part2.MixinBlockModeAltBehaviour"); if (FMLLaunchHandler.side().isClient()) { if (!"true".equals(pp.get("noAEItemSortMixins"))) if(ff)retLate.add("MixinAEItemStackCompare"); diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinBlockModeAltBehaviour.java b/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinBlockModeAltBehaviour.java new file mode 100644 index 0000000..00c9cba --- /dev/null +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinBlockModeAltBehaviour.java @@ -0,0 +1,29 @@ +package reobf.proghatches.main.mixin.mixins.part2; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.Redirect; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import com.gtnewhorizon.gtnhlib.util.Callback; + +import appeng.helpers.BlockingModeIgnoreList; +import appeng.helpers.DualityInterface; +import appeng.util.InventoryAdaptor; +import net.minecraft.item.ItemStack; + +@Mixin(value=DualityInterface.class) +public class MixinBlockModeAltBehaviour { + @Redirect(remap=false,method="gtMachineHasOnlyCircuit", at = @At(value="INVOKE",target= + + "Lappeng/helpers/BlockingModeIgnoreList;isIgnored(Lnet/minecraft/item/ItemStack;)Z")) +public boolean isIgnored(ItemStack is){ + + + if(is ==null)return true; + + return BlockingModeIgnoreList.isIgnored(is); +} +} diff --git a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java index b3e1817..1f792b6 100644 --- a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java +++ b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java @@ -1024,9 +1024,210 @@ public void run() { .addTo(RecipeMaps.assemblerRecipes); + GT_Values.RA.stdBuilder() + .itemInputs( + new ItemStack(GameRegistry.findItem("IC2","blockReactorChamber")), + Sensor_LuV.get(1), + ItemList.Circuit_Chip_NOR.get(20) + ) + + .itemOutputs( + new ItemStack( + MyMod.reactorsyncer)) + .duration(20 * SECONDS) + .eut(GT_Values.VP[3]) + .addTo(RecipeMaps.assemblerRecipes); + + + GT_Values.RA.stdBuilder() + .itemInputs( + new ItemStack(GameRegistry.findItem("IC2NuclearControl","blockNuclearControlMain"),1,9), + Sensor_LuV.get(1), + new ItemStack(GameRegistry.findItem("OpenComputers","adapter")) + ) + .itemOutputs(new ItemStack(MyMod.reader)) + .duration(20 * SECONDS).eut(GT_Values.VP[3]).addTo(RecipeMaps.assemblerRecipes); + + GT_Values.RA.stdBuilder() + .itemInputs( + Api.INSTANCE.definitions().parts().storageBus().maybeStack(1).get(), + new ItemStack(ItemAndBlockHolder.FLUID_STORAGE_BUS), + new ItemStack(ItemAndBlockHolder.LEVEL_MAINTAINER) + ).fluidInputs( Materials.Grade4PurifiedWater.getFluid(1000)) + .itemOutputs(new ItemStack(MyMod.amountmaintainer)) + .duration(20 * SECONDS).eut(GT_Values.VP[3]).addTo(RecipeMaps.assemblerRecipes); + + GT_Values.RA.stdBuilder() + .itemInputs( + new ItemStack(ItemAndBlockHolder.LEVEL_MAINTAINER) + ).fluidInputs( Materials.Grade8PurifiedWater.getFluid(16000)) + .itemOutputs(new ItemStack(MyMod.submitter)) + .duration(20 * SECONDS).eut(GT_Values.VP[3]).addTo(RecipeMaps.fluidSolidifierRecipes); + + GT_Values.RA.stdBuilder() + .itemInputs( + new ItemStack( GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset+Registration.SlaveOffset), + new ItemStack(GameRegistry.findItem("RIO", "tile.remote_interface")), + new ItemStack(GameRegistry.findItem("RIO", "item.chip.transfer"), 1, 0), + new ItemStack(GameRegistry.findItem("RIO", "item.chip.transfer"), 1, 1) + ) + .itemOutputs(new ItemStack( GregTech_API.sBlockMachines, + 1, + Config.metaTileEntityOffset+Registration.MappingSlaveOffset)) + .duration(20 * SECONDS).eut(GT_Values.VP[3]).addTo(RecipeMaps.assemblerRecipes); + + + GT_Values.RA.stdBuilder() + .itemInputs( + Hatch_CraftingInput_Bus_ME.get(1), + new ItemStack(GameRegistry.findItem("RIO", "tile.remote_interface")), + new ItemStack(GameRegistry.findItem("RIO", "item.chip.transfer"), 1, 0), + new ItemStack(GameRegistry.findItem("RIO", "item.chip.transfer"), 1, 1) + ) + .itemOutputs(new ItemStack( GregTech_API.sBlockMachines, + 1, + Config.metaTileEntityOffset+Registration.PatternMappingSlaveOffset)) + .duration(20 * SECONDS).eut(GT_Values.VP[3]).addTo(RecipeMaps.assemblerRecipes); + + GT_Values.RA.stdBuilder() + .itemInputs( + new ItemStack( GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset+Registration.PatternOffset), + + new ItemStack(GameRegistry.findItem("RIO", "tile.remote_interface")), + new ItemStack(GameRegistry.findItem("RIO", "item.chip.transfer"), 1, 0), + new ItemStack(GameRegistry.findItem("RIO", "item.chip.transfer"), 1, 1) + ) + .itemOutputs(new ItemStack( GregTech_API.sBlockMachines, + 1, + Config.metaTileEntityOffset+Registration.PatternMappingSlaveOffset)) + .duration(20 * SECONDS).eut(GT_Values.VP[3]).addTo(RecipeMaps.assemblerRecipes); + + + GT_Values.RA.stdBuilder() + .itemInputs( + + new ItemStack( GregTech_API.sBlockMachines, + 1, + Config.metaTileEntityOffset+Registration.QuadDualInputHatchOffset+10), + new ItemStack(MyMod.iohub) + ) + .itemOutputs(new ItemStack( GregTech_API.sBlockMachines, + 1, + Config.metaTileEntityOffset+Registration.DualInputHatchOCOffset)) + .duration(20 * SECONDS).eut(GT_Values.VP[10]).addTo(RecipeMaps.assemblerRecipes); + + + + + GT_Values.RA.stdBuilder() + .itemInputs( + new ItemStack( + MyMod.toolkit,0,OreDictionary.WILDCARD_VALUE) , + new ItemStack(Items.diamond) + , GT_Utility.getIntegratedCircuit(7) + +) + .itemOutputs( new ItemStack( MyMod.fixer) ) + + .duration(10 * SECONDS) + .eut(480) + .addTo(RecipeMaps.assemblerRecipes); + + + + + + if(flag){ + GT_Values.RA.stdBuilder() + .itemInputs( + new ItemStack( + GameRegistry.findItem("computronics","computronics.chatBox")), + Api.INSTANCE.definitions().blocks().spatialPylon().maybeStack(1).get(), + new ItemStack(Items.ender_pearl,16) + ) + .fluidInputs(Materials.Enderium.getMolten(144)) + .itemOutputs( new ItemStack( MyMod.alert) ) + + .duration(100 * SECONDS) + .eut(480) + .addTo(RecipeMaps.assemblerRecipes); + + + GT_Values.RA.stdBuilder() + .itemInputs(Hatch_Input_Bus_ME.get(1), + Materials.Steel.getPlates(1) + ) + .itemOutputs( new ItemStack( MyMod.upgrades,1,1) ) + .duration(100 * SECONDS) + .eut(480*4*4) + .addTo(RecipeMaps.formingPressRecipes); + + GT_Values.RA.stdBuilder() + .itemInputs(Hatch_Input_ME.get(1), + Materials.Steel.getPlates(1) + ) + .itemOutputs( new ItemStack( MyMod.upgrades,1,2) ) + .duration(100 * SECONDS) + .eut(480*4*4) + .addTo(RecipeMaps.formingPressRecipes); + + GT_Values.RA.stdBuilder() + .itemInputs(Hatch_Input_Bus_ULV.get(16), + Materials.Steel.getPlates(1) + ) + .itemOutputs( new ItemStack( MyMod.upgrades,1,0) ) + .duration(100 * SECONDS) + .eut(480*4*4) + .addTo(RecipeMaps.formingPressRecipes); + + + + for(int i=0;i<4;i++) + GT_Values.RA.stdBuilder() + .itemInputs( + new ItemStack( MyMod.upgrades,3,0), + HATCHES_INPUT_BUS[i].get(1) + + ) + .itemOutputs( new ItemStack( + GregTech_API.sBlockMachines, + 1, + Config.metaTileEntityOffset + Registration.MultiCircuitBusOffset + i)) + + .duration(15 * SECONDS) + .eut(GT_Values.VP[i]) + .addTo(RecipeMaps.assemblerRecipes); + + } + /* + GT_Values.RA.stdBuilder() + .itemInputs( + + gregtech.api.enums.ItemList.Shape_Mold_Block.get(0) + +).fluidInputs( Materials.Grade8PurifiedWater.getFluid(256000)) +.itemOutputs( new ItemStack( + MyMod.submitter)) + + .duration(150 * SECONDS) + .eut(GT_Values.VP[8]) + .addTo(RecipeMaps.fluidSolidifierRecipes); + GT_Values.RA.stdBuilder() + .itemInputs( + + gregtech.api.enums.ItemList.Shape_Mold_Plate.get(0) + +).fluidInputs( Materials.Grade4PurifiedWater.getFluid(64000)) +.itemOutputs( new ItemStack( + MyMod.amountmaintainer)) + + .duration(150 * SECONDS) + .eut(GT_Values.VP[7]) + .addTo(RecipeMaps.fluidSolidifierRecipes); + */ } /////////////////////////////////// @@ -1092,117 +1293,10 @@ public void prefab(){ .addTo(RecipeMaps.laserEngraverRecipes); - GT_Values.RA.stdBuilder() - .itemInputs( - new ItemStack( - MyMod.toolkit,0,OreDictionary.WILDCARD_VALUE) , - new ItemStack(Items.diamond) - , GT_Utility.getIntegratedCircuit(7) - - ) - - .itemOutputs( new ItemStack( MyMod.fixer) ) - - .duration(10 * SECONDS) - .eut(480) - .addTo(RecipeMaps.assemblerRecipes); - - - - - - if(flag){ - GT_Values.RA.stdBuilder() - .itemInputs( - new ItemStack( - GameRegistry.findItem("computronics","computronics.chatBox")), - Api.INSTANCE.definitions().blocks().spatialPylon().maybeStack(1).get(), - new ItemStack(Items.ender_pearl,16) - ) - .fluidInputs(Materials.Enderium.getMolten(144)) - .itemOutputs( new ItemStack( MyMod.alert) ) - - .duration(100 * SECONDS) - .eut(480) - .addTo(RecipeMaps.assemblerRecipes); - - - GT_Values.RA.stdBuilder() - .itemInputs(Hatch_Input_Bus_ME.get(1), - Materials.Steel.getPlates(1) - ) - .itemOutputs( new ItemStack( MyMod.upgrades,1,1) ) - .duration(100 * SECONDS) - .eut(480*4*4) - .addTo(RecipeMaps.formingPressRecipes); - - GT_Values.RA.stdBuilder() - .itemInputs(Hatch_Input_ME.get(1), - Materials.Steel.getPlates(1) - ) - .itemOutputs( new ItemStack( MyMod.upgrades,1,2) ) - .duration(100 * SECONDS) - .eut(480*4*4) - .addTo(RecipeMaps.formingPressRecipes); - - GT_Values.RA.stdBuilder() - .itemInputs(Hatch_Input_Bus_ULV.get(16), - Materials.Steel.getPlates(1) - ) - .itemOutputs( new ItemStack( MyMod.upgrades,1,0) ) - .duration(100 * SECONDS) - .eut(480*4*4) - .addTo(RecipeMaps.formingPressRecipes); - - - - for(int i=0;i<4;i++) - GT_Values.RA.stdBuilder() - .itemInputs( - new ItemStack( MyMod.upgrades,3,0), - HATCHES_INPUT_BUS[i].get(1) - - ) - .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, - 1, - Config.metaTileEntityOffset + Registration.MultiCircuitBusOffset + i)) - - .duration(15 * SECONDS) - .eut(GT_Values.VP[i]) - .addTo(RecipeMaps.assemblerRecipes); - - } - - - /* - GT_Values.RA.stdBuilder() - .itemInputs( - - gregtech.api.enums.ItemList.Shape_Mold_Block.get(0) - - ).fluidInputs( Materials.Grade8PurifiedWater.getFluid(256000)) - .itemOutputs( new ItemStack( - MyMod.submitter)) - - .duration(150 * SECONDS) - .eut(GT_Values.VP[8]) - .addTo(RecipeMaps.fluidSolidifierRecipes); + - GT_Values.RA.stdBuilder() - .itemInputs( - - gregtech.api.enums.ItemList.Shape_Mold_Plate.get(0) - - ).fluidInputs( Materials.Grade4PurifiedWater.getFluid(64000)) - .itemOutputs( new ItemStack( - MyMod.amountmaintainer)) - - .duration(150 * SECONDS) - .eut(GT_Values.VP[7]) - .addTo(RecipeMaps.fluidSolidifierRecipes); - */ + } diff --git a/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java b/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java index 63e432a..33b2003 100644 --- a/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java +++ b/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java @@ -59,6 +59,7 @@ public void displayAllReleventItems(List p_78018_1_) { p_78018_1_.add(new ItemStack(MyMod.amountmaintainer)); p_78018_1_.add(new ItemStack(MyMod.submitter)); p_78018_1_.add(new ItemStack(MyMod.reader)); + p_78018_1_.add(new ItemStack(MyMod.reactorsyncer)); // p_78018_1_.add(new ItemStack(MyMod.euupgrade, 1)); } diff --git a/src/main/java/reobf/proghatches/oc/ItemGTRedstoneCard.java b/src/main/java/reobf/proghatches/oc/ItemGTRedstoneCard.java index 25c3312..4fae645 100644 --- a/src/main/java/reobf/proghatches/oc/ItemGTRedstoneCard.java +++ b/src/main/java/reobf/proghatches/oc/ItemGTRedstoneCard.java @@ -94,7 +94,7 @@ public Node node() { } - @Callback(doc = "getWireless(frequency:number[,isPublic:boolean]) --get GT wireless redstone, 'isPublic' defaults to true", direct = false) + @Callback(doc = "getWireless(frequency:number[,isPublic:boolean]) -- get GT wireless redstone, 'isPublic' defaults to true", direct = false) public Object[] getWireless(final Context context, final Arguments args) { boolean ispublic = args.isBoolean(1) ? args.checkBoolean(1) : true; UUID uid = getUUID(stack); @@ -105,7 +105,7 @@ public Object[] getWireless(final Context context, final Arguments args) { ProghatchesUtil.getSignalAt(ispublic ? null : uid, args.checkInteger(0), getMode(stack)) }; } - @Callback(doc = "setWireless(frequency:number,signal:number[,isPublic:boolean]) --set GT wireless redstone, 'isPublic' defaults to true", direct = false) + @Callback(doc = "setWireless(frequency:number,signal:number[,isPublic:boolean]) --s et GT wireless redstone, 'isPublic' defaults to true", direct = false) public Object[] setWireless(final Context context, final Arguments args) { boolean ispublic = args.isBoolean(2) ? args.checkBoolean(2) : true; @@ -120,7 +120,7 @@ public Object[] setWireless(final Context context, final Arguments args) { return null; } - @Callback(doc = "setGateMode(mode:string) --set GateMode, available modes: AND,NAND,OR,NOR,SINGLE_SOURCE", direct = false) + @Callback(doc = "setGateMode(mode:string) -- set GateMode, available modes: AND,NAND,OR,NOR,SINGLE_SOURCE", direct = false) public Object[] setGateMode(final Context context, final Arguments args) { // try{ @@ -140,7 +140,7 @@ public Object[] getGateMode(final Context context, final Arguments args) { return new Object[] { getMode(stack).toString() }; } - @Callback(doc = "clearWireless(isPublic:boolean[,frequency:number]) --clear GT wireless redstone, will clear all signals emitted by this card if 'frequency' is absent.", direct = false) + @Callback(doc = "clearWireless(isPublic:boolean[,frequency:number]) -- clear GT wireless redstone, will clear all signals emitted by this card if 'frequency' is absent.", direct = false) public Object[] clearWireless(final Context context, final Arguments args) { boolean ispublic = args.checkBoolean(0); @@ -158,7 +158,7 @@ public Object[] clearWireless(final Context context, final Arguments args) { return null; } - @Callback(doc = "getUUID() --get bound owner's UUID, or nil if absent", direct = false) + @Callback(doc = "getUUID() -- get bound owner's UUID, or nil if absent", direct = false) public Object[] getOwnerUUID(final Context context, final Arguments args) { return new Object[] { diff --git a/src/main/resources/assets/proghatches/lang/en_US.lang b/src/main/resources/assets/proghatches/lang/en_US.lang index f0df198..f9fa10f 100644 --- a/src/main/resources/assets/proghatches/lang/en_US.lang +++ b/src/main/resources/assets/proghatches/lang/en_US.lang @@ -551,3 +551,7 @@ hatch.dualinput.slave.inv.mapping.me.name=Dual Inventory Mapping Slave(ME) programmable_hatches.gt.pattern.mapping=Insert Pattern(ME Mapping Slave) hatch.dualinput.slave.inv.mapping.me.missing=Not Linked programmable_hatches.cover.me.drop=Cover is dropped, please re-attach it to update ME Network info. +tile.reactor_syncer.info.rs=Redstone: +tile.reactor_syncer.info.update=Update tick: +tile.reactor_syncer.info.max=Set to 15 +tile.reactor_syncer.info.min=Set to 0 diff --git a/src/main/resources/assets/proghatches/lang/en_US/PDIHIMS.lang b/src/main/resources/assets/proghatches/lang/en_US/PDIHIMS.lang new file mode 100644 index 0000000..2091070 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/en_US/PDIHIMS.lang @@ -0,0 +1,3 @@ +Not a hatch, is not a part of Multiblock +Link with Crafting Input Buffer using Data Stick to share input area inventory +Can be used to extend Patterns attached to master hatch \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN.lang b/src/main/resources/assets/proghatches/lang/zh_CN.lang index 4d51490..3be2d7f 100644 --- a/src/main/resources/assets/proghatches/lang/zh_CN.lang +++ b/src/main/resources/assets/proghatches/lang/zh_CN.lang @@ -550,3 +550,7 @@ hatch.dualinput.slave.inv.mapping.me.name=二合一输入区映射镜像(ME) programmable_hatches.gt.pattern.mapping=添加样板(ME映射镜像) hatch.dualinput.slave.inv.mapping.me.missing=未连接 programmable_hatches.cover.me.drop=覆盖板已掉落 请手动重新安装以更新ME网络信息 +tile.reactor_syncer.info.rs=红石强度: +tile.reactor_syncer.info.update=是更新刻: +tile.reactor_syncer.info.max=设为15 +tile.reactor_syncer.info.min=设为0 \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/PDIHIMS.lang b/src/main/resources/assets/proghatches/lang/zh_CN/PDIHIMS.lang new file mode 100644 index 0000000..efca394 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/zh_CN/PDIHIMS.lang @@ -0,0 +1,3 @@ +不是多方块机器的一部分 +使用闪存链接二合一输入仓以共享其输入区 +从而拓展连接的样板数量 \ No newline at end of file