Skip to content

Commit b4eaa1d

Browse files
committed
remove old comments
1 parent 47bb2e9 commit b4eaa1d

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/main/java/gregtech/api/metatileentity/multiblock/MultiblockControllerBase.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ public static TraceabilityPredicate metaTileEntities(MetaTileEntity... metaTileE
211211
ResourceLocation[] ids = Arrays.stream(metaTileEntities).filter(Objects::nonNull)
212212
.map(tile -> tile.metaTileEntityId).toArray(ResourceLocation[]::new);
213213
return tilePredicate((state, tile) -> ArrayUtils.contains(ids, tile.metaTileEntityId),
214-
// we don't want to copy this mte again ?
215214
getCandidates(metaTileEntities));
216215
}
217216

@@ -341,8 +340,6 @@ protected Function<BlockPos, Integer> multiblockPartSorter() {
341340
public void checkStructurePattern() {
342341
if (structurePattern == null) return;
343342
PatternMatchContext context = structurePattern.checkPatternFastAt(getWorld(), getPos(),
344-
// why does this call getOpposite()?
345-
// front facing is not being set correctly sometimes
346343
getFrontFacing().getOpposite(), getUpwardsFacing(), allowsFlip());
347344
if (context != null && !structureFormed) {
348345
Set<IMultiblockPart> rawPartsSet = context.getOrCreate("MultiblockParts", HashSet::new);

src/main/java/gregtech/api/pattern/BlockPattern.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
package gregtech.api.pattern;
22

3-
import gregtech.api.GregTechAPI;
43
import gregtech.api.metatileentity.MetaTileEntity;
54
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity;
65
import gregtech.api.metatileentity.multiblock.MultiblockControllerBase;
7-
import gregtech.api.metatileentity.registry.MTERegistry;
86
import gregtech.api.util.BlockInfo;
7+
import gregtech.api.util.GTUtility;
98
import gregtech.api.util.RelativeDirection;
109

1110
import net.minecraft.block.state.IBlockState;
@@ -164,9 +163,6 @@ private PatternMatchContext checkPatternAt(World world, BlockPos centerPos, Enum
164163
for (int b = 0, y = -centerOffset[1]; b < this.thumbLength; b++, y++) {
165164
for (int a = 0, x = -centerOffset[0]; a < this.palmLength; a++, x++) {
166165
TraceabilityPredicate predicate = this.blockMatches[c][b][a];
167-
// this is expecting the te pos to not be set?
168-
// this should be 0, 0, 0
169-
// EBF front facing was SOUTH instead of NORTH
170166
BlockPos pos = RelativeDirection.setActualRelativeOffset(x, y, z, frontFacing, upwardsFacing,
171167
isFlipped, structureDir)
172168
.add(centerPos.getX(), centerPos.getY(), centerPos.getZ());
@@ -380,9 +376,7 @@ public void autoBuild(EntityPlayer player, MultiblockControllerBase controllerBa
380376
.getStateFromMeta(itemBlock.getMetadata(found.getMetadata()));
381377
blocks.put(pos, state);
382378
world.setBlockState(pos, state);
383-
MTERegistry registry = GregTechAPI.mteManager
384-
.getRegistry(found.getItem().getRegistryName().getNamespace());
385-
MetaTileEntity sampleMetaTileEntity = registry.getObjectById(found.getItemDamage());
379+
MetaTileEntity sampleMetaTileEntity = GTUtility.getMetaTileEntity(found);
386380
if (sampleMetaTileEntity != null) {
387381
MetaTileEntity metaTileEntity = sampleMetaTileEntity.copy();
388382
metaTileEntity.onPlacement(player);

0 commit comments

Comments
 (0)