mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-25 21:18:34 +01:00
Compare commits
2 commits
e6f5b3b1c6
...
a269c805af
Author | SHA1 | Date | |
---|---|---|---|
a269c805af | |||
da479145f4 |
5 changed files with 15 additions and 20 deletions
|
@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
|
|||
apply plugin: 'eclipse'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
version = '1.13.3'
|
||||
version = '1.13.4'
|
||||
group = 'de.ellpeck.prettypipes' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = 'PrettyPipes'
|
||||
|
||||
|
@ -105,11 +105,11 @@ configurations {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
minecraft 'net.minecraftforge:forge:1.19-41.1.0'
|
||||
minecraft 'net.minecraftforge:forge:1.19.2-43.1.1'
|
||||
embed 'org.jgrapht:jgrapht-core:1.5.1'
|
||||
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.19-common-api:11.1.1.239")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.19-forge:11.1.1.239")
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.19.2-common-api:11.3.0.260")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.19.2-forge:11.3.0.260")
|
||||
|
||||
// to test the rf requiring and crafting stuff
|
||||
/* runtimeOnly fg.deobf("curse.maven:powah-352656:3057732")
|
||||
|
|
|
@ -7,15 +7,10 @@ public enum ModuleTier {
|
|||
HIGH;
|
||||
|
||||
public final <T> T forTier(T low, T medium, T high) {
|
||||
switch (this) {
|
||||
case LOW:
|
||||
return low;
|
||||
case MEDIUM:
|
||||
return medium;
|
||||
case HIGH:
|
||||
return high;
|
||||
default:
|
||||
throw new RuntimeException();
|
||||
}
|
||||
return switch (this) {
|
||||
case LOW -> low;
|
||||
case MEDIUM -> medium;
|
||||
case HIGH -> high;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import net.minecraft.world.phys.shapes.BooleanOp;
|
|||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.Shapes;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import net.minecraftforge.network.NetworkHooks;
|
||||
import org.apache.commons.lang3.mutable.MutableObject;
|
||||
|
@ -207,7 +207,7 @@ public class PipeBlock extends BaseEntityBlock {
|
|||
var connectable = tile.getCapability(Registry.pipeConnectableCapability, opposite).orElse(null);
|
||||
if (connectable != null)
|
||||
return connectable.getConnectionType(pos, direction);
|
||||
var handler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, opposite).orElse(null);
|
||||
var handler = tile.getCapability(ForgeCapabilities.ITEM_HANDLER, opposite).orElse(null);
|
||||
if (handler != null)
|
||||
return ConnectionType.CONNECTED;
|
||||
}
|
||||
|
|
|
@ -35,9 +35,9 @@ import net.minecraft.world.phys.AABB;
|
|||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
import net.minecraftforge.common.util.Lazy;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import net.minecraftforge.items.ItemStackHandler;
|
||||
|
@ -291,7 +291,7 @@ public class PipeBlockEntity extends BlockEntity implements MenuProvider, IPipeC
|
|||
}
|
||||
|
||||
public IItemHandler getItemHandler(Direction dir) {
|
||||
var handler = this.getNeighborCap(dir, CapabilityItemHandler.ITEM_HANDLER_CAPABILITY);
|
||||
var handler = this.getNeighborCap(dir, ForgeCapabilities.ITEM_HANDLER);
|
||||
if (handler != null)
|
||||
return handler;
|
||||
return Utility.getBlockItemHandler(this.level, this.worldPosition.relative(dir), dir.getOpposite());
|
||||
|
|
|
@ -21,8 +21,8 @@ import net.minecraft.world.level.Level;
|
|||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.energy.CapabilityEnergy;
|
||||
import net.minecraftforge.energy.EnergyStorage;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
|
||||
|
@ -96,7 +96,7 @@ public class PressurizerBlockEntity extends BlockEntity implements MenuProvider,
|
|||
|
||||
@Override
|
||||
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
|
||||
if (cap == CapabilityEnergy.ENERGY) {
|
||||
if (cap == ForgeCapabilities.ENERGY) {
|
||||
return this.lazyStorage.cast();
|
||||
} else if (cap == Registry.pipeConnectableCapability) {
|
||||
return this.lazyThis.cast();
|
||||
|
|
Loading…
Reference in a new issue