mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-15 06:54:21 +01:00
Port recent changes to 1.16
This commit is contained in:
parent
afa477d81b
commit
f7c5c51fd2
@ -60,10 +60,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"north": "true",
|
||||
"up": "true",
|
||||
"down": "false",
|
||||
"up": "true"
|
||||
"south": "false",
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lu_x"
|
||||
@ -71,10 +71,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "true",
|
||||
"north": "false",
|
||||
"up": "true",
|
||||
"down": "false",
|
||||
"up": "true"
|
||||
"south": "true",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ru_x"
|
||||
@ -82,10 +82,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"north": "true",
|
||||
"up": "false",
|
||||
"down": "true",
|
||||
"up": "false"
|
||||
"south": "false",
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ld_x"
|
||||
@ -93,10 +93,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "true",
|
||||
"north": "false",
|
||||
"up": "false",
|
||||
"down": "true",
|
||||
"up": "false"
|
||||
"south": "true",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/rd_x"
|
||||
@ -104,10 +104,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"north": "false",
|
||||
"up": "true",
|
||||
"down": "true",
|
||||
"up": "true"
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_x"
|
||||
@ -115,10 +115,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"north": "false",
|
||||
"up": "true",
|
||||
"down": "false",
|
||||
"up": "true"
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_x"
|
||||
@ -126,10 +126,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"north": "false",
|
||||
"up": "false",
|
||||
"down": "true",
|
||||
"up": "false"
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_x"
|
||||
@ -137,10 +137,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"down": "false",
|
||||
"south": "true",
|
||||
"north": "true",
|
||||
"down": "false",
|
||||
"up": "false"
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_x"
|
||||
@ -148,10 +148,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"down": "false",
|
||||
"south": "false",
|
||||
"north": "true",
|
||||
"down": "false",
|
||||
"up": "false"
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_x"
|
||||
@ -159,10 +159,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"down": "false",
|
||||
"south": "true",
|
||||
"north": "false",
|
||||
"down": "false",
|
||||
"up": "false"
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_x"
|
||||
@ -170,10 +170,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"north": "false",
|
||||
"up": "false",
|
||||
"down": "false",
|
||||
"up": "false"
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/none_x"
|
||||
@ -181,10 +181,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "true",
|
||||
"west": "true",
|
||||
"north": "false",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"south": "true",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lu_y"
|
||||
@ -192,10 +192,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "true",
|
||||
"west": "false",
|
||||
"north": "false",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"south": "true",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ru_y"
|
||||
@ -203,10 +203,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"west": "true",
|
||||
"north": "true",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"south": "false",
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ld_y"
|
||||
@ -214,10 +214,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"west": "false",
|
||||
"north": "true",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"south": "false",
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/rd_y"
|
||||
@ -225,10 +225,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"south": "true",
|
||||
"west": "false",
|
||||
"north": "true",
|
||||
"east": "false"
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_y"
|
||||
@ -236,10 +236,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"south": "true",
|
||||
"west": "false",
|
||||
"north": "false",
|
||||
"east": "false"
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_y"
|
||||
@ -247,10 +247,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"west": "false",
|
||||
"north": "true",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"south": "false",
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_y"
|
||||
@ -258,10 +258,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"west": "true",
|
||||
"north": "false",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_y"
|
||||
@ -269,10 +269,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"west": "true",
|
||||
"north": "false",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_y"
|
||||
@ -280,10 +280,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"west": "false",
|
||||
"north": "false",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_y"
|
||||
@ -291,10 +291,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"west": "false",
|
||||
"north": "false",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/none_y"
|
||||
@ -304,8 +304,8 @@
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "true",
|
||||
"down": "false",
|
||||
"up": "true"
|
||||
"up": "true",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lu_z"
|
||||
@ -315,8 +315,8 @@
|
||||
"when": {
|
||||
"west": "true",
|
||||
"east": "false",
|
||||
"down": "false",
|
||||
"up": "true"
|
||||
"up": "true",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ru_z"
|
||||
@ -326,8 +326,8 @@
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "true",
|
||||
"down": "true",
|
||||
"up": "false"
|
||||
"up": "false",
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ld_z"
|
||||
@ -337,8 +337,8 @@
|
||||
"when": {
|
||||
"west": "true",
|
||||
"east": "false",
|
||||
"down": "true",
|
||||
"up": "false"
|
||||
"up": "false",
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/rd_z"
|
||||
@ -348,8 +348,8 @@
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"down": "true",
|
||||
"up": "true"
|
||||
"up": "true",
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_z"
|
||||
@ -359,8 +359,8 @@
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"down": "false",
|
||||
"up": "true"
|
||||
"up": "true",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_z"
|
||||
@ -370,8 +370,8 @@
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"down": "true",
|
||||
"up": "false"
|
||||
"up": "false",
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_z"
|
||||
@ -381,8 +381,8 @@
|
||||
"when": {
|
||||
"west": "true",
|
||||
"east": "true",
|
||||
"down": "false",
|
||||
"up": "false"
|
||||
"up": "false",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_z"
|
||||
@ -392,8 +392,8 @@
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "true",
|
||||
"down": "false",
|
||||
"up": "false"
|
||||
"up": "false",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_z"
|
||||
@ -403,8 +403,8 @@
|
||||
"when": {
|
||||
"west": "true",
|
||||
"east": "false",
|
||||
"down": "false",
|
||||
"up": "false"
|
||||
"up": "false",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_z"
|
||||
@ -414,8 +414,8 @@
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"down": "false",
|
||||
"up": "false"
|
||||
"up": "false",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/none_z"
|
||||
|
@ -29,8 +29,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"sticky_south": "true",
|
||||
"axis": "x"
|
||||
"axis": "x",
|
||||
"sticky_south": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x_sticky",
|
||||
@ -39,8 +39,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"sticky_south": "true",
|
||||
"axis": "y"
|
||||
"axis": "y",
|
||||
"sticky_south": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_y_sticky"
|
||||
@ -48,8 +48,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"sticky_south": "true",
|
||||
"axis": "z"
|
||||
"axis": "z",
|
||||
"sticky_south": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x_sticky",
|
||||
@ -59,8 +59,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"sticky_south": "false",
|
||||
"axis": "x"
|
||||
"axis": "x",
|
||||
"sticky_south": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x",
|
||||
@ -69,8 +69,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"sticky_south": "false",
|
||||
"axis": "y"
|
||||
"axis": "y",
|
||||
"sticky_south": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_y"
|
||||
@ -78,8 +78,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"sticky_south": "false",
|
||||
"axis": "z"
|
||||
"axis": "z",
|
||||
"sticky_south": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x",
|
||||
@ -89,8 +89,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "x",
|
||||
"sticky_west": "true"
|
||||
"sticky_west": "true",
|
||||
"axis": "x"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x_sticky",
|
||||
@ -99,8 +99,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "y",
|
||||
"sticky_west": "true"
|
||||
"sticky_west": "true",
|
||||
"axis": "y"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_y_sticky",
|
||||
@ -109,8 +109,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "z",
|
||||
"sticky_west": "true"
|
||||
"sticky_west": "true",
|
||||
"axis": "z"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_z_sticky",
|
||||
@ -119,8 +119,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "x",
|
||||
"sticky_west": "false"
|
||||
"sticky_west": "false",
|
||||
"axis": "x"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x",
|
||||
@ -129,8 +129,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "y",
|
||||
"sticky_west": "false"
|
||||
"sticky_west": "false",
|
||||
"axis": "y"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_y",
|
||||
@ -139,8 +139,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "z",
|
||||
"sticky_west": "false"
|
||||
"sticky_west": "false",
|
||||
"axis": "z"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_z",
|
||||
|
@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.fluids;
|
||||
import com.simibubi.create.Create;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.fluid.IFluidState;
|
||||
import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.item.GlassBottleItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -42,7 +42,7 @@ public class FluidBottleItemHook extends Item {
|
||||
if (!world.isBlockModifiable(player, blockpos))
|
||||
return;
|
||||
|
||||
IFluidState fluidState = world.getFluidState(blockpos);
|
||||
FluidState fluidState = world.getFluidState(blockpos);
|
||||
if (fluidState.isTagged(FluidTags.WATER) && fluidState.getFluid()
|
||||
.getRegistryName()
|
||||
.getNamespace()
|
||||
|
@ -18,7 +18,7 @@ import net.minecraft.block.BlockState;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ILightReader;
|
||||
import net.minecraft.world.IBlockDisplayReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
@ -139,7 +139,7 @@ public abstract class FluidTransportBehaviour extends TileEntityBehaviour {
|
||||
if (interfaces == null)
|
||||
interfaces = new IdentityHashMap<>();
|
||||
for (Direction face : Iterate.directions)
|
||||
if (nbt.contains(face.getName()))
|
||||
if (nbt.contains(face.getName2()))
|
||||
interfaces.computeIfAbsent(face, d -> new PipeConnection(d));
|
||||
|
||||
// Invalid data (missing/outdated). Defer init to runtime
|
||||
@ -227,7 +227,7 @@ public abstract class FluidTransportBehaviour extends TileEntityBehaviour {
|
||||
interfaces.put(d, new PipeConnection(d));
|
||||
}
|
||||
|
||||
public AttachmentTypes getRenderedRimAttachment(ILightReader world, BlockPos pos, BlockState state,
|
||||
public AttachmentTypes getRenderedRimAttachment(IBlockDisplayReader world, BlockPos pos, BlockState state,
|
||||
Direction direction) {
|
||||
if (!canHaveFlowToward(state, direction))
|
||||
return AttachmentTypes.NONE;
|
||||
|
@ -20,7 +20,7 @@ import net.minecraft.particles.IParticleData;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
@ -206,7 +206,7 @@ public class PipeConnection {
|
||||
|
||||
public void serializeNBT(CompoundNBT tag, boolean clientPacket) {
|
||||
CompoundNBT connectionData = new CompoundNBT();
|
||||
tag.put(side.getName(), connectionData);
|
||||
tag.put(side.getName2(), connectionData);
|
||||
|
||||
if (hasPressure()) {
|
||||
ListNBT pressureData = new ListNBT();
|
||||
@ -235,7 +235,7 @@ public class PipeConnection {
|
||||
}
|
||||
|
||||
public void deserializeNBT(CompoundNBT tag, boolean clientPacket) {
|
||||
CompoundNBT connectionData = tag.getCompound(side.getName());
|
||||
CompoundNBT connectionData = tag.getCompound(side.getName2());
|
||||
|
||||
if (connectionData.contains("Pressure")) {
|
||||
ListNBT pressureData = connectionData.getList("Pressure", NBT.TAG_FLOAT);
|
||||
@ -391,7 +391,7 @@ public class PipeConnection {
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private void spawnPouringLiquid(World world, BlockPos pos, FluidStack fluid, int amount) {
|
||||
IParticleData particle = FluidFX.getFluidParticle(fluid);
|
||||
Vec3d directionVec = new Vec3d(side.getDirectionVec());
|
||||
Vector3d directionVec = Vector3d.of(side.getDirectionVec());
|
||||
if (!hasFlow())
|
||||
return;
|
||||
Flow flow = this.flow.get();
|
||||
@ -404,7 +404,7 @@ public class PipeConnection {
|
||||
.getRenderViewEntity();
|
||||
if (renderViewEntity == null)
|
||||
return false;
|
||||
Vec3d center = VecHelper.getCenterOf(pos);
|
||||
Vector3d center = VecHelper.getCenterOf(pos);
|
||||
if (renderViewEntity.getPositionVec()
|
||||
.distanceTo(center) > MAX_PARTICLE_RENDER_DISTANCE)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user