Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Jun 23, 2024
1 parent bd35b56 commit 2db747e
Show file tree
Hide file tree
Showing 14 changed files with 316 additions and 39 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.16p1'
String versionOverride = '0.0.16p2'
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) {
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/reobf/proghatches/eucrafting/AECover.java
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,9 @@ protected boolean onCoverRightClickImpl(ForgeDirection side, int aCoverID, Data
return false;
};




@Override
protected boolean onCoverShiftRightClickImpl(ForgeDirection side, int aCoverID, Data aCoverVariable,
ICoverable aTileEntity, EntityPlayer aPlayer) {
Expand All @@ -549,10 +552,10 @@ protected boolean onCoverShiftRightClickImpl(ForgeDirection side, int aCoverID,
;

if (aCoverVariable.hasAEGUI() && !aPlayer.worldObj.isRemote) {
NW.sendPacketToAllPlayersInRange(aPlayer.getEntityWorld(),
/*NW.sendPacketToAllPlayersInRange(aPlayer.getEntityWorld(),
new GT_Packet_SendCoverData(side, aCoverID, aCoverVariable, aTileEntity), aTileEntity.getXCoord(),
aTileEntity.getZCoord());

*/
aPlayer.openGui(MyMod.instance, side.ordinal(), aPlayer.getEntityWorld(), aTileEntity.getXCoord(),
aTileEntity.getYCoord(), aTileEntity.getZCoord());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package reobf.proghatches.eucrafting;

public interface IIdleStateProvider {

public int getIdle();
public boolean failThisTick();
}
19 changes: 17 additions & 2 deletions src/main/java/reobf/proghatches/eucrafting/InterfaceData.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package reobf.proghatches.eucrafting;

import static gregtech.api.enums.GT_Values.NW;

import java.util.ArrayList;
import java.util.EnumSet;
import com.google.common.collect.ImmutableSet;
Expand Down Expand Up @@ -39,8 +41,10 @@
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import gregtech.api.gui.modularui.GT_CoverUIBuildContext;
import gregtech.api.net.GT_Packet_SendCoverData;
import gregtech.api.util.ISerializableObject;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
Expand All @@ -52,6 +56,7 @@
import net.minecraftforge.common.util.ForgeDirection;
import reobf.proghatches.eucrafting.AECover.Data;
import reobf.proghatches.main.FakeHost;
import reobf.proghatches.main.MyMod;

public class InterfaceData implements Data, IInterfaceHost, IGridTickable, IUpgradeableHost, ICustomNameObject,
IConfigurableObject, IPriorityHost,
Expand Down Expand Up @@ -376,7 +381,7 @@ public void loadDataFromNBT(NBTBase aNBT) {

@Override
public TickingRequest getTickingRequest(IGridNode node) {
//

return duality.getTickingRequest(node);
}

Expand All @@ -387,6 +392,12 @@ public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall)

return duality.tickingRequest(node, TicksSinceLastCall);
}







public String getCustomName() {
if (name != null&&name.length()>0){
Expand Down Expand Up @@ -468,7 +479,11 @@ public TileEntity fakeTile() {
}
@Override
public void addUIWidgets(Builder builder, GT_CoverUIBuildContext gt_CoverUIBuildContext) {

if (hasAEGUI() && !gt_CoverUIBuildContext.getPlayer().getEntityWorld().isRemote) {
gt_CoverUIBuildContext.getPlayer()
.openGui(MyMod.instance, side.ordinal(),
gt_CoverUIBuildContext.getPlayer().getEntityWorld(), this.getPos().x,
this.getPos().y, this.getPos().z);}
}


Expand Down
33 changes: 22 additions & 11 deletions src/main/java/reobf/proghatches/eucrafting/InterfaceP2PData.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import com.glodblock.github.loader.ItemAndBlockHolder;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder;

import appeng.api.config.Actionable;
import appeng.api.config.Upgrades;
import appeng.api.exceptions.FailedConnection;
Expand Down Expand Up @@ -51,6 +53,7 @@
import appeng.util.Platform;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import gregtech.api.gui.modularui.GT_CoverUIBuildContext;
import gregtech.api.interfaces.tileentity.ICoverable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
Expand Down Expand Up @@ -482,7 +485,7 @@ public void update(ICoverable aTileEntity) {

};

@Override
/*@Override
public TickingRequest getTickingRequest(IGridNode node) {
//
return duality.getTickingRequest(node);
Expand All @@ -493,17 +496,18 @@ public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall)
if (first)
return TickRateModulation.SAME;

/*ItemStack is=new ItemStack(Items.apple);
is.setTagCompound(this.getTag());
is.setStackDisplayName(
duality.hasCustomName()?
duality.getCustomName():"");
this.setTag(is.getTagCompound());
*/

return duality.tickingRequest(node, TicksSinceLastCall);
}*/@Override
public TickingRequest getTickingRequest(IGridNode node) {

return new TickingRequest(100, 100, false, false);
}

@Override
public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall) {
return TickRateModulation.SAME;
}
public String getCustomName() {
if(duality.hasCustomName())return duality.getCustomName();
Expand Down Expand Up @@ -710,6 +714,13 @@ public String name() {
if(duality.hasCustomName())return duality.getCustomName();
return null;
}

@Override
public void addUIWidgets(Builder builder, GT_CoverUIBuildContext gt_CoverUIBuildContext) {
if (hasAEGUI() && !gt_CoverUIBuildContext.getPlayer().getEntityWorld().isRemote) {
gt_CoverUIBuildContext.getPlayer()
.openGui(MyMod.instance, side.ordinal(),
gt_CoverUIBuildContext.getPlayer().getEntityWorld(), this.getPos().x,
this.getPos().y, this.getPos().z);}
}

}
16 changes: 13 additions & 3 deletions src/main/java/reobf/proghatches/eucrafting/InterfaceP2PEUData.java
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ public void update(ICoverable aTileEntity) {

}
;

/*
if (worksensitive && (aTileEntity instanceof IMachineProgress)) {
boolean on = (((IMachineProgress) aTileEntity).hasThingsToDo());
boolean delayon = value > 0;
Expand Down Expand Up @@ -561,11 +561,11 @@ public void update(ICoverable aTileEntity) {
duality.redstoneOverride = false;
}

*/
};

private int value;

/*
@Override
public TickingRequest getTickingRequest(IGridNode node) {
//
Expand All @@ -578,6 +578,16 @@ public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall)
return TickRateModulation.SAME;
return duality.tickingRequest(node, TicksSinceLastCall);
}*/
@Override
public TickingRequest getTickingRequest(IGridNode node) {

return new TickingRequest(100, 100, false, false);
}

@Override
public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall) {
return TickRateModulation.SAME;
}
public String getCustomName() {
if(duality.hasCustomName())return duality.getCustomName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import java.util.Set;
import com.glodblock.github.loader.ItemAndBlockHolder;
import com.google.common.collect.ImmutableSet;
import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder;

import appeng.api.config.Actionable;
import appeng.api.config.Upgrades;
import appeng.api.exceptions.FailedConnection;
Expand Down Expand Up @@ -48,6 +50,7 @@
import appeng.util.Platform;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import gregtech.api.gui.modularui.GT_CoverUIBuildContext;
import gregtech.api.interfaces.tileentity.ICoverable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
Expand Down Expand Up @@ -476,7 +479,7 @@ public void update(ICoverable aTileEntity) {
;

};

/*
@Override
public TickingRequest getTickingRequest(IGridNode node) {
//
Expand All @@ -489,6 +492,16 @@ public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall)
return TickRateModulation.SAME;
return duality.tickingRequest(node, TicksSinceLastCall);
}*/
@Override
public TickingRequest getTickingRequest(IGridNode node) {

return new TickingRequest(100, 100, false, false);
}

@Override
public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall) {
return TickRateModulation.SAME;
}
public String getCustomName() {
if(duality.hasCustomName())return duality.getCustomName();
Expand Down Expand Up @@ -678,5 +691,12 @@ public boolean requireChannel() {
public ForgeDirection getActualSide() {
// TODO Auto-generated method stub
return side;
}@Override
public void addUIWidgets(Builder builder, GT_CoverUIBuildContext gt_CoverUIBuildContext) {
if (hasAEGUI() && !gt_CoverUIBuildContext.getPlayer().getEntityWorld().isRemote) {
gt_CoverUIBuildContext.getPlayer()
.openGui(MyMod.instance, side.ordinal(),
gt_CoverUIBuildContext.getPlayer().getEntityWorld(), this.getPos().x,
this.getPos().y, this.getPos().z);}
}
}
Loading

0 comments on commit 2db747e

Please sign in to comment.