Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the matter manipulator #3222

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7e19535
matter manipulator initial implementation
RecursivePineapple Jul 23, 2024
a0e6388
worked on building logic
RecursivePineapple Aug 24, 2024
54b9ae4
worked on placing logic some more
RecursivePineapple Aug 26, 2024
5d9b249
fixed problem with radial menu
RecursivePineapple Sep 1, 2024
72c2096
misc fixes
RecursivePineapple Sep 1, 2024
7574e06
fixes for rename
RecursivePineapple Sep 5, 2024
b2c1a33
finished AE integration
RecursivePineapple Sep 11, 2024
f30a1d0
misc polish
RecursivePineapple Sep 11, 2024
3d86a25
worked on block analyzer
RecursivePineapple Sep 11, 2024
5a49c65
general polishing
RecursivePineapple Sep 15, 2024
bdd10c1
Replaced DirectionUtil with ForgeDirection
RecursivePineapple Sep 15, 2024
bfe1013
misc fixes
RecursivePineapple Sep 18, 2024
b228ef0
applied spotless
RecursivePineapple Sep 18, 2024
8366c95
moved item & final cleanup
RecursivePineapple Sep 18, 2024
acc4859
Improved AE dismantling
RecursivePineapple Sep 18, 2024
88e543f
worked on the block analyzer & applier
RecursivePineapple Sep 23, 2024
503672c
added ae config support
RecursivePineapple Sep 23, 2024
c4b4a2b
worked on block analysis
RecursivePineapple Sep 26, 2024
235a999
moved classes to their own files
RecursivePineapple Sep 29, 2024
557ef38
got copying working kinda
RecursivePineapple Oct 1, 2024
93d29f0
worked on tons of stuff
RecursivePineapple Oct 4, 2024
eac9ff4
applied spotless
RecursivePineapple Oct 4, 2024
febe062
Added & fixed lots of things
RecursivePineapple Oct 10, 2024
78a1245
item usage estimation & cleanup
RecursivePineapple Oct 16, 2024
15614d6
uplink skeleton
RecursivePineapple Oct 16, 2024
6b27c4e
Finished uplink & added moving
RecursivePineapple Oct 18, 2024
15ae537
Added meta item 4 & manipulator parts
RecursivePineapple Oct 20, 2024
0d242e0
Added exchanging + cleanup
RecursivePineapple Oct 20, 2024
4ede682
applied spotless
RecursivePineapple Oct 20, 2024
5c05e33
added recipes for manipulators
RecursivePineapple Oct 20, 2024
8dcd628
changed manipulator charge tooltip
RecursivePineapple Oct 20, 2024
d7e7bc0
Misc changes
RecursivePineapple Oct 22, 2024
c49b208
fixed problem with obfuscated field name
RecursivePineapple Oct 22, 2024
af2456a
fix rebase error
RecursivePineapple Oct 23, 2024
7d4a20b
misc cleanup
RecursivePineapple Oct 24, 2024
289a355
Added cable mode + misc fixes
RecursivePineapple Oct 24, 2024
6d2aacb
Various fixes
RecursivePineapple Oct 30, 2024
f0a43e7
added new textures & tweaked recipes
RecursivePineapple Oct 30, 2024
319836d
applied spotless
RecursivePineapple Oct 30, 2024
a4f0281
fixed ender io conduits getting deleted
RecursivePineapple Oct 30, 2024
338fd84
Misc fixes & changes
RecursivePineapple Oct 31, 2024
9ebdfe6
Fixed several minor issues
RecursivePineapple Nov 1, 2024
6c87623
THE GREAT COMMENTING + misc fixes
RecursivePineapple Nov 1, 2024
2b29d33
Fix getWorld returning null on MP clients
RecursivePineapple Nov 3, 2024
3e03bc5
Fixed NPE when cell doesn't have upgrades
RecursivePineapple Nov 4, 2024
af6b578
Fixed torch/redstone/repeater placing
RecursivePineapple Nov 4, 2024
42ee570
Fixed crash on server
RecursivePineapple Nov 4, 2024
82fbc4c
Added crash mitigation
RecursivePineapple Nov 4, 2024
2a43f39
Added ME output bus/hatch support
RecursivePineapple Nov 8, 2024
98a0d52
Fixed several minor issues
RecursivePineapple Nov 9, 2024
c2f0561
Fixed drawers & added infra. for rotation hacks
RecursivePineapple Nov 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/gregtech/GTMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
import gregtech.common.config.Other;
import gregtech.common.config.Worldgen;
import gregtech.common.covers.CoverFacadeAE;
import gregtech.common.items.MetaGeneratedItem04;
import gregtech.common.misc.GTCommand;
import gregtech.common.misc.spaceprojects.commands.SPCommand;
import gregtech.common.misc.spaceprojects.commands.SPMCommand;
Expand Down Expand Up @@ -371,6 +372,7 @@ public boolean test(ItemStack stack) {
new GTItemIterator().run();
gregtechproxy.registerUnificationEntries();
new FuelLoader().run();
MetaGeneratedItem04.INSTANCE.addRecipes();

if (Mods.Waila.isModLoaded()) {
Waila.init();
Expand Down
29 changes: 29 additions & 0 deletions src/main/java/gregtech/api/enums/ItemList.java
Original file line number Diff line number Diff line change
Expand Up @@ -2116,6 +2116,8 @@ public enum ItemList implements IItemContainer {
BlockQuarkReleaseChamber,
BlockQuarkContainmentCasing,
LargeFluidExtractor,
MatterManipulatorUplink,
Hatch_MatterManipulatorUplink_ME,
AcceleratorLV,
AcceleratorMV,
AcceleratorHV,
Expand Down Expand Up @@ -2569,6 +2571,33 @@ public enum ItemList implements IItemContainer {
ResearchCompleter, // Populated in EMT
SpaceElevatorController, // Populated in GTNH-Intergalactic
Spray_Color_Infinite,
MatterManipulatorHologram,
MatterManipulatorPowerCore0,
MatterManipulatorComputerCore0,
MatterManipulatorTeleporterCore0,
MatterManipulatorFrame0,
MatterManipulatorLens0,
MatterManipulatorPowerCore1,
MatterManipulatorComputerCore1,
MatterManipulatorTeleporterCore1,
MatterManipulatorFrame1,
MatterManipulatorLens1,
MatterManipulatorPowerCore2,
MatterManipulatorComputerCore2,
MatterManipulatorTeleporterCore2,
MatterManipulatorFrame2,
MatterManipulatorLens2,
MatterManipulatorPowerCore3,
MatterManipulatorComputerCore3,
MatterManipulatorTeleporterCore3,
MatterManipulatorFrame3,
MatterManipulatorLens3,
MatterManipulatorAEDownlink,
MatterManipulatorQuantumDownlink,
MatterManipulator0,
MatterManipulator1,
MatterManipulator2,
MatterManipulator3,
// semicolon after the comment to reduce merge conflicts
;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/gregtech/api/enums/MetaTileEntityIDs.java
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,8 @@ public enum MetaTileEntityIDs {
INPUT_HATCH_ME(2717),
INPUT_BUS_ME(2718),
LARGE_FLUID_EXTRACTOR(2730),
MATTER_MANIPULATOR_UPLINK(2731),
HATCH_MATTER_MANIPULATOR_UPLINK_ME(2732),
INDUSTRIAL_LASER_ENGRAVER_CONTROLLER(3004),
INDUSTRIAL_COMPRESSOR_CONTROLLER(3005),
HIP_COMPRESSOR_CONTROLLER(3006),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ public interface ICoverable extends IRedstoneTileEntity, IHasInventory, IBasicEn

boolean dropCover(ForgeDirection side, ForgeDirection droppedSide, boolean aForced);

default ItemStack removeCoverAtSide(ForgeDirection side, boolean aForced) {
return null;
}

@Deprecated
void setCoverDataAtSide(ForgeDirection side, int aData);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,25 @@ public interface IRedstoneEmitter extends IHasWorldObjectAndCoords {
*/
void setStrongOutputRedstoneSignal(ForgeDirection side, byte aStrength);

/**
* Sets the strength of the redstone signal on the given side to strong or weak.
* Does not change the actual signal.
*
* @param side Must not be UNKNOWN
* @param isStrong True = strong, false = weak
*/
default void setRedstoneOutputStrength(ForgeDirection side, boolean isStrong) {}

/**
* Checks if the given side will output a strong redstone signal when emitting a redstone signal.
*
* @param side Must not be UNKNOWN
* @return True = strong signal, false = weak signal
*/
default boolean getRedstoneOutputStrength(ForgeDirection side) {
return false;
}

/**
* Gets the Output for the comparator on the given Side
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,10 @@ public void generatePowerNodes() {
}
}

public void setCableUpdateDelay(int delay) {
cableUpdateDelay = delay;
}

@Override
public long getOutputAmperage() {
if (canAccessData() && mMetaTileEntity.isElectric()) return mMetaTileEntity.maxAmperesOut();
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,21 @@ public boolean dropCover(ForgeDirection side, ForgeDirection droppedSide, boolea
return true;
}

@Override
public ItemStack removeCoverAtSide(ForgeDirection side, boolean aForced) {
final CoverInfo coverInfo = getCoverInfoAtSide(side);
if (!coverInfo.isValid()) return null;
if (!coverInfo.onCoverRemoval(aForced) && !aForced) return null;
final ItemStack tStack = coverInfo.getDrop();
if (tStack != null) {
coverInfo.onDropped();
}
clearCoverInfoAtSide(side);
updateOutputRedstoneSignal(side);

return tStack;
}

protected void onBaseTEDestroyed() {
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
final CoverInfo coverInfo = getCoverInfoAtSide(side);
Expand All @@ -446,6 +461,17 @@ public void setStrongOutputRedstoneSignal(ForgeDirection side, byte strength) {
setOutputRedstoneSignal(side, strength);
}

@Override
public void setRedstoneOutputStrength(ForgeDirection side, boolean isStrong) {
mStrongRedstone &= ~(byte) side.flag;
setOutputRedstoneSignal(side, mSidedRedstone[side.ordinal()]);
}

@Override
public boolean getRedstoneOutputStrength(ForgeDirection side) {
return (mStrongRedstone & side.flag) != 0;
}

@Override
public void setInternalOutputRedstoneSignal(ForgeDirection side, byte aStrength) {
if (!getCoverBehaviorAtSideNew(side)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.metatileentity.IMetaTileEntityPipe;
import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.items.MetaGeneratedTool;
Expand All @@ -69,7 +70,7 @@
import gregtech.common.covers.CoverFluidRegulator;
import gregtech.common.covers.CoverInfo;

public class MTEFluid extends MetaPipeEntity {
public class MTEFluid extends MetaPipeEntity implements IMetaTileEntityPipe {

protected static final EnumMap<ForgeDirection, EnumMap<Border, ForgeDirection>> FACE_BORDER_MAP = new EnumMap<>(
ForgeDirection.class);
Expand Down
Loading
Loading