Better address these, Part II

- Fixed entities attempting to path-find through Creates' non-solids #1390
- Fixed Redstone Links occasionally wiping their frequency when moved in a Contraption
- Fixed Flywheels doubling their SU capacity after every chunk reload
- Fixed display of numeric formats using non-breaking space #1374
- Signs can now be moved on a contraption #1315
- Fixed Typo in german localization #1363
- Fixed Windmill Bearings keeping su information after relocation #1364
- Fixed Symmetry Wand using up too many items #1342
This commit is contained in:
simibubi 2021-04-10 18:23:42 +02:00
parent 9ee42c1824
commit 976be3470f
65 changed files with 367 additions and 131 deletions

View file

@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
# mod version info
mod_version=0.3.1a
mod_version=0.3.1b
minecraft_version=1.16.5
forge_version=36.0.42

View file

@ -408,7 +408,7 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
768a724d6c921cb92790364cf7a692fe8742a885 assets/create/lang/en_ud.json
3060ba1eee371d642e0590c3d6e99c2be397c7f5 assets/create/lang/en_us.json
e30cf096df194568cec732e36dea067efa28468a assets/create/lang/unfinished/de_de.json
e3b0bc11cc7b208d248ad339caeebf91aa51a5ef assets/create/lang/unfinished/de_de.json
3b3e7b694b75ab50acfe911935f80da0b3234010 assets/create/lang/unfinished/es_es.json
20d7a808b485b9140bce1c4c483c7fc2218a0611 assets/create/lang/unfinished/es_mx.json
1e9f530d590556eac0c4d08750d3ebbd83b504f2 assets/create/lang/unfinished/fr_fr.json
@ -1649,7 +1649,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear
a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json
b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json
e76041b7ae829fdd7dc0524f6ca4d2f89fca51bb assets/create/sounds.json
0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json
5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json
187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json
0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json
83c046bd200623933545c9e4326f782fb02c87fa data/create/advancements/arm_blaze_burner.json

View file

@ -57,7 +57,7 @@
"block.create.clutch": "Kupplung",
"block.create.cogwheel": "Zahnrad",
"block.create.content_observer": "Inhaltsbeobachter",
"block.create.controller_rail": "Steureungsschiene",
"block.create.controller_rail": "Steuerungsschiene",
"block.create.copper_block": "Kupfer Block",
"block.create.copper_casing": "Kupferrahmen",
"block.create.copper_ore": "Kupfererz",

View file

@ -28,8 +28,8 @@
"trigger": "create:bracket_apply",
"conditions": {
"accepted_entries": [
"create:cogwheel",
"create:large_cogwheel"
"create:large_cogwheel",
"create:cogwheel"
]
}
},

View file

@ -9,6 +9,8 @@ import static com.simibubi.create.foundation.data.CreateRegistrate.connectedText
import static com.simibubi.create.foundation.data.ModelGen.customItemModel;
import static com.simibubi.create.foundation.data.ModelGen.oxidizedItemModel;
import java.util.Vector;
import com.simibubi.create.AllTags.AllBlockTags;
import com.simibubi.create.AllTags.AllItemTags;
import com.simibubi.create.content.AllSections;
@ -600,22 +602,22 @@ public class AllBlocks {
.transform(BuilderTransformers.valveHandle(null))
.register();
public static final BlockEntry<ValveHandleBlock>[] DYED_VALVE_HANDLES = new BlockEntry[DyeColor.values().length];
public static final Vector<BlockEntry<ValveHandleBlock>> DYED_VALVE_HANDLES =
new Vector<>(DyeColor.values().length);
static {
for (DyeColor colour : DyeColor.values()) {
String colourName = colour.getString();
DYED_VALVE_HANDLES[colour.ordinal()] =
REGISTRATE.block(colourName + "_valve_handle", ValveHandleBlock::dyed)
.transform(BuilderTransformers.valveHandle(colour))
.recipe((c, p) -> ShapedRecipeBuilder.shapedRecipe(c.get())
.patternLine("#")
.patternLine("-")
.key('#', DyeHelper.getTagOfDye(colour))
.key('-', AllItemTags.VALVE_HANDLES.tag)
.addCriterion("has_valve", RegistrateRecipeProvider.hasItem(AllItemTags.VALVE_HANDLES.tag))
.build(p, Create.asResource("crafting/kinetics/" + c.getName() + "_from_other_valve_handle")))
.register();
DYED_VALVE_HANDLES.add(REGISTRATE.block(colourName + "_valve_handle", ValveHandleBlock::dyed)
.transform(BuilderTransformers.valveHandle(colour))
.recipe((c, p) -> ShapedRecipeBuilder.shapedRecipe(c.get())
.patternLine("#")
.patternLine("-")
.key('#', DyeHelper.getTagOfDye(colour))
.key('-', AllItemTags.VALVE_HANDLES.tag)
.addCriterion("has_valve", RegistrateRecipeProvider.hasItem(AllItemTags.VALVE_HANDLES.tag))
.build(p, Create.asResource("crafting/kinetics/" + c.getName() + "_from_other_valve_handle")))
.register());
}
}

View file

@ -154,6 +154,7 @@ import com.simibubi.create.content.schematics.block.SchematicannonInstance;
import com.simibubi.create.content.schematics.block.SchematicannonRenderer;
import com.simibubi.create.content.schematics.block.SchematicannonTileEntity;
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
import com.tterrag.registrate.util.entry.BlockEntry;
import com.tterrag.registrate.util.entry.TileEntityEntry;
public class AllTileEntities {
@ -245,7 +246,7 @@ public class AllTileEntities {
.tileEntity("hand_crank", HandCrankTileEntity::new)
.instance(() -> HandCrankInstance::new)
.validBlocks(AllBlocks.HAND_CRANK, AllBlocks.COPPER_VALVE_HANDLE)
.validBlocks(AllBlocks.DYED_VALVE_HANDLES)
.validBlocks(AllBlocks.DYED_VALVE_HANDLES.toArray(new BlockEntry<?>[AllBlocks.DYED_VALVE_HANDLES.size()]))
.renderer(() -> HandCrankRenderer::new)
.register();

View file

@ -55,7 +55,7 @@ public class Create {
public static final String ID = "create";
public static final String NAME = "Create";
public static final String VERSION = "0.3.1a";
public static final String VERSION = "0.3.1b";
public static Logger logger = LogManager.getLogger();
public static ItemGroup baseCreativeTab = new CreateItemGroup();

View file

@ -1,7 +1,6 @@
package com.simibubi.create.content.contraptions.base;
import com.simibubi.create.foundation.item.ItemDescription.Palette;
import com.simibubi.create.foundation.utility.Debug;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@ -11,7 +10,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;

View file

@ -12,6 +12,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.block.HorizontalBlock;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
@ -69,4 +70,9 @@ public abstract class AttachedActorBlock extends HorizontalBlock implements IWre
return getDefaultState().with(HORIZONTAL_FACING, facing);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -13,6 +13,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Direction;
@ -88,6 +89,11 @@ public class DrillBlock extends DirectionalKineticBlock implements ITE<DrillTile
public Class<DrillTileEntity> getTileEntityClass() {
return DrillTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
public static double getDamage(float speed) {
float speedAbs = Math.abs(speed);

View file

@ -21,4 +21,5 @@ public class HarvesterBlock extends AttachedActorBlock {
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new HarvesterTileEntity(AllTileEntities.HARVESTER.get());
}
}

View file

@ -21,6 +21,7 @@ import net.minecraft.item.DyeColor;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathNodeType;
import net.minecraft.pathfinding.PathType;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.NonNullList;
@ -143,4 +144,9 @@ public class SeatBlock extends Block {
entity.startRiding(seat, true);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -9,6 +9,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -75,5 +76,10 @@ public class CuckooClockBlock extends HorizontalKineticBlock {
public Axis getRotationAxis(BlockState state) {
return state.get(HORIZONTAL_FACING).getAxis();
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -12,6 +12,7 @@ import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
@ -116,5 +117,10 @@ public class HandCrankBlock extends DirectionalKineticBlock implements ITE<HandC
public Class<HandCrankTileEntity> getTileEntityClass() {
return HandCrankTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -48,7 +48,8 @@ public class ValveHandleBlock extends HandCrankBlock {
if (worldIn.isRemote)
return ActionResultType.SUCCESS;
BlockState newState = AllBlocks.DYED_VALVE_HANDLES[color.ordinal()].getDefaultState()
BlockState newState = AllBlocks.DYED_VALVE_HANDLES.get(color.ordinal())
.getDefaultState()
.with(FACING, state.get(FACING));
if (newState != state)
worldIn.setBlockState(pos, newState);

View file

@ -20,6 +20,7 @@ import net.minecraft.item.BlockItemUseContext;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.NBTUtil;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -201,5 +202,10 @@ public class CrushingWheelControllerBlock extends DirectionalBlock
public Class<CrushingWheelControllerTileEntity> getTileEntityClass() {
return CrushingWheelControllerTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -17,6 +17,7 @@ import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
@ -120,5 +121,10 @@ public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE<De
BlockPos p_220069_5_, boolean p_220069_6_) {
withTileEntityDo(world, pos, DeployerTileEntity::redstoneUpdate);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -54,7 +54,7 @@ public class EncasedFanTileEntity extends GeneratingKineticTileEntity implements
@Override
public float calculateAddedStressCapacity() {
return isGenerator ? super.calculateAddedStressCapacity() : 0;
return lastCapacityProvided = (isGenerator ? super.calculateAddedStressCapacity() : 0);
}
@Override

View file

@ -11,6 +11,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
@ -74,5 +75,10 @@ public class NozzleBlock extends ProperDirectionalBlock {
return te instanceof IAirCurrentSource
&& ((IAirCurrentSource) te).getAirflowOriginSide() == towardsFan.getOpposite();
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -45,7 +45,7 @@ public class FlywheelTileEntity extends GeneratingKineticTileEntity {
@Override
public float calculateAddedStressCapacity() {
return generatedCapacity;
return lastCapacityProvided = generatedCapacity;
}
@Override

View file

@ -13,6 +13,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
@ -141,5 +142,10 @@ public class MillstoneBlock extends KineticBlock implements ITE<MillstoneTileEnt
public Class<MillstoneTileEntity> getTileEntityClass() {
return MillstoneTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -9,6 +9,7 @@ import com.simibubi.create.foundation.block.ITE;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -71,5 +72,10 @@ public class MechanicalMixerBlock extends KineticBlock implements ITE<Mechanical
public Class<MechanicalMixerTileEntity> getTileEntityClass() {
return MechanicalMixerTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -6,6 +6,7 @@ import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -57,4 +58,10 @@ public class CreativeMotorBlock extends DirectionalKineticBlock {
public boolean hideStressImpact() {
return true;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -9,6 +9,7 @@ import com.simibubi.create.foundation.block.ITE;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -65,5 +66,10 @@ public class MechanicalPressBlock extends HorizontalKineticBlock implements ITE<
public Class<MechanicalPressTileEntity> getTileEntityClass() {
return MechanicalPressTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -17,6 +17,7 @@ import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Direction;
@ -120,5 +121,10 @@ public class SawBlock extends DirectionalAxisKineticBlock implements ITE<SawTile
public Class<SawTileEntity> getTileEntityClass() {
return SawTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -26,6 +26,7 @@ import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkBlock;
import net.minecraft.block.AbstractPressurePlateBlock;
import net.minecraft.block.AbstractRailBlock;
import net.minecraft.block.AbstractSignBlock;
import net.minecraft.block.BellBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@ -40,7 +41,9 @@ import net.minecraft.block.LadderBlock;
import net.minecraft.block.RedstoneDiodeBlock;
import net.minecraft.block.RedstoneWallTorchBlock;
import net.minecraft.block.RedstoneWireBlock;
import net.minecraft.block.StandingSignBlock;
import net.minecraft.block.TorchBlock;
import net.minecraft.block.WallSignBlock;
import net.minecraft.block.WallTorchBlock;
import net.minecraft.block.material.PushReaction;
import net.minecraft.state.properties.AttachFace;
@ -116,6 +119,8 @@ public class BlockMovementTraits {
return true;
if (block instanceof TorchBlock)
return true;
if (block instanceof AbstractSignBlock)
return true;
if (block instanceof AbstractPressurePlateBlock)
return true;
if (block instanceof HorizontalFaceBlock && !(block instanceof GrindstoneBlock))
@ -143,6 +148,10 @@ public class BlockMovementTraits {
return state.get(LadderBlock.FACING) == direction.getOpposite();
if (block instanceof WallTorchBlock)
return state.get(WallTorchBlock.HORIZONTAL_FACING) == direction.getOpposite();
if (block instanceof WallSignBlock)
return state.get(WallSignBlock.FACING) == direction.getOpposite();
if (block instanceof StandingSignBlock)
return direction == Direction.DOWN;
if (block instanceof AbstractPressurePlateBlock)
return direction == Direction.DOWN;
if (block instanceof DoorBlock)

View file

@ -75,6 +75,11 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity
@Override
protected void fromTag(BlockState state, CompoundNBT compound, boolean clientPacket) {
if (wasMoved) {
super.fromTag(state, compound, clientPacket);
return;
}
float angleBefore = angle;
running = compound.getBoolean("Running");
angle = compound.getFloat("Angle");

View file

@ -28,6 +28,7 @@ import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.DyeColor;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ShearsItem;
import net.minecraft.pathfinding.PathType;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
@ -195,6 +196,11 @@ public class SailBlock extends ProperDirectionalBlock {
}
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@MethodsReturnNonnullByDefault
private static class PlacementHelper implements IPlacementHelper {

View file

@ -27,7 +27,7 @@ public class WindmillBearingTileEntity extends MechanicalBearingTileEntity {
super.updateGeneratedRotation();
lastGeneratedSpeed = getGeneratedSpeed();
}
@Override
public void onSpeedChanged(float prevSpeed) {
boolean cancelAssembly = assembleNextTick;
@ -63,7 +63,8 @@ public class WindmillBearingTileEntity extends MechanicalBearingTileEntity {
@Override
protected void fromTag(BlockState state, CompoundNBT compound, boolean clientPacket) {
lastGeneratedSpeed = compound.getFloat("LastGenerated");
if (!wasMoved)
lastGeneratedSpeed = compound.getFloat("LastGenerated");
super.fromTag(state, compound, clientPacket);
}

View file

@ -42,6 +42,7 @@ import net.minecraft.item.ItemUseContext;
import net.minecraft.loot.LootContext;
import net.minecraft.loot.LootParameters;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.Property;
@ -137,54 +138,6 @@ public class CartAssemblerBlock extends AbstractRailBlock
return;
withTileEntityDo(world, pos, te -> {
/*
}
<<<<<<< HEAD
if (te.isMinecartUpdateValid()) {
switch (state.get(RAIL_TYPE)) {
case POWERED_RAIL:
if (state.get(POWERED)) {
assemble(world, pos, cart);
Direction facing = cart.getAdjustedHorizontalFacing();
float speed = getRailMaxSpeed(state, world, pos, cart);
cart.setMotion(facing.getXOffset() * speed, facing.getYOffset() * speed,
facing.getZOffset() * speed);
} else {
disassemble(world, pos, cart);
Vector3d diff = VecHelper.getCenterOf(pos)
.subtract(cart.getPositionVec());
cart.setMotion(diff.x / 16f, 0, diff.z / 16f);
}
break;
case REGULAR:
if (state.get(POWERED)) {
assemble(world, pos, cart);
} else {
disassemble(world, pos, cart);
}
break;
case ACTIVATOR_RAIL:
if (state.get(POWERED)) {
disassemble(world, pos, cart);
}
break;
case DETECTOR_RAIL:
if (cart.getPassengers()
.isEmpty()) {
assemble(world, pos, cart);
Direction facing = cart.getAdjustedHorizontalFacing();
float speed = getRailMaxSpeed(state, world, pos, cart);
cart.setMotion(facing.getXOffset() * speed, facing.getYOffset() * speed,
facing.getZOffset() * speed);
} else {
disassemble(world, pos, cart);
}
break;
default:
break;
}
te.resetTicksSinceMinecartUpdate();
=======*/
if (!te.isMinecartUpdateValid())
return;
@ -458,13 +411,6 @@ public class CartAssemblerBlock extends AbstractRailBlock
return PushReaction.BLOCK;
}
/* FIXME: Is there a 1.16 equivalent to be used? Or is this just removed?
@Override
public boolean isNormalCube(@Nonnull BlockState state, @Nonnull IBlockReader worldIn, @Nonnull BlockPos pos) {
return false;
}
*/
@Override
public Class<CartAssemblerTileEntity> getTileEntityClass() {
return CartAssemblerTileEntity.class;
@ -542,6 +488,11 @@ public class CartAssemblerBlock extends AbstractRailBlock
}
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@Override
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
World world = context.getWorld();

View file

@ -16,6 +16,7 @@ import net.minecraft.fluid.FluidState;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -111,4 +112,9 @@ public class MechanicalPistonHeadBlock extends ProperDirectionalBlock implements
FluidState FluidState = context.getWorld().getFluidState(context.getPos());
return super.getStateForPlacement(context).with(BlockStateProperties.WATERLOGGED, Boolean.valueOf(FluidState.getFluid() == Fluids.WATER));
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -26,6 +26,7 @@ import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItem;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.ActionResultType;
@ -146,6 +147,11 @@ public class PistonExtensionPoleBlock extends ProperDirectionalBlock implements
}
return state;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@MethodsReturnNonnullByDefault
public static class PlacementHelper extends PoleHelper<Direction> {

View file

@ -15,6 +15,7 @@ import net.minecraft.fluid.FluidState;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -97,6 +98,11 @@ public class PulleyBlock extends HorizontalAxisKineticBlock implements ITE<Pulle
super(properties);
setDefaultState(super.getDefaultState().with(BlockStateProperties.WATERLOGGED, false));
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@Override
public PushReaction getPushReaction(BlockState state) {

View file

@ -12,6 +12,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -106,5 +107,10 @@ public class TurntableBlock extends KineticBlock implements ITE<TurntableTileEnt
public Class<TurntableTileEntity> getTileEntityClass() {
return TurntableTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -17,6 +17,7 @@ import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext;
import net.minecraft.network.DebugPacketSender;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.TileEntity;
@ -173,4 +174,9 @@ public class PumpBlock extends DirectionalKineticBlock implements IWaterLoggable
world.removeTileEntity(pos);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -13,6 +13,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
@ -109,5 +110,10 @@ public class ItemDrainBlock extends Block implements IWrenchable, ITE<ItemDrainT
public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos) {
return ComparatorUtil.levelOfSmartFluidTank(worldIn, pos);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -7,6 +7,7 @@ import com.simibubi.create.foundation.tileEntity.ComparatorUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
@ -45,5 +46,10 @@ public class SpoutBlock extends Block implements IWrenchable {
public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos) {
return ComparatorUtil.levelOfSmartFluidTank(worldIn, pos);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -27,6 +27,7 @@ import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.network.DebugPacketSender;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.TileEntity;
@ -274,4 +275,10 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
return Optional.empty();
return Optional.of(new ItemStack(bracket.getBlock()));
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -13,6 +13,7 @@ import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.network.DebugPacketSender;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.tileentity.TileEntity;
@ -129,5 +130,10 @@ public class FluidValveBlock extends DirectionalAxisKineticBlock implements IAxi
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random r) {
FluidPropagator.propagateChangedPipe(world, pos, state);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -15,6 +15,7 @@ import net.minecraft.fluid.FluidState;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -82,4 +83,10 @@ public class GlassFluidPipeBlock extends AxisPipeBlock implements IWaterLoggable
public ItemRequirement getRequiredItems(BlockState state) {
return ItemRequirement.of(AllBlocks.FLUID_PIPE.getDefaultState());
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -13,6 +13,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.block.HorizontalFaceBlock;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.network.DebugPacketSender;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.AttachFace;
import net.minecraft.tileentity.TileEntity;
@ -152,5 +153,10 @@ public class SmartFluidPipeBlock extends HorizontalFaceBlock implements IAxisPip
public Axis getAxis(BlockState state) {
return getPipeAxis(state);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -33,7 +33,6 @@ import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.ITextProperties;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.Style;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;

View file

@ -38,7 +38,7 @@ public interface IHaveGoggleInformation {
static String format(double d) {
return numberFormat.get()
.format(d);
.format(d).replace("\u00A0", " ");
}
default boolean containedFluidTooltip(List<ITextComponent> tooltip, boolean isPlayerSneaking, LazyOptional<IFluidHandler> handler) {

View file

@ -23,6 +23,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.item.Items;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.DirectionProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -217,4 +218,9 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
return false;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -29,6 +29,7 @@ import net.minecraft.loot.LootPool;
import net.minecraft.loot.LootTable;
import net.minecraft.loot.conditions.BlockStateProperty;
import net.minecraft.loot.conditions.ILootCondition.IBuilder;
import net.minecraft.pathfinding.PathType;
import net.minecraft.loot.conditions.SurvivesExplosion;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.Property;
@ -255,4 +256,10 @@ public class BlazeBurnerBlock extends Block implements ITE<BlazeBurnerTileEntity
return this.ordinal() >= heatLevel.ordinal();
}
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -11,6 +11,7 @@ import net.minecraft.block.Blocks;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.pathfinding.PathType;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.SoundCategory;
@ -114,5 +115,10 @@ public class LitBlazeBurnerBlock extends Block {
return AllBlocks.BLAZE_BURNER.get()
.getCollisionShape(state, reader, pos, context);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -24,6 +24,7 @@ import net.minecraft.item.BlockItem;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.Property;
@ -269,6 +270,11 @@ public class GantryShaftBlock extends DirectionalKineticBlock {
public float getParticleInitialRadius() {
return .25f;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
public static class PlacementHelper extends PoleHelper<Direction> {

View file

@ -38,6 +38,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.loot.LootParameters;
import net.minecraft.pathfinding.PathNodeType;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.Property;
@ -597,5 +598,10 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
return rotate;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -17,6 +17,7 @@ import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.TileEntity;
@ -29,13 +30,14 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
public abstract class AbstractShaftBlock extends RotatedPillarKineticBlock implements IWaterLoggable, IWrenchableWithBracket {
public abstract class AbstractShaftBlock extends RotatedPillarKineticBlock
implements IWaterLoggable, IWrenchableWithBracket {
public AbstractShaftBlock(Properties properties) {
super(properties);
setDefaultState(super.getDefaultState().with(BlockStateProperties.WATERLOGGED, false));
}
@Override
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
return IWrenchableWithBracket.super.onWrenched(state, context);
@ -58,7 +60,7 @@ public abstract class AbstractShaftBlock extends RotatedPillarKineticBlock imple
removeBracket(world, pos, true).ifPresent(stack -> Block.spawnAsEntity(world, pos, stack));
super.onReplaced(state, world, pos, newState, isMoving);
}
// IRotate:
@Override
@ -112,4 +114,10 @@ public abstract class AbstractShaftBlock extends RotatedPillarKineticBlock imple
return Optional.empty();
return Optional.of(new ItemStack(bracket.getBlock()));
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -15,6 +15,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.particles.RedstoneParticleData;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -45,11 +46,11 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
public static GaugeBlock speed(Properties properties) {
return new GaugeBlock(properties, Type.SPEED);
}
public static GaugeBlock stress(Properties properties) {
return new GaugeBlock(properties, Type.STRESS);
}
protected GaugeBlock(Properties properties, Type type) {
super(properties);
this.type = type;
@ -67,18 +68,24 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
}
}
/* FIXME: Is there a new way of doing this in 1.16? Or cn we just delete it?
@SuppressWarnings("deprecation")
@Override
public MaterialColor getMaterialColor(BlockState state, IBlockReader worldIn, BlockPos pos) {
return Blocks.SPRUCE_PLANKS.getMaterialColor(state, worldIn, pos);
} */
/*
* FIXME: Is there a new way of doing this in 1.16? Or cn we just delete it?
*
* @SuppressWarnings("deprecation")
*
* @Override
* public MaterialColor getMaterialColor(BlockState state, IBlockReader worldIn, BlockPos pos) {
* return Blocks.SPRUCE_PLANKS.getMaterialColor(state, worldIn, pos);
* }
*/
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
World world = context.getWorld();
Direction face = context.getFace();
BlockPos placedOnPos = context.getPos().offset(context.getFace().getOpposite());
BlockPos placedOnPos = context.getPos()
.offset(context.getFace()
.getOpposite());
BlockState placedOnState = world.getBlockState(placedOnPos);
Block block = placedOnState.getBlock();
@ -88,17 +95,14 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
Direction nearestLookingDirection = context.getNearestLookingDirection();
boolean lookPositive = nearestLookingDirection.getAxisDirection() == AxisDirection.POSITIVE;
if (face.getAxis() == Axis.X) {
toPlace = toPlace
.with(FACING, lookPositive ? Direction.NORTH : Direction.SOUTH)
.with(AXIS_ALONG_FIRST_COORDINATE, true);
toPlace = toPlace.with(FACING, lookPositive ? Direction.NORTH : Direction.SOUTH)
.with(AXIS_ALONG_FIRST_COORDINATE, true);
} else if (face.getAxis() == Axis.Y) {
toPlace = toPlace
.with(FACING, horizontalFacing.getOpposite())
.with(AXIS_ALONG_FIRST_COORDINATE, horizontalFacing.getAxis() == Axis.X);
toPlace = toPlace.with(FACING, horizontalFacing.getOpposite())
.with(AXIS_ALONG_FIRST_COORDINATE, horizontalFacing.getAxis() == Axis.X);
} else {
toPlace = toPlace
.with(FACING, lookPositive ? Direction.WEST : Direction.EAST)
.with(AXIS_ALONG_FIRST_COORDINATE, false);
toPlace = toPlace.with(FACING, lookPositive ? Direction.WEST : Direction.EAST)
.with(AXIS_ALONG_FIRST_COORDINATE, false);
}
return toPlace;
@ -114,20 +118,22 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
@Override
protected boolean getAxisAlignmentForPlacement(BlockItemUseContext context) {
return context.getPlacementHorizontalFacing().getAxis() != Axis.X;
return context.getPlacementHorizontalFacing()
.getAxis() != Axis.X;
}
public boolean shouldRenderHeadOnFace(World world, BlockPos pos, BlockState state, Direction face) {
if (face.getAxis().isVertical())
if (face.getAxis()
.isVertical())
return false;
if (face == state.get(FACING).getOpposite())
if (face == state.get(FACING)
.getOpposite())
return false;
if (face.getAxis() == getRotationAxis(state))
return false;
if (getRotationAxis(state) == Axis.Y && face != state.get(FACING))
return false;
if (!Block.shouldSideBeRendered(state, world, pos, face)
&& !(world instanceof WrappedWorld))
if (!Block.shouldSideBeRendered(state, world, pos, face) && !(world instanceof WrappedWorld))
return false;
return true;
}
@ -156,15 +162,15 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
continue;
for (int i = 0; i < particleCount; i++) {
Vector3d mul = VecHelper
.offsetRandomly(Vector3d.ZERO, rand, .25f)
.mul(new Vector3d(1, 1, 1).subtract(positiveFaceVec))
.normalize()
.scale(.3f);
Vector3d offset = VecHelper.getCenterOf(pos).add(faceVec.scale(.55)).add(mul);
worldIn
.addParticle(new RedstoneParticleData((float) rgb.x, (float) rgb.y, (float) rgb.z, 1), offset.x,
offset.y, offset.z, mul.x, mul.y, mul.z);
Vector3d mul = VecHelper.offsetRandomly(Vector3d.ZERO, rand, .25f)
.mul(new Vector3d(1, 1, 1).subtract(positiveFaceVec))
.normalize()
.scale(.3f);
Vector3d offset = VecHelper.getCenterOf(pos)
.add(faceVec.scale(.55))
.add(mul);
worldIn.addParticle(new RedstoneParticleData((float) rgb.x, (float) rgb.y, (float) rgb.z, 1), offset.x,
offset.y, offset.z, mul.x, mul.y, mul.z);
}
}
@ -191,4 +197,8 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
return 0;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -20,6 +20,7 @@ import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.FluidState;
import net.minecraft.item.BlockItem;
@ -172,8 +173,8 @@ public class SymmetryWandItem extends Item {
public static boolean isEnabled(ItemStack stack) {
checkNBT(stack);
return stack.getTag()
.getBoolean(ENABLE);
CompoundNBT tag = stack.getTag();
return tag.getBoolean(ENABLE) && !tag.getBoolean("Simulate");
}
public static SymmetryMirror getMirror(ItemStack stack) {
@ -235,11 +236,16 @@ public class SymmetryWandItem extends Item {
FluidState ifluidstate = world.getFluidState(position);
world.setBlockState(position, ifluidstate.getBlockState(), BlockFlags.UPDATE_NEIGHBORS);
world.setBlockState(position, blockState);
if (ForgeEventFactory.onBlockPlace(player, blocksnapshot, Direction.UP)) {
CompoundNBT wandNbt = wand.getOrCreateTag();
wandNbt.putBoolean("Simulate", true);
boolean placeInterrupted = ForgeEventFactory.onBlockPlace(player, blocksnapshot, Direction.UP);
wandNbt.putBoolean("Simulate", false);
if (placeInterrupted) {
blocksnapshot.restore(true, false);
continue;
}
targets.add(position);
}
}
@ -286,7 +292,7 @@ public class SymmetryWandItem extends Item {
continue;
BlockState blockstate = world.getBlockState(position);
if (!blockstate.isAir(world, position)) {
if (blockstate.getMaterial() != Material.AIR) {
targets.add(position);
world.playEvent(2001, position, Block.getStateId(blockstate));
world.setBlockState(position, air, 3);

View file

@ -12,6 +12,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.DirectionProperty;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.Property;
@ -145,5 +146,10 @@ public class ChuteBlock extends AbstractChuteBlock {
return state.with(SHAPE, Shape.NORMAL);
return state.with(SHAPE, Shape.INTERSECTION);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -12,6 +12,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
@ -77,5 +78,10 @@ public class DepotBlock extends Block implements ITE<DepotTileEntity>, IWrenchab
public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos) {
return SharedDepotBlockMethods.getComparatorInputOverride(blockState, worldIn, pos);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -17,6 +17,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
@ -159,5 +160,10 @@ public class EjectorBlock extends HorizontalKineticBlock implements ITE<EjectorT
public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos) {
return SharedDepotBlockMethods.getComparatorInputOverride(blockState, worldIn, pos);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -15,6 +15,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.client.particle.ParticleManager;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -41,6 +42,11 @@ public abstract class AbstractFunnelBlock extends Block implements ITE<FunnelTil
return getDefaultState().with(POWERED, context.getWorld()
.isBlockPowered(context.getPos()));
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@Override
protected void fillStateContainer(Builder<Block, BlockState> builder) {

View file

@ -8,6 +8,7 @@ import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.util.Direction;
@ -33,6 +34,11 @@ public class CrateBlock extends ProperDirectionalBlock implements IWrenchable {
return AllShapes.CRATE_BLOCK_SHAPE;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@Override
public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn,
BlockPos currentPos, BlockPos facingPos) {

View file

@ -11,6 +11,7 @@ import net.minecraft.block.Blocks;
import net.minecraft.block.HorizontalFaceBlock;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.particles.RedstoneParticleData;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
@ -136,5 +137,10 @@ public class AnalogLeverBlock extends HorizontalFaceBlock implements ITE<AnalogL
public Class<AnalogLeverTileEntity> getTileEntityClass() {
return AnalogLeverTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -12,6 +12,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.tileentity.TileEntity;
@ -158,6 +159,11 @@ public class NixieTubeBlock extends HorizontalBlock implements ITE<NixieTubeTile
power = Math.max(worldIn.getRedstonePower(pos.offset(direction), Direction.UP), power);
return power;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@Override
public boolean canConnectRedstone(BlockState state, IBlockReader world, BlockPos pos, Direction side) {

View file

@ -11,6 +11,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -54,10 +55,12 @@ public class RedstoneLinkBlock extends ProperDirectionalBlock implements ITE<Red
@Override
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
if (state.getBlock() == oldState.getBlock() || isMoving)
return;
updateTransmittedSignal(state, worldIn, pos, state.get(FACING));
}
private void updateTransmittedSignal(BlockState state, World worldIn, BlockPos pos, Direction blockFacing) {
public void updateTransmittedSignal(BlockState state, World worldIn, BlockPos pos, Direction blockFacing) {
if (worldIn.isRemote)
return;
if (state.get(RECEIVER))
@ -183,6 +186,11 @@ public class RedstoneLinkBlock extends ProperDirectionalBlock implements ITE<Red
return AllShapes.REDSTONE_BRIDGE.get(state.get(FACING));
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@Override
public Class<RedstoneLinkTileEntity> getTileEntityClass() {
return RedstoneLinkTileEntity.class;

View file

@ -12,6 +12,7 @@ import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
@ -91,5 +92,10 @@ public class SchematicTableBlock extends HorizontalBlock implements ITE<Schemati
public Class<SchematicTableTileEntity> getTileEntityClass() {
return SchematicTableTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -6,7 +6,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -65,6 +64,10 @@ public class PonderRegistry {
public static MultiSceneBuilder forComponents(ItemProviderEntry<?>... components) {
return new MultiSceneBuilder(Arrays.asList(components));
}
public static MultiSceneBuilder forComponents(Iterable<? extends ItemProviderEntry<?>> components) {
return new MultiSceneBuilder(components);
}
public static List<PonderScene> compile(ResourceLocation id) {
return compile(all.get(id));
@ -136,9 +139,9 @@ public class PonderRegistry {
public static class MultiSceneBuilder {
private final Collection<ItemProviderEntry<?>> components;
private final Iterable<? extends ItemProviderEntry<?>> components;
MultiSceneBuilder(Collection<ItemProviderEntry<?>> components) {
MultiSceneBuilder(Iterable<? extends ItemProviderEntry<?>> components) {
this.components = components;
}

View file

@ -45,6 +45,7 @@ public class BeltScenes {
scene.title("belt_connector", "Using Mechanical Belts");
scene.configureBasePlate(0, 0, 5);
scene.showBasePlate();
scene.world.showSection(util.select.position(3, 0, 5), Direction.UP);
scene.idle(5);
scene.world.showSection(util.select.fromTo(4, 1, 3, 4, 1, 5), Direction.DOWN);

View file

@ -631,7 +631,7 @@ public class KineticsScenes {
scene.overlay.showControls(new InputWindowElement(centerOf, Pointing.DOWN).rightClick()
.withItem(new ItemStack(Items.BLUE_DYE)), 40);
scene.idle(7);
scene.world.modifyBlock(util.grid.at(2, 2, 2), s -> AllBlocks.DYED_VALVE_HANDLES[11].getDefaultState()
scene.world.modifyBlock(util.grid.at(2, 2, 2), s -> AllBlocks.DYED_VALVE_HANDLES.get(11).getDefaultState()
.with(ValveHandleBlock.FACING, Direction.UP), true);
scene.idle(10);
scene.overlay.showText(70)

View file

@ -22,6 +22,6 @@ Technology that empowers the player.'''
[[dependencies.create]]
modId="minecraft"
mandatory=true
versionRange="[1.16.3,1.17)"
versionRange="[1.16.4,1.17)"
ordering="NONE"
side="BOTH"

View file

@ -55,7 +55,7 @@
"block.create.clutch": "Kupplung",
"block.create.cogwheel": "Zahnrad",
"block.create.content_observer": "Inhaltsbeobachter",
"block.create.controller_rail": "Steureungsschiene",
"block.create.controller_rail": "Steuerungsschiene",
"block.create.copper_block": "Kupfer Block",
"block.create.copper_casing": "Kupferrahmen",
"block.create.copper_ore": "Kupfererz",