Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Mar 1, 2025
1 parent fa87fed commit 4d04bb6
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 33 deletions.
12 changes: 9 additions & 3 deletions src/main/java/reobf/proghatches/ae/PartStockingExportBus.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;

import java.util.List;

import com.glodblock.github.common.item.ItemFluidDrop;
import com.gtnewhorizons.modularui.api.ModularUITextures;
import com.gtnewhorizons.modularui.api.forge.ItemStackHandler;
Expand Down Expand Up @@ -48,7 +50,7 @@

public class PartStockingExportBus extends PartBasicState implements

IGridProxyable, IActionHost, IGuiProvidingPart, IGridTickable, ICraftingMachinePart {
IGridProxyable, IActionHost, IGuiProvidingPart, IGridTickable {

ItemStack[] inv = new ItemStack[1];

Expand Down Expand Up @@ -352,8 +354,12 @@ public boolean onPartActivate(EntityPlayer player, Vec3 pos) {

return true;
}

@Override
public void getDrops(final List<ItemStack> drops, final boolean wrenched) {
if (inv[0] != null) drops.add(inv[0]);

}
/* @Override
public boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCrafting table,
ForgeDirection ejectionDirection) {
Expand All @@ -364,6 +370,6 @@ public boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCraf
public boolean acceptsPlans(ForgeDirection ejectionDirection) {
System.out.println(ejectionDirection);
return false;
}
}*/

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;

import java.util.List;

import com.gtnewhorizons.modularui.api.ModularUITextures;
import com.gtnewhorizons.modularui.api.forge.ItemStackHandler;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
Expand Down Expand Up @@ -334,5 +336,9 @@ public boolean onPartActivate(EntityPlayer player, Vec3 pos) {
EUUtil.open(player, player.getEntityWorld(), t.xCoord, t.yCoord, t.zCoord, getSide());

return true;
} @Override
public void getDrops(final List<ItemStack> drops, final boolean wrenched) {
if (inv[0] != null) drops.add(inv[0]);

}
}
10 changes: 8 additions & 2 deletions src/main/java/reobf/proghatches/ae/part2/PartCoW.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,11 @@ public void destroy() {
@Override
public TickRateModulation tickingRequest(IGridNode nodexx, int TicksSinceLastCallxx) {
count++;
boolean thisTick=(update&1)!=0;
boolean thisTick;
synchronized (this) {
thisTick=(update&1)!=0;
update=update>>1;
}
if(thisTick){
onNeighborChanged();

Expand Down Expand Up @@ -500,10 +503,13 @@ public NBTTagCompound getNBTData(EntityPlayerMP player, IPart part, TileEntity t
}

}

int update;
public void update() {
update=update|0x1010;//update after 4 ticks and 12 ticks

synchronized (this) {
update=update|0x1010;//update after 4 ticks and 12 ticks
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2401,9 +2401,15 @@ private void broken() {
+ ("valid:" + DualInputHatch.this.isValid())
+ ("x:" + getBaseMetaTileEntity().getXCoord())
+ ("y:" + getBaseMetaTileEntity().getYCoord())
+ ("z:" + getBaseMetaTileEntity().getZCoord()));
+ ("z:" + getBaseMetaTileEntity().getZCoord())
+ ("w:" + getBaseMetaTileEntity().getWorld().provider.dimensionId));

}

MyMod.LOG.fatal(shadowFluid.toString());
MyMod.LOG.fatal(shadowItems.toString());
MyMod.LOG.fatal(cachedFluid.toString());
MyMod.LOG.fatal(cachedItems.toString());

}

Expand All @@ -2426,7 +2432,8 @@ public ItemStack[] getItems() {

public FluidStack[] getFluid() {
if (recipe == false) {
broken();
if(!broken)
broken();
// Thread.dumpStack();
broken = true;
return new FluidStack[0];
Expand Down Expand Up @@ -2728,6 +2735,11 @@ public void setProcessingLogic(ProcessingLogic pl) {
* }
* }
*/


@Override
public ItemStack getMachineCraftingIcon() {
// TODO Auto-generated method stub
return super.getMachineCraftingIcon();
}
public List<ProcessingLogic> processingLogics = new ArrayList<>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,14 @@ protected void drawSlot(Slot slotIn) {


@SideOnly(Side.CLIENT)
private final TextRenderer textRenderer = new TextRenderer();
private TextRenderer textRenderer0;

{
if(cpw.mods.fml.common.FMLCommonHandler. instance().getSide()==Side.CLIENT){
textRenderer0= new TextRenderer();
}

}
@SideOnly(Side.CLIENT)
public void drawSlot(Slot slotIn, boolean drawStackSize){
super.drawSlot(slotIn,false);
Expand Down Expand Up @@ -438,15 +445,15 @@ public void drawSlot(Slot slotIn, boolean drawStackSize){
} else if (amountText.length() > 4) {
scale = 0.5f;
}
textRenderer.setShadow(true);
textRenderer.setScale(scale);
textRenderer.setColor(Color.WHITE.normal);
textRenderer.setAlignment(Alignment.BottomRight, size.width - 1, size.height - 1);
textRenderer.setPos(1, 1);
textRenderer0.setShadow(true);
textRenderer0.setScale(scale);
textRenderer0.setColor(Color.WHITE.normal);
textRenderer0.setAlignment(Alignment.BottomRight, size.width - 1, size.height - 1);
textRenderer0.setPos(1, 1);
GlStateManager.disableLighting();
GlStateManager.disableDepth();
GlStateManager.disableBlend();
textRenderer.draw(amountText);
textRenderer0.draw(amountText);
GlStateManager.enableLighting();
GlStateManager.enableDepth();
GlStateManager.enableBlend();
Expand Down
31 changes: 15 additions & 16 deletions src/main/java/reobf/proghatches/main/MyMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
import reobf.proghatches.keybinding.KeyBindings;
import reobf.proghatches.lang.LangManager;
import reobf.proghatches.main.asm.repack.objectwebasm.ClassWriter;
import reobf.proghatches.main.mixin.MixinPlugin;
import reobf.proghatches.main.registration.Registration;
import reobf.proghatches.net.ConnectionModeMessage;
import reobf.proghatches.net.MAFXMessage;
Expand Down Expand Up @@ -153,31 +154,29 @@ public class MyMod {
FMLCommonHandler.instance()
.exitJava(1, false);
}
if ((Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment")) {
/*if ((Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment")) {
ProcessingLogic.class.getDeclaredFields();
/*
* DualityInterface.class.getDeclaredFields();
* CraftFromPatternTask.class.getDeclaredFields();
* NEECraftingHandler.class.getDeclaredFields();
* GregTech5RecipeProcessor.class.getDeclaredFields();
* FluidPatternTerminalRecipeTransferHandler.class.getDeclaredFields();
*/
/*
* CraftingCPUCluster.class.getDeclaredFields();
* NBTTagCompound t=new NBTTagCompound();
* AEFluidStack.create(new FluidStack(FluidRegistry.WATER,123).writeToNBT(t));
*/

}
}*/

instance = this;
}

static {

//

if(MixinPlugin.loaded==false){
LOG.fatal("!!!ERROR!!!");
LOG.fatal("Mixins fails to load.");
LOG.fatal("Will stop the game since it's impossible to proceed.");

throw new AssertionError("abort");

}else{
LOG.fatal("Mixins loaded, sounds good!");

}
class test extends Item {

@Override
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ public void acceptTargets(Set<String> myTargets, Set<String> otherTargets) {
;
public static boolean noEUMixin;
static public ArrayList<String> retLate = new ArrayList<>();

public static boolean loaded;
//spotless:on
@SuppressWarnings("unused")
@Override
public List<String> getMixins() {

loaded=true;
boolean ff = true;

File f = new File(System.getProperty("user.dir") + File.separator + "config", "proghatches.mixin.properties");
Expand Down
33 changes: 33 additions & 0 deletions src/main/java/reobf/proghatches/main/registration/PHRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -2100,6 +2100,39 @@ public void run() {
.eut(30)
.addTo(RecipeMaps.assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
ItemList.HATCHES_INPUT_BUS[8].get(1),
new ItemStack(MyMod.upgrades,4,0)

)
.itemOutputs( new ItemStack(
GregTechAPI.sBlockMachines,
1,
Config.metaTileEntityOffset + Registration.PhantomInputBusOffset))
.duration(1 * SECONDS)
.eut(30)
.addTo(RecipeMaps.assemblerRecipes);


GTValues.RA.stdBuilder()
.itemInputs(
Api.INSTANCE.definitions()
.parts()
.p2PTunnelGregtech().maybeStack(1).get(),
Api.INSTANCE.definitions()
.materials().cardInverter().maybeStack(1).get(),
GTUtility.getIntegratedCircuit(4)

)
.itemOutputs( new ItemStack(

MyMod.part_cow))
.duration(1 * SECONDS)
.eut(30)
.addTo(RecipeMaps.assemblerRecipes);



/*
* rec = new ShapelessOreRecipe( new ItemStack( MyMod.plunger,1,1),
Expand Down

0 comments on commit 4d04bb6

Please sign in to comment.