diff --git a/README.md b/README.md
new file mode 100644
index 000000000..b56e05f04
--- /dev/null
+++ b/README.md
@@ -0,0 +1,38 @@
+# Create
+Welcome to Create, a mod offering a variety of tools and blocks for Building, Decoration and Aesthetic Automation.
+
+The added elements of tech are designed to leave as many design choices to the player as possible, where item processing doesn't happen inside a single block with funny textures, it requires a set of actors working together in many possible arrangements.
+
+Check out the wiki and in-game Tool-tips for further info on how to use these features, and stay tuned for an ever-growing selection of possibilities for Creative and Survival Minecraft.
+
+## Links
+[](https://github.com/simibubi/Create/issues "Report Issues")
+[](https://www.youtube.com/playlist?list=PLyADkcfPLU8ywCXZPaDbQ_JZJL0CGDN5Z "Watch Videos")
+[](https://discord.gg/hmaD7Se "Feedback & Help")
+[](https://www.patreon.com/simibubi "Support Us")
+
+## Current Progress
+- Create 0.2.2 is coming soon with more bug-fixes. Thank you for testing Create with us!
+- Support for Minecraft 1.12: Not planned
+- Support for Minecraft 1.15: Porting work is in Progress!
+- Support for Fabric: Not planned
+
+## The Creators of Create
+- evanthebruce - Resident Nitwit
+- fuzzyweapon - Contributor
+- LeastReality - Artist
+- Zelophed - Developer
+- simibubi - Developer & Artist
+- tterrag - Developer & Port-Meister
+
+## Localization
+
+| Code | Version | Language | Author |
+|-------|---------|------------|--------------------------|
+| en_us | 0.2.2 | English US | |
+| de_de | 0.1 | German | Vexatos & Azratosh |
+| nl_nl | 0.1 | Dutch | Prusias |
+| fr_fr | 0.2.1 | French | Kiro |
+| zh_cn | 0.2.1 | Chinese | noptia & spider_stranger |
+| ru_ru | 0.1 | Russian | sirabein |
+| pt_br | 0.1 | Brazilian | lucassabreu |
diff --git a/build.gradle b/build.gradle
index 3365d3119..a8e1224f0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
-version = 'mc1.15.2_v0.2.2'
+version = 'mc1.15.2_v0.2.3'
group = 'com.simibubi.create'
archivesBaseName = 'create'
@@ -21,6 +21,7 @@ sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = co
minecraft {
mappings channel: 'snapshot', version: '20200301-mixed-1.15.2'
+ accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
client {
diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java
index 78829d452..9cb2e32ff 100644
--- a/src/main/java/com/simibubi/create/AllBlocks.java
+++ b/src/main/java/com/simibubi/create/AllBlocks.java
@@ -1,5 +1,8 @@
package com.simibubi.create;
+import java.util.HashSet;
+import java.util.Set;
+
import com.simibubi.create.foundation.block.IHaveColorHandler;
import com.simibubi.create.foundation.block.IHaveCustomBlockItem;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
@@ -45,7 +48,6 @@ import com.simibubi.create.modules.contraptions.redstone.ContactBlock;
import com.simibubi.create.modules.contraptions.relays.advanced.SpeedControllerBlock;
import com.simibubi.create.modules.contraptions.relays.advanced.sequencer.SequencedGearshiftBlock;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock;
-import com.simibubi.create.modules.contraptions.relays.belt.BeltTunnelBlock;
import com.simibubi.create.modules.contraptions.relays.elementary.CogWheelBlock;
import com.simibubi.create.modules.contraptions.relays.elementary.ShaftBlock;
import com.simibubi.create.modules.contraptions.relays.encased.AdjustablePulleyBlock;
@@ -62,14 +64,15 @@ import com.simibubi.create.modules.curiosities.symmetry.block.TriplePlaneSymmetr
import com.simibubi.create.modules.gardens.CocoaLogBlock;
import com.simibubi.create.modules.logistics.block.RedstoneLinkBlock;
import com.simibubi.create.modules.logistics.block.StockswitchBlock;
-import com.simibubi.create.modules.logistics.block.belts.BeltObserverBlock;
-import com.simibubi.create.modules.logistics.block.belts.FunnelBlock;
+import com.simibubi.create.modules.logistics.block.belts.observer.BeltObserverBlock;
+import com.simibubi.create.modules.logistics.block.belts.tunnel.BeltTunnelBlock;
import com.simibubi.create.modules.logistics.block.diodes.FlexpeaterBlock;
import com.simibubi.create.modules.logistics.block.diodes.LatchBlock;
import com.simibubi.create.modules.logistics.block.diodes.PulseRepeaterBlock;
import com.simibubi.create.modules.logistics.block.diodes.ToggleLatchBlock;
import com.simibubi.create.modules.logistics.block.extractor.ExtractorBlock;
import com.simibubi.create.modules.logistics.block.extractor.LinkedExtractorBlock;
+import com.simibubi.create.modules.logistics.block.funnel.FunnelBlock;
import com.simibubi.create.modules.logistics.block.inventories.FlexcrateBlock;
import com.simibubi.create.modules.logistics.block.transposer.LinkedTransposerBlock;
import com.simibubi.create.modules.logistics.block.transposer.TransposerBlock;
@@ -107,9 +110,6 @@ import net.minecraftforge.common.ToolType;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.registries.IForgeRegistry;
-import java.util.HashSet;
-import java.util.Set;
-
public enum AllBlocks {
__SCHEMATICS__(),
diff --git a/src/main/java/com/simibubi/create/AllContainers.java b/src/main/java/com/simibubi/create/AllContainers.java
index 03abb72ff..b2f971810 100644
--- a/src/main/java/com/simibubi/create/AllContainers.java
+++ b/src/main/java/com/simibubi/create/AllContainers.java
@@ -55,8 +55,6 @@ public enum AllContainers {
bind(SCHEMATIC_TABLE, SchematicTableScreen::new);
bind(SCHEMATICANNON, SchematicannonScreen::new);
bind(FLEXCRATE, FlexcrateScreen::new);
-// bind(LOGISTICAL_INDEX, LogisticalIndexScreen::new);
-// bind(LOGISTICAL_CONTROLLER, LogisticalInventoryControllerScreen::new);
bind(FILTER, FilterScreen::new);
bind(ATTRIBUTE_FILTER, AttributeFilterScreen::new);
}
diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java
index 9fd6909a4..268453faa 100644
--- a/src/main/java/com/simibubi/create/AllItems.java
+++ b/src/main/java/com/simibubi/create/AllItems.java
@@ -16,7 +16,7 @@ import com.simibubi.create.foundation.utility.data.ITaggable;
import com.simibubi.create.modules.IModule;
import com.simibubi.create.modules.contraptions.GogglesItem;
import com.simibubi.create.modules.contraptions.WrenchItem;
-import com.simibubi.create.modules.contraptions.relays.belt.BeltConnectorItem;
+import com.simibubi.create.modules.contraptions.relays.belt.item.BeltConnectorItem;
import com.simibubi.create.modules.contraptions.relays.gearbox.VerticalGearboxItem;
import com.simibubi.create.modules.curiosities.ChromaticCompoundCubeItem;
import com.simibubi.create.modules.curiosities.RefinedRadianceItem;
@@ -42,8 +42,8 @@ import net.minecraft.item.Item;
import net.minecraft.item.Item.Properties;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Rarity;
-import net.minecraft.util.ResourceLocation;
import net.minecraft.item.SwordItem;
+import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.event.RegistryEvent;
diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java
index c811447ae..325ba704d 100644
--- a/src/main/java/com/simibubi/create/AllTileEntities.java
+++ b/src/main/java/com/simibubi/create/AllTileEntities.java
@@ -56,8 +56,6 @@ import com.simibubi.create.modules.contraptions.relays.advanced.SpeedControllerT
import com.simibubi.create.modules.contraptions.relays.advanced.sequencer.SequencedGearshiftTileEntity;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntityRenderer;
-import com.simibubi.create.modules.contraptions.relays.belt.BeltTunnelTileEntity;
-import com.simibubi.create.modules.contraptions.relays.belt.BeltTunnelTileEntityRenderer;
import com.simibubi.create.modules.contraptions.relays.elementary.ShaftTileEntity;
import com.simibubi.create.modules.contraptions.relays.encased.AdjustablePulleyTileEntity;
import com.simibubi.create.modules.contraptions.relays.encased.ClutchTileEntity;
@@ -74,14 +72,16 @@ import com.simibubi.create.modules.contraptions.relays.gearbox.GearshiftTileEnti
import com.simibubi.create.modules.curiosities.partialWindows.WindowInABlockTileEntity;
import com.simibubi.create.modules.logistics.block.RedstoneLinkTileEntity;
import com.simibubi.create.modules.logistics.block.StockswitchTileEntity;
-import com.simibubi.create.modules.logistics.block.belts.BeltObserverTileEntity;
-import com.simibubi.create.modules.logistics.block.belts.BeltObserverTileEntityRenderer;
-import com.simibubi.create.modules.logistics.block.belts.FunnelTileEntity;
+import com.simibubi.create.modules.logistics.block.belts.observer.BeltObserverTileEntity;
+import com.simibubi.create.modules.logistics.block.belts.observer.BeltObserverTileEntityRenderer;
+import com.simibubi.create.modules.logistics.block.belts.tunnel.BeltTunnelTileEntity;
+import com.simibubi.create.modules.logistics.block.belts.tunnel.BeltTunnelTileEntityRenderer;
import com.simibubi.create.modules.logistics.block.diodes.FlexPulsepeaterTileEntity;
import com.simibubi.create.modules.logistics.block.diodes.FlexpeaterTileEntity;
import com.simibubi.create.modules.logistics.block.diodes.FlexpeaterTileEntityRenderer;
import com.simibubi.create.modules.logistics.block.extractor.ExtractorTileEntity;
import com.simibubi.create.modules.logistics.block.extractor.LinkedExtractorTileEntity;
+import com.simibubi.create.modules.logistics.block.funnel.FunnelTileEntity;
import com.simibubi.create.modules.logistics.block.inventories.FlexcrateTileEntity;
import com.simibubi.create.modules.logistics.block.transposer.LinkedTransposerTileEntity;
import com.simibubi.create.modules.logistics.block.transposer.TransposerTileEntity;
diff --git a/src/main/java/com/simibubi/create/ClientEvents.java b/src/main/java/com/simibubi/create/ClientEvents.java
index 514875425..bf352d7c2 100644
--- a/src/main/java/com/simibubi/create/ClientEvents.java
+++ b/src/main/java/com/simibubi/create/ClientEvents.java
@@ -14,7 +14,7 @@ import com.simibubi.create.modules.contraptions.KineticDebugger;
import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
import com.simibubi.create.modules.contraptions.components.contraptions.ChassisRangeDisplay;
import com.simibubi.create.modules.contraptions.components.turntable.TurntableHandler;
-import com.simibubi.create.modules.contraptions.relays.belt.BeltConnectorItemHandler;
+import com.simibubi.create.modules.contraptions.relays.belt.item.BeltConnectorHandler;
import com.simibubi.create.modules.curiosities.zapper.terrainzapper.TerrainZapperRenderHandler;
import net.minecraft.client.Minecraft;
@@ -65,7 +65,7 @@ public class ClientEvents {
public static void onGameTick() {
CreateClient.gameTick();
- BeltConnectorItemHandler.gameTick();
+ BeltConnectorHandler.gameTick();
TerrainZapperRenderHandler.tick();
}
diff --git a/src/main/java/com/simibubi/create/Events.java b/src/main/java/com/simibubi/create/Events.java
index 8ba99e87e..6b1b83884 100644
--- a/src/main/java/com/simibubi/create/Events.java
+++ b/src/main/java/com/simibubi/create/Events.java
@@ -1,27 +1,10 @@
package com.simibubi.create;
-import java.util.Arrays;
-
-import com.simibubi.create.config.AllConfigs;
-import com.simibubi.create.modules.curiosities.partialWindows.WindowInABlockTileEntity;
-
-import net.minecraft.block.BlockState;
-import net.minecraft.block.FourWayBlock;
-import net.minecraft.block.WallBlock;
-import net.minecraft.item.BlockItem;
-import net.minecraft.item.ItemStack;
-import net.minecraft.state.BooleanProperty;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
-import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
-import net.minecraftforge.common.Tags;
import net.minecraftforge.event.TickEvent.Phase;
import net.minecraftforge.event.TickEvent.ServerTickEvent;
-import net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock;
import net.minecraftforge.event.world.WorldEvent;
-import net.minecraftforge.eventbus.api.Event.Result;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
@@ -59,60 +42,4 @@ public class Events {
Create.torquePropagator.onUnloadWorld(world);
}
- @SubscribeEvent
- public static void onRightClickBlock(RightClickBlock event) {
- if (event.getUseItem() == Result.DENY)
- return;
- if (event.getEntityLiving().isSneaking())
- return;
- if (!event.getPlayer().isAllowEdit())
- return;
- if (!AllConfigs.SERVER.curiosities.allowGlassPanesInPartialBlocks.get())
- return;
-
- ItemStack stack = event.getItemStack();
- if (stack.isEmpty())
- return;
- if (!(stack.getItem() instanceof BlockItem))
- return;
- BlockItem item = (BlockItem) stack.getItem();
- if (!item.isIn(Tags.Items.GLASS_PANES)
- && (item.getBlock() == null || !item.getBlock().isIn(Tags.Blocks.GLASS_PANES)))
- return;
-
- BlockPos pos = event.getPos();
- World world = event.getWorld();
- BlockState blockState = world.getBlockState(pos);
- if (!AllBlockTags.WINDOWABLE.matches(blockState))
- return;
- if (AllBlocks.WINDOW_IN_A_BLOCK.typeOf(blockState))
- return;
-
- BlockState defaultState = AllBlocks.WINDOW_IN_A_BLOCK.get().getDefaultState();
- world.setBlockState(pos, defaultState);
- TileEntity te = world.getTileEntity(pos);
- if (te != null && te instanceof WindowInABlockTileEntity) {
- WindowInABlockTileEntity wte = (WindowInABlockTileEntity) te;
- wte.setWindowBlock(item.getBlock().getDefaultState());
- wte.updateWindowConnections();
-
- if (blockState.getBlock() instanceof FourWayBlock) {
- for (BooleanProperty side : Arrays.asList(FourWayBlock.EAST, FourWayBlock.NORTH, FourWayBlock.SOUTH,
- FourWayBlock.WEST))
- blockState = blockState.with(side, false);
- }
- if (blockState.getBlock() instanceof WallBlock)
- blockState = blockState.with(WallBlock.UP, true);
-
- wte.setPartialBlock(blockState);
- wte.requestModelDataUpdate();
-
- if (!event.getPlayer().isCreative())
- stack.shrink(1);
- event.getPlayer().swingArm(event.getHand());
- }
-
- event.setCanceled(true);
- }
-
}
diff --git a/src/main/java/com/simibubi/create/config/CCommon.java b/src/main/java/com/simibubi/create/config/CCommon.java
index 34d02f115..670a4ae5e 100644
--- a/src/main/java/com/simibubi/create/config/CCommon.java
+++ b/src/main/java/com/simibubi/create/config/CCommon.java
@@ -3,6 +3,7 @@ package com.simibubi.create.config;
public class CCommon extends ConfigBase {
public CWorldGen worldGen = nested(0, CWorldGen::new, Comments.worldGen);
+ public ConfigBool logTeErrors = b(false, "logTeErrors", Comments.logTeErrors);
@Override
public String getName() {
@@ -11,6 +12,7 @@ public class CCommon extends ConfigBase {
private static class Comments {
static String worldGen = "Modify Create's impact on your terrain";
+ static String logTeErrors = "Forward caught TileEntityExceptions to the log at debug level.";
}
}
diff --git a/src/main/java/com/simibubi/create/config/CCuriosities.java b/src/main/java/com/simibubi/create/config/CCuriosities.java
index a4d4ebea5..4b23a4f05 100644
--- a/src/main/java/com/simibubi/create/config/CCuriosities.java
+++ b/src/main/java/com/simibubi/create/config/CCuriosities.java
@@ -11,7 +11,6 @@ public class CCuriosities extends ConfigBase {
public ConfigBool enableRefinedRadianceRecipe = b(true, "enableRefinedRadianceRecipe",
Comments.refinedRadianceRecipe);
public ConfigBool enableShadowSteelRecipe = b(true, "enableShadowSteelRecipe", Comments.shadowSteelRecipe);
- public ConfigBool enableSandPaperToolPolishing = b(true, "enableSandPaperToolPolishing", Comments.sandPaperOnTools);
public ConfigFloat cocoaLogGrowthSpeed = f(20, 0, 100, "cocoaLogGrowthSpeed", Comments.cocoa);
@Override
@@ -24,7 +23,6 @@ public class CCuriosities extends ConfigBase {
static String refinedRadiance = "The amount of Light sources destroyed before Chromatic Compound turns into Refined Radiance.";
static String refinedRadianceRecipe = "Allow the standard Refined Radiance recipes.";
static String shadowSteelRecipe = "Allow the standard Shadow Steel recipe.";
- static String sandPaperOnTools = "Enable the tool repairing mechanic involving sand paper.";
static String windowsInBlocks = "Allow Glass Panes to be put inside Blocks like Stairs, Slabs, Fences etc.";
static String cocoa = "% of random Ticks causing a Cocoa log to grow.";
static String zapperUndoLogLength = "The maximum amount of operations, a blockzapper can remember for undoing. (0 to disable undo)";
diff --git a/src/main/java/com/simibubi/create/config/CWorldGen.java b/src/main/java/com/simibubi/create/config/CWorldGen.java
index b945ba94c..b0abf610f 100644
--- a/src/main/java/com/simibubi/create/config/CWorldGen.java
+++ b/src/main/java/com/simibubi/create/config/CWorldGen.java
@@ -28,7 +28,7 @@ public class CWorldGen extends ConfigBase {
@Override
public String getName() {
- return "world";
+ return "worldgen.v" + AllWorldFeatures.forcedUpdateVersion;
}
private static class Comments {
diff --git a/src/main/java/com/simibubi/create/foundation/block/ITE.java b/src/main/java/com/simibubi/create/foundation/block/ITE.java
new file mode 100644
index 000000000..ac09fc6d5
--- /dev/null
+++ b/src/main/java/com/simibubi/create/foundation/block/ITE.java
@@ -0,0 +1,100 @@
+package com.simibubi.create.foundation.block;
+
+import java.util.function.Consumer;
+
+import com.simibubi.create.Create;
+import com.simibubi.create.config.AllConfigs;
+
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.IBlockReader;
+import net.minecraft.world.IWorld;
+import net.minecraft.world.dimension.Dimension;
+import net.minecraft.world.dimension.DimensionType;
+
+public interface ITE {
+
+ Class getTileEntityClass();
+
+ default void withTileEntityDo(IBlockReader world, BlockPos pos, Consumer action) {
+ try {
+ action.accept(getTileEntity(world, pos));
+ } catch (TileEntityException e) {}
+ }
+
+ @SuppressWarnings("unchecked")
+ default T getTileEntity(IBlockReader worldIn, BlockPos pos) throws TileEntityException {
+ TileEntity tileEntity = worldIn.getTileEntity(pos);
+ Class expectedClass = getTileEntityClass();
+
+ IWorld world = null;
+ if (worldIn instanceof IWorld)
+ world = (IWorld) worldIn;
+
+ if (tileEntity == null)
+ throw new MissingTileEntityException(world, pos, expectedClass);
+ if (!expectedClass.isInstance(tileEntity))
+ throw new InvalidTileEntityException(world, pos, expectedClass, tileEntity.getClass());
+
+ return (T) tileEntity;
+ }
+
+ static class TileEntityException extends Throwable {
+ private static final long serialVersionUID = 1L;
+
+ public TileEntityException(IWorld world, BlockPos pos, Class> teClass) {
+ super(makeBaseMessage(world, pos, teClass));
+ }
+
+ public TileEntityException(String message) {
+ super(message);
+ report(this);
+ }
+
+ static String makeBaseMessage(IWorld world, BlockPos pos, Class> expectedTeClass) {
+ return String.format("[%s] @(%d, %d, %d), expecting a %s", getDimensionName(world), pos.getX(), pos.getY(),
+ pos.getZ(), expectedTeClass.getSimpleName());
+ }
+
+ static String getDimensionName(IWorld world) {
+ String notAvailable = "Dim N/A";
+ if (world == null)
+ return notAvailable;
+ Dimension dimension = world.getDimension();
+ if (dimension == null)
+ return notAvailable;
+ DimensionType type = dimension.getType();
+ if (type == null)
+ return notAvailable;
+ ResourceLocation registryName = type.getRegistryName();
+ if (registryName == null)
+ return notAvailable;
+ return registryName.toString();
+ }
+ }
+
+ static class MissingTileEntityException extends TileEntityException {
+ private static final long serialVersionUID = 1L;
+
+ public MissingTileEntityException(IWorld world, BlockPos pos, Class> teClass) {
+ super("Missing TileEntity: " + makeBaseMessage(world, pos, teClass));
+ }
+
+ }
+
+ static class InvalidTileEntityException extends TileEntityException {
+ private static final long serialVersionUID = 1L;
+
+ public InvalidTileEntityException(IWorld world, BlockPos pos, Class> expectedTeClass, Class> foundTeClass) {
+ super("Wrong TileEntity: " + makeBaseMessage(world, pos, expectedTeClass) + ", found "
+ + foundTeClass.getSimpleName());
+ }
+ }
+
+ static void report(TileEntityException e) {
+ if (AllConfigs.COMMON.logTeErrors.get())
+ Create.logger.debug("TileEntityException thrown!", e);
+ }
+
+}
diff --git a/src/main/java/com/simibubi/create/foundation/block/IWithContainerTileEntity.java b/src/main/java/com/simibubi/create/foundation/block/IWithContainerTileEntity.java
index 94ea67e9f..934576b16 100644
--- a/src/main/java/com/simibubi/create/foundation/block/IWithContainerTileEntity.java
+++ b/src/main/java/com/simibubi/create/foundation/block/IWithContainerTileEntity.java
@@ -7,13 +7,15 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
import net.minecraftforge.fml.network.NetworkHooks;
-public interface IWithContainerTileEntity> extends IWithTileEntity {
+public interface IWithContainerTileEntity> extends ITE {
default void open(IWorld world, BlockPos pos, PlayerEntity player) {
- T te = getTileEntity(world, pos);
- if (te == null || world.isRemote())
+ if (world.isRemote())
return;
- NetworkHooks.openGui((ServerPlayerEntity) player, te, te::sendToContainer);
+ try {
+ T te = getTileEntity(world, pos);
+ NetworkHooks.openGui((ServerPlayerEntity) player, te, te::sendToContainer);
+ } catch (TileEntityException e) {}
}
}
diff --git a/src/main/java/com/simibubi/create/foundation/block/IWithTileEntity.java b/src/main/java/com/simibubi/create/foundation/block/IWithTileEntity.java
deleted file mode 100644
index 3c6cda04c..000000000
--- a/src/main/java/com/simibubi/create/foundation/block/IWithTileEntity.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.simibubi.create.foundation.block;
-
-import java.util.function.Consumer;
-
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.IBlockReader;
-
-public interface IWithTileEntity {
-
- default void withTileEntityDo(IBlockReader world, BlockPos pos, Consumer action) {
- @SuppressWarnings("unchecked")
- T te = (T) world.getTileEntity(pos);
- if (te == null)
- return;
- action.accept(te);
- }
-
- default T getTileEntity(IBlockReader world, BlockPos pos) {
- @SuppressWarnings("unchecked")
- T te = (T) world.getTileEntity(pos);
- if (te == null)
- return null;
- return te;
- }
-
-}
diff --git a/src/main/java/com/simibubi/create/foundation/block/SyncedTileEntity.java b/src/main/java/com/simibubi/create/foundation/block/SyncedTileEntity.java
index 9f9eb3b8e..91b75489d 100644
--- a/src/main/java/com/simibubi/create/foundation/block/SyncedTileEntity.java
+++ b/src/main/java/com/simibubi/create/foundation/block/SyncedTileEntity.java
@@ -34,7 +34,7 @@ public abstract class SyncedTileEntity extends TileEntity {
public void causeBlockUpdate() {
world.notifyBlockUpdate(getPos(), getBlockState(), getBlockState(), 1);
}
-
+
@Override
public SUpdateTileEntityPacket getUpdatePacket() {
return new SUpdateTileEntityPacket(getPos(), 1, writeToClient(new CompoundNBT()));
diff --git a/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java b/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java
index 67a0b5bdc..799981d4c 100644
--- a/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java
+++ b/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java
@@ -9,6 +9,7 @@ import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour.
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
+import net.minecraft.block.PaneBlock;
import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
@@ -56,7 +57,7 @@ public class CTModel extends BakedModelWrapper {
CTData data = new CTData();
for (Direction face : Direction.values()) {
- if (!Block.shouldSideBeRendered(state, world, pos, face))
+ if (!Block.shouldSideBeRendered(state, world, pos, face) && !(state.getBlock() instanceof PaneBlock))
continue;
CTSpriteShiftEntry spriteShift = behaviour.get(state, face);
if (spriteShift == null)
@@ -86,9 +87,6 @@ public class CTModel extends BakedModelWrapper {
if (index == -1)
continue;
- float uShift = spriteShift.getUShift(index);
- float vShift = spriteShift.getVShift(index);
-
BakedQuad newQuad =
new BakedQuad(Arrays.copyOf(quad.getVertexData(), quad.getVertexData().length), quad.getTintIndex(),
quad.getFace(), quad.getSprite(), quad.shouldApplyDiffuseLighting());
@@ -101,10 +99,8 @@ public class CTModel extends BakedModelWrapper {
int vIndex = vertex + uvOffset + 1;
float u = Float.intBitsToFloat(vertexData[uIndex]);
float v = Float.intBitsToFloat(vertexData[vIndex]);
- u += uShift;
- v += vShift;
- vertexData[uIndex] = Float.floatToIntBits(u);
- vertexData[vIndex] = Float.floatToIntBits(v);
+ vertexData[uIndex] = Float.floatToRawIntBits(spriteShift.getTargetU(u, index));
+ vertexData[vIndex] = Float.floatToRawIntBits(spriteShift.getTargetV(v, index));
}
quads.set(i, newQuad);
}
diff --git a/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShiftEntry.java b/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShiftEntry.java
index b9a564137..7401bb472 100644
--- a/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShiftEntry.java
+++ b/src/main/java/com/simibubi/create/foundation/block/connected/CTSpriteShiftEntry.java
@@ -11,14 +11,16 @@ public abstract class CTSpriteShiftEntry extends SpriteShiftEntry {
this.textureSheetSize = sheetSize;
}
- public float getUShift(int index) {
- return getTarget().getInterpolatedU((index % textureSheetSize) * (16 / textureSheetSize))
- - getOriginal().getMinU();
+ public float getTargetU(float localU, int index) {
+ float uOffset = (index % textureSheetSize);
+ return getTarget().getInterpolatedU(
+ (getOriginal().getUnInterpolatedU(localU) + (uOffset * 16)) / ((float) textureSheetSize));
}
- public float getVShift(int index) {
- return getTarget().getInterpolatedV((index / textureSheetSize) * (16 / textureSheetSize))
- - getOriginal().getMinV();
+ public float getTargetV(float localV, int index) {
+ float vOffset = (index / textureSheetSize);
+ return getTarget().getInterpolatedV(
+ (getOriginal().getUnInterpolatedV(localV) + (vOffset * 16)) / ((float) textureSheetSize));
}
public abstract int getTextureIndex(CTContext context);
diff --git a/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java b/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java
index b75dcffc7..cec27ea45 100644
--- a/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java
+++ b/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java
@@ -12,15 +12,23 @@ import org.apache.commons.lang3.tuple.Pair;
import com.simibubi.create.config.AllConfigs;
+import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.NonNullList;
+import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
+import net.minecraft.world.World;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.ItemHandlerHelper;
public class ItemHelper {
+ public static void dropContents(World world, BlockPos pos, IItemHandler inv) {
+ for (int slot = 0; slot < inv.getSlots(); slot++)
+ InventoryHelper.spawnItemStack(world, pos.getX(), pos.getY(), pos.getZ(), inv.getStackInSlot(slot));
+ }
+
public static List multipliedOutput(ItemStack in, ItemStack out) {
List stacks = new ArrayList<>();
ItemStack result = out.copy();
@@ -64,7 +72,7 @@ public class ItemHelper {
int i = 0;
float f = 0.0F;
int totalSlots = inv.getSlots();
-
+
for (int j = 0; j < inv.getSlots(); ++j) {
int slotLimit = inv.getSlotLimit(j);
if (slotLimit == 0) {
@@ -80,7 +88,7 @@ public class ItemHelper {
if (totalSlots == 0)
return 0;
-
+
f = f / totalSlots;
return MathHelper.floor(f * 14.0F) + (i > 0 ? 1 : 0);
}
diff --git a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java
index 84c13ec57..d7afff84c 100644
--- a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java
+++ b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java
@@ -15,14 +15,16 @@ import com.simibubi.create.modules.IModule;
import com.simibubi.create.modules.contraptions.base.IRotate;
import com.simibubi.create.modules.contraptions.components.flywheel.engine.EngineBlock;
import com.simibubi.create.modules.curiosities.tools.AllToolTiers;
-
import com.simibubi.create.modules.curiosities.tools.SandPaperItem;
+
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.resources.I18n;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.BlockItem;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import net.minecraft.item.TieredItem;
import net.minecraft.util.text.TextFormatting;
public class TooltipHelper {
@@ -169,11 +171,11 @@ public class TooltipHelper {
}
public static String getTooltipTranslationKey(ItemStack stack) {
-
- if (stack.getItem() instanceof AbstractToolItem) {
- AbstractToolItem abstractToolItem = (AbstractToolItem) stack.getItem();
- if (abstractToolItem.getTier() instanceof AllToolTiers) {
- AllToolTiers allToolTiers = (AllToolTiers) abstractToolItem.getTier();
+ Item item = stack.getItem();
+ if (item instanceof TieredItem) {
+ TieredItem tieredItem = (TieredItem) stack.getItem();
+ if (tieredItem.getTier() instanceof AllToolTiers) {
+ AllToolTiers allToolTiers = (AllToolTiers) tieredItem.getTier();
return "tool.create." + Lang.asId(allToolTiers.name()) + ".tooltip";
}
}
diff --git a/src/main/java/com/simibubi/create/foundation/utility/Iterate.java b/src/main/java/com/simibubi/create/foundation/utility/Iterate.java
index f8d1ee966..da562aa42 100644
--- a/src/main/java/com/simibubi/create/foundation/utility/Iterate.java
+++ b/src/main/java/com/simibubi/create/foundation/utility/Iterate.java
@@ -1,7 +1,11 @@
package com.simibubi.create.foundation.utility;
+import java.util.Arrays;
+import java.util.List;
+
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
+import net.minecraft.util.math.BlockPos;
public class Iterate {
@@ -18,4 +22,9 @@ public class Iterate {
return directions;
}
+ public static List hereAndBelow(BlockPos pos) {
+ return Arrays.asList(pos, pos.down());
+ }
+
+
}
diff --git a/src/main/java/com/simibubi/create/foundation/utility/SuperByteBuffer.java b/src/main/java/com/simibubi/create/foundation/utility/SuperByteBuffer.java
index 183a4e242..7cb230390 100644
--- a/src/main/java/com/simibubi/create/foundation/utility/SuperByteBuffer.java
+++ b/src/main/java/com/simibubi/create/foundation/utility/SuperByteBuffer.java
@@ -6,13 +6,13 @@ import java.nio.ByteOrder;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.mojang.datafixers.util.Pair;
+import com.simibubi.create.foundation.block.render.SpriteShiftEntry;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.BufferBuilder.DrawState;
import net.minecraft.client.renderer.GLAllocation;
import net.minecraft.client.renderer.Matrix4f;
import net.minecraft.client.renderer.Vector4f;
-import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@@ -33,7 +33,9 @@ public class SuperByteBuffer {
// Vertex Texture Coords
private boolean shouldShiftUV;
- private float uShift, vShift;
+ private boolean resetUV;
+ private SpriteShiftEntry spriteShift;
+ private float uTarget, vTarget;
// Vertex Lighting
private boolean shouldLight;
@@ -44,6 +46,7 @@ public class SuperByteBuffer {
// Vertex Coloring
private boolean shouldColor;
private int r, g, b, a;
+ private float sheetSize;
public SuperByteBuffer(BufferBuilder buf) {
Pair state = buf.popData();
@@ -81,8 +84,18 @@ public class SuperByteBuffer {
putColor(mutable, vertex, (byte) r2, (byte) g2, (byte) b2, (byte) a);
}
- if (shouldShiftUV)
- putUV(mutable, vertex, getU(original, vertex) + uShift, getV(original, vertex) + vShift);
+ if (shouldShiftUV) {
+ float u = getU(original, vertex);
+ float v = getV(original, vertex);
+ float targetU = spriteShift.getTarget()
+ .getInterpolatedU((spriteShift.getOriginal().getUnInterpolatedU(u) / sheetSize) + uTarget * 16);
+ float targetV = spriteShift.getTarget()
+ .getInterpolatedV((spriteShift.getOriginal().getUnInterpolatedV(v) / sheetSize) + vTarget * 16);
+ putUV(mutable, vertex, targetU, targetV);
+ }
+
+ if (resetUV)
+ putUV(mutable, vertex, getU(original, vertex), getV(original, vertex));
if (shouldLight) {
if (vertexLighter != null)
@@ -141,24 +154,29 @@ public class SuperByteBuffer {
return translate(.5f, .5f, .5f).rotate(axis, radians).translate(-.5f, -.5f, -.5f);
}
- public SuperByteBuffer shiftUV(TextureAtlasSprite from, TextureAtlasSprite to) {
+ public SuperByteBuffer shiftUV(SpriteShiftEntry entry) {
shouldShiftUV = true;
- uShift = to.getMinU() - from.getMinU();
- vShift = to.getMinV() - from.getMinV();
+ resetUV = false;
+ spriteShift = entry;
+ uTarget = 0;
+ vTarget = 0;
+ sheetSize = 1;
return this;
}
- public SuperByteBuffer shiftUVtoSheet(TextureAtlasSprite from, TextureAtlasSprite to, int sheetX, int sheetY) {
+ public SuperByteBuffer shiftUVtoSheet(SpriteShiftEntry entry, float uTarget, float vTarget, int sheetSize) {
shouldShiftUV = true;
- uShift = to.getInterpolatedU(sheetX * 16f / to.getWidth()) - from.getMinU();
- vShift = to.getInterpolatedV(sheetY * 16f / to.getHeight()) - from.getMinV();
+ resetUV = false;
+ spriteShift = entry;
+ this.uTarget = uTarget;
+ this.vTarget = vTarget;
+ this.sheetSize = sheetSize;
return this;
}
public SuperByteBuffer dontShiftUV() {
shouldShiftUV = false;
- uShift = 0;
- vShift = 0;
+ resetUV = true;
return this;
}
diff --git a/src/main/java/com/simibubi/create/foundation/utility/data/AllBlocksTagProvider.java b/src/main/java/com/simibubi/create/foundation/utility/data/AllBlocksTagProvider.java
index 6d2a3550e..c9e38d726 100644
--- a/src/main/java/com/simibubi/create/foundation/utility/data/AllBlocksTagProvider.java
+++ b/src/main/java/com/simibubi/create/foundation/utility/data/AllBlocksTagProvider.java
@@ -1,6 +1,11 @@
package com.simibubi.create.foundation.utility.data;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
import com.simibubi.create.AllBlocks;
+
import net.minecraft.block.Block;
import net.minecraft.data.BlockTagsProvider;
import net.minecraft.data.DataGenerator;
@@ -8,10 +13,6 @@ import net.minecraft.tags.BlockTags;
import net.minecraft.tags.Tag;
import net.minecraft.util.ResourceLocation;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
public class AllBlocksTagProvider extends BlockTagsProvider {
static Map createdTags;
diff --git a/src/main/java/com/simibubi/create/foundation/world/AllWorldFeatures.java b/src/main/java/com/simibubi/create/foundation/world/AllWorldFeatures.java
index d0755af6f..d0de6732c 100644
--- a/src/main/java/com/simibubi/create/foundation/world/AllWorldFeatures.java
+++ b/src/main/java/com/simibubi/create/foundation/world/AllWorldFeatures.java
@@ -1,5 +1,8 @@
package com.simibubi.create.foundation.world;
+import static net.minecraft.world.biome.Biome.Category.DESERT;
+import static net.minecraft.world.biome.Biome.Category.OCEAN;
+
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@@ -9,19 +12,18 @@ import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.world.biome.Biome;
+import net.minecraft.world.biome.Biomes;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.registries.ForgeRegistries;
public enum AllWorldFeatures {
- COPPER_ORE(new CountedOreFeature(AllBlocks.COPPER_ORE.get(), 21, 1).between(40, 96)),
- COPPER_ORE_OCEAN(
- new CountedOreFeature(AllBlocks.COPPER_ORE.get(), 15, 4).between(20, 55).inBiomes(Biome.Category.OCEAN)),
+ COPPER_ORE(new CountedOreFeature(AllBlocks.COPPER_ORE.get(), 18, 2).between(40, 86)),
+ COPPER_ORE_OCEAN(new CountedOreFeature(AllBlocks.COPPER_ORE.get(), 15, 4).between(20, 55).inBiomes(OCEAN)),
- ZINC_ORE(new CountedOreFeature(AllBlocks.ZINC_ORE.get(), 8, 1).between(55, 80)),
- ZINC_ORE_DESERT(
- new CountedOreFeature(AllBlocks.ZINC_ORE.get(), 10, 5).between(50, 85).inBiomes(Biome.Category.DESERT)),
+ ZINC_ORE(new CountedOreFeature(AllBlocks.ZINC_ORE.get(), 14, 4).between(15, 70)),
+ ZINC_ORE_DESERT(new CountedOreFeature(AllBlocks.ZINC_ORE.get(), 17, 5).between(10, 85).inBiomes(DESERT)),
LIMESTONE(new ChanceOreFeature(AllBlocks.LIMESTONE.get(), 128, 1 / 32f).between(30, 70)),
WEATHERED_LIMESTONE(new ChanceOreFeature(AllBlocks.WEATHERED_LIMESTONE.get(), 128, 1 / 32f).between(10, 30)),
@@ -31,6 +33,13 @@ public enum AllWorldFeatures {
;
+ /**
+ * Increment this number if all worldgen entries should be overwritten in this
+ * update. Worlds from the previous version will overwrite potentially changed
+ * values with the new defaults.
+ */
+ public static final int forcedUpdateVersion = 1;
+
public IFeature feature;
private Map> featureInstances;
@@ -44,9 +53,13 @@ public enum AllWorldFeatures {
for (AllWorldFeatures entry : AllWorldFeatures.values()) {
for (Biome biome : ForgeRegistries.BIOMES) {
+ if (biome == Biomes.THE_VOID)
+ continue;
+ if (biome == Biomes.NETHER)
+ continue;
+
if (entry.featureInstances.containsKey(biome))
biome.getFeatures(entry.feature.getGenerationStage()).remove(entry.featureInstances.remove(biome));
-
Optional> createFeature = entry.feature.createFeature(biome);
if (!createFeature.isPresent())
continue;
@@ -55,7 +68,7 @@ public enum AllWorldFeatures {
biome.addFeature(entry.feature.getGenerationStage(), createFeature.get());
}
}
-
+
// // Debug contained ore features
// for (Biome biome : ForgeRegistries.BIOMES) {
// Debug.markTemporary();
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/IWrenchable.java b/src/main/java/com/simibubi/create/modules/contraptions/IWrenchable.java
index 986f7c183..667c32468 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/IWrenchable.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/IWrenchable.java
@@ -1,13 +1,70 @@
package com.simibubi.create.modules.contraptions;
+import com.simibubi.create.foundation.utility.VoxelShaper;
+import com.simibubi.create.modules.contraptions.base.DirectionalAxisKineticBlock;
+import com.simibubi.create.modules.contraptions.base.DirectionalKineticBlock;
+import com.simibubi.create.modules.contraptions.base.GeneratingKineticTileEntity;
+import com.simibubi.create.modules.contraptions.base.HorizontalAxisKineticBlock;
+import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock;
+import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
+import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock;
+
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemUseContext;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
+import net.minecraft.util.Direction;
+import net.minecraft.world.World;
public interface IWrenchable {
- public default ActionResultType onWrenched(BlockState state, ItemUseContext context) {
- return ActionResultType.PASS;
+ default ActionResultType onWrenched(BlockState state, ItemUseContext context) {
+ World world = context.getWorld();
+ BlockState rotated = getRotatedBlockState(state, context.getFace());
+ if (!rotated.isValidPosition(world, context.getPos()))
+ return ActionResultType.PASS;
+
+ KineticTileEntity.switchToBlockState(world, context.getPos(), updateAfterWrenched(rotated, context));
+
+ TileEntity te = context.getWorld().getTileEntity(context.getPos());
+ if (te instanceof GeneratingKineticTileEntity) {
+ ((GeneratingKineticTileEntity) te).updateGeneratedRotation();
+ }
+
+ return ActionResultType.SUCCESS;
+ }
+
+ default BlockState updateAfterWrenched(BlockState newState, ItemUseContext context) {
+ return newState;
+ }
+
+ static BlockState getRotatedBlockState(BlockState originalState, Direction targetedFace){
+ BlockState newState = originalState;
+
+ if (targetedFace.getAxis() == Direction.Axis.Y) {
+ if (originalState.has(HorizontalAxisKineticBlock.HORIZONTAL_AXIS))
+ return originalState.with(HorizontalAxisKineticBlock.HORIZONTAL_AXIS, VoxelShaper.axisAsFace(originalState.get(HorizontalAxisKineticBlock.HORIZONTAL_AXIS)).rotateAround(targetedFace.getAxis()).getAxis());
+ if (originalState.has(HorizontalKineticBlock.HORIZONTAL_FACING))
+ return originalState.with(HorizontalKineticBlock.HORIZONTAL_FACING, originalState.get(HorizontalKineticBlock.HORIZONTAL_FACING).rotateAround(targetedFace.getAxis()));
+ }
+
+ if (originalState.has(RotatedPillarKineticBlock.AXIS))
+ return originalState.with(RotatedPillarKineticBlock.AXIS, VoxelShaper.axisAsFace(originalState.get(RotatedPillarKineticBlock.AXIS)).rotateAround(targetedFace.getAxis()).getAxis());
+
+ if (!originalState.has(DirectionalKineticBlock.FACING)) return originalState;
+
+ Direction stateFacing = originalState.get(DirectionalKineticBlock.FACING);
+
+ if (stateFacing.getAxis().equals(targetedFace.getAxis())) {
+ if (originalState.has(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE)) return originalState.cycle(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE);
+ else return originalState;
+ } else {
+ do {
+ newState = newState.with(DirectionalKineticBlock.FACING, newState.get(DirectionalKineticBlock.FACING).rotateAround(targetedFace.getAxis()));
+ if (targetedFace.getAxis() == Direction.Axis.Y && newState.has(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE)) newState = newState.cycle(DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE);
+ } while (newState.get(DirectionalKineticBlock.FACING).getAxis().equals(targetedFace.getAxis()));
+ }
+ return newState;
}
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/KineticDebugger.java b/src/main/java/com/simibubi/create/modules/contraptions/KineticDebugger.java
index a8d98a300..ce2bcae3e 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/KineticDebugger.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/KineticDebugger.java
@@ -84,7 +84,7 @@ public class KineticDebugger {
BlockRayTraceResult ray = (BlockRayTraceResult) obj;
TileEntity te = world.getTileEntity(ray.getPos());
- if (te == null || !(te instanceof KineticTileEntity))
+ if (!(te instanceof KineticTileEntity))
return null;
return (KineticTileEntity) te;
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/KineticNetwork.java b/src/main/java/com/simibubi/create/modules/contraptions/KineticNetwork.java
index ef4d62a29..01b32ab0e 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/KineticNetwork.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/KineticNetwork.java
@@ -38,12 +38,12 @@ public class KineticNetwork {
return;
if (te.isSource()) {
unloadedCapacity -= lastCapacity * getStressMultiplierForSpeed(te.getGeneratedSpeed());
- float addedStressCapacity = te.getAddedStressCapacity();
+ float addedStressCapacity = te.calculateAddedStressCapacity();
sources.put(te, addedStressCapacity);
}
unloadedStress -= lastStress * getStressMultiplierForSpeed(te.getTheoreticalSpeed());
- float stressApplied = te.getStressApplied();
+ float stressApplied = te.calculateStressApplied();
members.put(te, stressApplied);
unloadedMembers--;
@@ -59,8 +59,8 @@ public class KineticNetwork {
if (members.containsKey(te))
return;
if (te.isSource())
- sources.put(te, te.getAddedStressCapacity());
- members.put(te, te.getStressApplied());
+ sources.put(te, te.calculateAddedStressCapacity());
+ members.put(te, te.calculateStressApplied());
te.updateFromNetwork(currentCapacity, currentStress, getSize());
te.networkDirty = true;
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java
index 96955de75..55f24ce90 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java
@@ -327,7 +327,10 @@ public class RotationPropagator {
while (!frontier.isEmpty()) {
final BlockPos pos = frontier.remove(0);
- final KineticTileEntity currentTE = (KineticTileEntity) world.getTileEntity(pos);
+ TileEntity tileEntity = world.getTileEntity(pos);
+ if (!(tileEntity instanceof KineticTileEntity))
+ continue;
+ final KineticTileEntity currentTE = (KineticTileEntity) tileEntity;
currentTE.removeSource();
currentTE.sendData();
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalAxisKineticBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalAxisKineticBlock.java
index 49b8c9b23..e46db4510 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalAxisKineticBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalAxisKineticBlock.java
@@ -3,10 +3,8 @@ package com.simibubi.create.modules.contraptions.base;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
-import net.minecraft.item.ItemUseContext;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
-import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.Rotation;
@@ -86,17 +84,6 @@ public abstract class DirectionalAxisKineticBlock extends DirectionalKineticBloc
return this.getDefaultState().with(FACING, facing).with(AXIS_ALONG_FIRST_COORDINATE, alongFirst);
}
- @Override
- public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
- World world = context.getWorld();
- Direction face = context.getFace();
- if ((turnBackOnWrenched() ? face.getOpposite() : face) == state.get(FACING)) {
- KineticTileEntity.switchToBlockState(world, context.getPos(), state.cycle(AXIS_ALONG_FIRST_COORDINATE));
- return ActionResultType.SUCCESS;
- }
- return super.onWrenched(state, context);
- }
-
@Override
public Axis getRotationAxis(BlockState state) {
Axis pistonAxis = state.get(FACING).getAxis();
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalKineticBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalKineticBlock.java
index bc30ed3a5..f6b1ed89d 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalKineticBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalKineticBlock.java
@@ -3,15 +3,12 @@ package com.simibubi.create.modules.contraptions.base;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
-import net.minecraft.item.ItemUseContext;
import net.minecraft.state.DirectionProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
-import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
-import net.minecraft.world.World;
public abstract class DirectionalKineticBlock extends KineticBlock {
@@ -45,24 +42,6 @@ public abstract class DirectionalKineticBlock extends KineticBlock {
return prefferedSide;
}
- @Override
- public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
- Direction facing = turnBackOnWrenched() ? context.getFace().getOpposite() : context.getFace();
- World world = context.getWorld();
- if (facing == state.get(FACING))
- return ActionResultType.PASS;
-
- BlockState with = state.with(FACING, facing);
- if (!with.isValidPosition(world, context.getPos()))
- return ActionResultType.PASS;
- KineticTileEntity.switchToBlockState(world, context.getPos(), with);
- return ActionResultType.SUCCESS;
- }
-
- protected boolean turnBackOnWrenched() {
- return false;
- }
-
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
Direction preferred = getPreferredFacing(context);
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/GeneratingKineticTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/base/GeneratingKineticTileEntity.java
index a2e776018..e83403818 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/base/GeneratingKineticTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/base/GeneratingKineticTileEntity.java
@@ -7,6 +7,7 @@ import com.simibubi.create.modules.contraptions.KineticNetwork;
import com.simibubi.create.modules.contraptions.base.IRotate.SpeedLevel;
import com.simibubi.create.modules.contraptions.goggle.IHaveGoggleInformation;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextFormatting;
@@ -33,7 +34,10 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity {
@Override
public void setSource(BlockPos source) {
super.setSource(source);
- KineticTileEntity sourceTe = (KineticTileEntity) world.getTileEntity(source);
+ TileEntity tileEntity = world.getTileEntity(source);
+ if (!(tileEntity instanceof KineticTileEntity))
+ return;
+ KineticTileEntity sourceTe = (KineticTileEntity) tileEntity;
if (reActivateSource && sourceTe != null && Math.abs(sourceTe.getSpeed()) >= Math.abs(getGeneratedSpeed()))
reActivateSource = false;
}
@@ -51,7 +55,7 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity {
public boolean addToGoggleTooltip(List tooltip, boolean isPlayerSneaking) {
boolean added = super.addToGoggleTooltip(tooltip, isPlayerSneaking);
- float stressBase = getAddedStressCapacity();
+ float stressBase = calculateAddedStressCapacity();
if (stressBase != 0 && IRotate.StressImpact.isEnabled()) {
tooltip.add(spacing + Lang.translate("gui.goggles.generator_stats"));
tooltip.add(spacing + TextFormatting.GRAY + Lang.translate("tooltip.capacityProvided"));
@@ -93,8 +97,8 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity {
if (hasNetwork() && speed != 0) {
KineticNetwork network = getOrCreateNetwork();
- notifyStressCapacityChange(getAddedStressCapacity());
- getOrCreateNetwork().updateStressFor(this, getStressApplied());
+ notifyStressCapacityChange(calculateAddedStressCapacity());
+ getOrCreateNetwork().updateStressFor(this, calculateStressApplied());
network.updateStress();
}
@@ -108,7 +112,7 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity {
if (speed == 0) {
if (hasSource()) {
notifyStressCapacityChange(0);
- getOrCreateNetwork().updateStressFor(this, getStressApplied());
+ getOrCreateNetwork().updateStressFor(this, calculateStressApplied());
return;
}
detachKinetics();
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalAxisKineticBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalAxisKineticBlock.java
index f23f2819f..ed522e416 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalAxisKineticBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalAxisKineticBlock.java
@@ -3,11 +3,9 @@ package com.simibubi.create.modules.contraptions.base;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
-import net.minecraft.item.ItemUseContext;
import net.minecraft.state.IProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
-import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.Direction.AxisDirection;
@@ -15,7 +13,6 @@ import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorldReader;
-import net.minecraft.world.World;
public abstract class HorizontalAxisKineticBlock extends KineticBlock {
@@ -69,18 +66,6 @@ public abstract class HorizontalAxisKineticBlock extends KineticBlock {
return face.getAxis() == state.get(HORIZONTAL_AXIS);
}
- @Override
- public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
- Direction facing = context.getFace();
- if (facing.getAxis().isVertical())
- return ActionResultType.PASS;
- World world = context.getWorld();
- if (facing.getAxis() == state.get(HORIZONTAL_AXIS))
- return ActionResultType.PASS;
- KineticTileEntity.switchToBlockState(world, context.getPos(), state.cycle(HORIZONTAL_AXIS));
- return ActionResultType.SUCCESS;
- }
-
@Override
public BlockState rotate(BlockState state, Rotation rot) {
Axis axis = state.get(HORIZONTAL_AXIS);
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalKineticBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalKineticBlock.java
index fbe62e2f5..2fbc3a639 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalKineticBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalKineticBlock.java
@@ -3,15 +3,12 @@ package com.simibubi.create.modules.contraptions.base;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
-import net.minecraft.item.ItemUseContext;
import net.minecraft.state.IProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
-import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
-import net.minecraft.world.World;
public abstract class HorizontalKineticBlock extends KineticBlock {
@@ -52,18 +49,6 @@ public abstract class HorizontalKineticBlock extends KineticBlock {
return prefferedSide;
}
- @Override
- public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
- Direction facing = context.getFace();
- if (facing.getAxis().isVertical())
- return ActionResultType.PASS;
- World world = context.getWorld();
- if (facing == state.get(HORIZONTAL_FACING))
- return ActionResultType.PASS;
- KineticTileEntity.switchToBlockState(world, context.getPos(), state.with(HORIZONTAL_FACING, facing));
- return ActionResultType.SUCCESS;
- }
-
@Override
public BlockState rotate(BlockState state, Rotation rot) {
return state.with(HORIZONTAL_FACING, rot.rotate(state.get(HORIZONTAL_FACING)));
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java
index 1de9a9e9c..0b5932aae 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java
@@ -72,30 +72,19 @@ public abstract class KineticBlock extends Block implements IRotate {
@Override
public abstract TileEntity createTileEntity(BlockState state, IBlockReader world);
- @Override
- public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
- if (isMoving) {
- KineticTileEntity tileEntity = (KineticTileEntity) worldIn.getTileEntity(pos);
- if (tileEntity == null)
- return;
- if (worldIn.isRemote())
- return;
- tileEntity.network = null;
- tileEntity.source = null;
- tileEntity.speed = 0;
- }
- }
-
@SuppressWarnings("deprecation")
@Override
public void updateNeighbors(BlockState stateIn, IWorld worldIn, BlockPos pos, int flags) {
super.updateNeighbors(stateIn, worldIn, pos, flags);
- KineticTileEntity tileEntity = (KineticTileEntity) worldIn.getTileEntity(pos);
- if (tileEntity == null)
- return;
if (worldIn.isRemote())
return;
- RotationPropagator.handleAdded(worldIn.getWorld(), pos, tileEntity);
+
+ TileEntity tileEntity = worldIn.getTileEntity(pos);
+ if (!(tileEntity instanceof KineticTileEntity))
+ return;
+
+ KineticTileEntity kte = (KineticTileEntity) tileEntity;
+ RotationPropagator.handleAdded(worldIn.getWorld(), pos, kte);
}
// @Override // TODO 1.15 register layer
@@ -107,12 +96,13 @@ public abstract class KineticBlock extends Block implements IRotate {
@Override
public void onBlockPlacedBy(World worldIn, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) {
- TileEntity tileEntity = worldIn.getTileEntity(pos);
- if (tileEntity == null || !(tileEntity instanceof KineticTileEntity))
- return;
if (worldIn.isRemote)
return;
+ TileEntity tileEntity = worldIn.getTileEntity(pos);
+ if (!(tileEntity instanceof KineticTileEntity))
+ return;
+
KineticTileEntity kte = (KineticTileEntity) tileEntity;
kte.effects.queueRotationIndicators();
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/KineticTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/base/KineticTileEntity.java
index 3f4f88cef..de3df92b2 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/base/KineticTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/base/KineticTileEntity.java
@@ -104,7 +104,9 @@ public abstract class KineticTileEntity extends SmartTileEntity
if (!world.isBlockPresent(source))
return;
- KineticTileEntity sourceTe = (KineticTileEntity) world.getTileEntity(source);
+ TileEntity tileEntity = world.getTileEntity(source);
+ KineticTileEntity sourceTe =
+ tileEntity instanceof KineticTileEntity ? (KineticTileEntity) tileEntity : null;
if (sourceTe == null || sourceTe.speed == 0) {
removeSource();
detachKinetics();
@@ -137,20 +139,22 @@ public abstract class KineticTileEntity extends SmartTileEntity
}
}
- public float getAddedStressCapacity() {
+ public float calculateAddedStressCapacity() {
Map> capacityMap = AllConfigs.SERVER.kinetics.stressValues.capacities;
ResourceLocation path = getBlockState().getBlock().getRegistryName();
- if (!capacityMap.containsKey(path))
- return 0;
- return capacityMap.get(path).get().floatValue();
+
+ float capacity = capacityMap.containsKey(path) ? capacityMap.get(path).get().floatValue() : 0;
+ this.lastCapacityProvided = capacity;
+ return capacity;
}
- public float getStressApplied() {
+ public float calculateStressApplied() {
Map> stressEntries = AllConfigs.SERVER.kinetics.stressValues.impacts;
ResourceLocation path = getBlockState().getBlock().getRegistryName();
- if (!stressEntries.containsKey(path))
- return 1;
- return stressEntries.get(path).get().floatValue();
+
+ float impact = stressEntries.containsKey(path) ? stressEntries.get(path).get().floatValue() : 1;
+ this.lastStressApplied = impact;
+ return impact;
}
public void onSpeedChanged(float previousSpeed) {
@@ -184,13 +188,11 @@ public abstract class KineticTileEntity extends SmartTileEntity
networkTag.putFloat("Stress", stress);
networkTag.putFloat("Capacity", capacity);
networkTag.putInt("Size", networkSize);
-
- float stressApplied = getStressApplied();
- float addedStressCapacity = getAddedStressCapacity();
- if (stressApplied != 0)
- networkTag.putFloat("AddedStress", stressApplied);
- if (addedStressCapacity != 0)
- networkTag.putFloat("AddedCapacity", addedStressCapacity);
+
+ if (lastStressApplied != 0)
+ networkTag.putFloat("AddedStress", lastStressApplied);
+ if (lastCapacityProvided != 0)
+ networkTag.putFloat("AddedCapacity", lastCapacityProvided);
compound.put("Network", networkTag);
}
@@ -201,7 +203,6 @@ public abstract class KineticTileEntity extends SmartTileEntity
@Override
public void read(CompoundNBT compound) {
speed = compound.getFloat("Speed");
-
source = null;
network = null;
overStressed = false;
@@ -266,12 +267,13 @@ public abstract class KineticTileEntity extends SmartTileEntity
if (world == null || world.isRemote)
return;
- KineticTileEntity sourceTe = (KineticTileEntity) world.getTileEntity(source);
- if (sourceTe == null) {
+ TileEntity tileEntity = world.getTileEntity(source);
+ if (!(tileEntity instanceof KineticTileEntity)) {
removeSource();
return;
}
+ KineticTileEntity sourceTe = (KineticTileEntity) tileEntity;
setNetwork(sourceTe.network);
}
@@ -336,9 +338,11 @@ public abstract class KineticTileEntity extends SmartTileEntity
public static void switchToBlockState(World world, BlockPos pos, BlockState state) {
if (world.isRemote)
return;
+
TileEntity tileEntityIn = world.getTileEntity(pos);
if (!(tileEntityIn instanceof KineticTileEntity))
return;
+
KineticTileEntity tileEntity = (KineticTileEntity) tileEntityIn;
if (tileEntity.hasNetwork())
tileEntity.getOrCreateNetwork().remove(tileEntity);
@@ -387,9 +391,9 @@ public abstract class KineticTileEntity extends SmartTileEntity
@Override
public boolean addToGoggleTooltip(List tooltip, boolean isPlayerSneaking) {
boolean added = false;
- float stressAtBase = getStressApplied();
+ float stressAtBase = calculateStressApplied();
- if (getStressApplied() != 0 && StressImpact.isEnabled()) {
+ if (calculateStressApplied() != 0 && StressImpact.isEnabled()) {
tooltip.add(spacing + Lang.translate("gui.goggles.kinetic_stats"));
tooltip.add(spacing + TextFormatting.GRAY + Lang.translate("tooltip.stressImpact"));
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/RotatedPillarKineticBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/base/RotatedPillarKineticBlock.java
index 7a22577f8..ec0a94300 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/base/RotatedPillarKineticBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/base/RotatedPillarKineticBlock.java
@@ -3,15 +3,12 @@ package com.simibubi.create.modules.contraptions.base;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
-import net.minecraft.item.ItemUseContext;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
-import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.Rotation;
-import net.minecraft.world.World;
public abstract class RotatedPillarKineticBlock extends KineticBlock {
@@ -72,14 +69,4 @@ public abstract class RotatedPillarKineticBlock extends KineticBlock {
: context.getNearestLookingDirection().getAxis());
}
- @Override
- public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
- Axis axis = context.getFace().getAxis();
- World world = context.getWorld();
- if (axis == state.get(AXIS))
- return ActionResultType.PASS;
- KineticTileEntity.switchToBlockState(world, context.getPos(), state.with(AXIS, axis));
- return ActionResultType.SUCCESS;
- }
-
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/actors/BlockBreakingMovementBehaviour.java b/src/main/java/com/simibubi/create/modules/contraptions/components/actors/BlockBreakingMovementBehaviour.java
index 55702ab9e..c7c2ef8af 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/actors/BlockBreakingMovementBehaviour.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/actors/BlockBreakingMovementBehaviour.java
@@ -1,12 +1,14 @@
package com.simibubi.create.modules.contraptions.components.actors;
import com.simibubi.create.foundation.utility.BlockHelper;
+import com.simibubi.create.modules.contraptions.components.contraptions.ContraptionEntity;
import com.simibubi.create.modules.contraptions.components.contraptions.MovementBehaviour;
import com.simibubi.create.modules.contraptions.components.contraptions.MovementContext;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
+import net.minecraft.entity.item.minecart.AbstractMinecartEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.NBTUtil;
import net.minecraft.util.DamageSource;
@@ -37,8 +39,17 @@ public class BlockBreakingMovementBehaviour extends MovementBehaviour {
if (damageSource == null)
return;
for (Entity entity : world.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(pos))) {
+
if (entity instanceof ItemEntity)
return;
+ if (entity instanceof ContraptionEntity)
+ return;
+ if (entity instanceof AbstractMinecartEntity)
+ for (Entity passenger : entity.getRecursivePassengers())
+ if (passenger instanceof ContraptionEntity
+ && ((ContraptionEntity) passenger).getContraption() == context.contraption)
+ return;
+
float damage = (float) MathHelper.clamp(Math.abs(context.relativeMotion.length() * 10) + 1, 5, 20);
entity.attackEntityFrom(damageSource, damage);
entity.setMotion(entity.getMotion().add(context.relativeMotion.scale(3)));
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/actors/DrillBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/actors/DrillBlock.java
index b63e98d2e..8f9c7b421 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/actors/DrillBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/actors/DrillBlock.java
@@ -1,6 +1,6 @@
package com.simibubi.create.modules.contraptions.components.actors;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.contraptions.base.DirectionalKineticBlock;
import com.simibubi.create.modules.contraptions.components.contraptions.IPortableBlock;
@@ -25,7 +25,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
-public class DrillBlock extends DirectionalKineticBlock implements IPortableBlock, IWithTileEntity {
+public class DrillBlock extends DirectionalKineticBlock implements IPortableBlock, ITE {
public static MovementBehaviour MOVEMENT = new DrillMovementBehaviour();
public static DamageSource damageSourceDrill = new DamageSource("create.drill").setDamageBypassesArmor();
@@ -93,4 +93,9 @@ public class DrillBlock extends DirectionalKineticBlock implements IPortableBloc
return MOVEMENT;
}
+ @Override
+ public Class getTileEntityClass() {
+ return DrillTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/actors/StorageInterfaceMovement.java b/src/main/java/com/simibubi/create/modules/contraptions/components/actors/StorageInterfaceMovement.java
index 45815f0a2..d647423c1 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/actors/StorageInterfaceMovement.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/actors/StorageInterfaceMovement.java
@@ -102,8 +102,8 @@ public class StorageInterfaceMovement extends MovementBehaviour {
extracting.withAmountThreshold(stack -> {
ItemStack tester = stack.copy();
- tester.setCount(64);
- return 64 - ItemHandlerHelper.insertItemStacked(inv, stack, true).getCount();
+ tester.setCount(tester.getMaxStackSize());
+ return stack.getCount() - ItemHandlerHelper.insertItemStacked(inv, stack, true).getCount();
});
extracting.setCallback(stack -> {
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/BlockMovementTraits.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/BlockMovementTraits.java
index 573e4b63d..844833d8c 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/BlockMovementTraits.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/BlockMovementTraits.java
@@ -3,10 +3,19 @@ package com.simibubi.create.modules.contraptions.components.contraptions;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.modules.contraptions.components.actors.HarvesterBlock;
import com.simibubi.create.modules.contraptions.components.actors.PortableStorageInterfaceBlock;
+import com.simibubi.create.modules.contraptions.components.contraptions.bearing.ClockworkBearingBlock;
+import com.simibubi.create.modules.contraptions.components.contraptions.bearing.ClockworkBearingTileEntity;
+import com.simibubi.create.modules.contraptions.components.contraptions.bearing.MechanicalBearingBlock;
+import com.simibubi.create.modules.contraptions.components.contraptions.bearing.MechanicalBearingTileEntity;
import com.simibubi.create.modules.contraptions.components.contraptions.chassis.AbstractChassisBlock;
-import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock;
-import com.simibubi.create.modules.logistics.block.belts.FunnelBlock;
+import com.simibubi.create.modules.contraptions.components.contraptions.piston.MechanicalPistonBlock;
+import com.simibubi.create.modules.contraptions.components.contraptions.piston.MechanicalPistonBlock.PistonState;
+import com.simibubi.create.modules.contraptions.components.contraptions.pulley.PulleyBlock;
+import com.simibubi.create.modules.contraptions.components.contraptions.pulley.PulleyTileEntity;
+import com.simibubi.create.modules.logistics.block.AttachedLogisticalBlock;
+import com.simibubi.create.modules.logistics.block.RedstoneLinkBlock;
import com.simibubi.create.modules.logistics.block.extractor.ExtractorBlock;
+import com.simibubi.create.modules.logistics.block.funnel.FunnelBlock;
import com.simibubi.create.modules.logistics.block.transposer.TransposerBlock;
import net.minecraft.block.AbstractPressurePlateBlock;
@@ -27,6 +36,7 @@ import net.minecraft.block.WallTorchBlock;
import net.minecraft.block.material.PushReaction;
import net.minecraft.state.properties.AttachFace;
import net.minecraft.state.properties.BlockStateProperties;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -55,6 +65,26 @@ public class BlockMovementTraits {
return false;
if (block == Blocks.OBSIDIAN)
return false;
+
+ // Move controllers only when they aren't moving
+ if (block instanceof MechanicalPistonBlock && blockState.get(MechanicalPistonBlock.STATE) != PistonState.MOVING)
+ return true;
+ if (block instanceof MechanicalBearingBlock) {
+ TileEntity te = world.getTileEntity(pos);
+ if (te instanceof MechanicalBearingTileEntity)
+ return !((MechanicalBearingTileEntity) te).isRunning();
+ }
+ if (block instanceof ClockworkBearingBlock) {
+ TileEntity te = world.getTileEntity(pos);
+ if (te instanceof ClockworkBearingTileEntity)
+ return !((ClockworkBearingTileEntity) te).isRunning();
+ }
+ if (block instanceof PulleyBlock) {
+ TileEntity te = world.getTileEntity(pos);
+ if (te instanceof PulleyTileEntity)
+ return !((PulleyTileEntity) te).running && ((PulleyTileEntity) te).offset == 0;
+ }
+
if (AllBlocks.BELT.typeOf(blockState))
return true;
if (block instanceof ExtractorBlock)
@@ -94,6 +124,8 @@ public class BlockMovementTraits {
return true;
if (block instanceof RedstoneWireBlock)
return true;
+ if (block instanceof RedstoneLinkBlock)
+ return true;
return false;
}
@@ -110,8 +142,10 @@ public class BlockMovementTraits {
return direction == Direction.DOWN;
if (block instanceof DoorBlock)
return direction == Direction.DOWN;
- if (block instanceof AttachedLogisticalBlock && !(block instanceof TransposerBlock))
+ if (block instanceof AttachedLogisticalBlock && !(block instanceof TransposerBlock))
return direction == AttachedLogisticalBlock.getBlockFacing(state);
+ if (block instanceof RedstoneLinkBlock)
+ return direction.getOpposite() == state.get(RedstoneLinkBlock.FACING);
if (block instanceof FlowerPotBlock)
return direction == Direction.DOWN;
if (block instanceof RedstoneDiodeBlock)
@@ -156,14 +190,4 @@ public class BlockMovementTraits {
return isBrittle(state);
}
- public static boolean movementIgnored(BlockState state) {
- if (AllBlocks.MECHANICAL_PISTON.typeOf(state))
- return true;
- if (AllBlocks.STICKY_MECHANICAL_PISTON.typeOf(state))
- return true;
- if (AllBlocks.MECHANICAL_PISTON_HEAD.typeOf(state))
- return true;
- return false;
- }
-
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java
index 2ed6ecef1..798125a15 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java
@@ -25,17 +25,23 @@ import com.simibubi.create.foundation.utility.WrappedWorld;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.components.contraptions.chassis.AbstractChassisBlock;
import com.simibubi.create.modules.contraptions.components.contraptions.chassis.ChassisTileEntity;
+import com.simibubi.create.modules.contraptions.components.contraptions.piston.MechanicalPistonBlock;
+import com.simibubi.create.modules.contraptions.components.contraptions.piston.PistonPoleBlock;
+import com.simibubi.create.modules.contraptions.components.contraptions.piston.MechanicalPistonBlock.PistonState;
+import com.simibubi.create.modules.contraptions.components.contraptions.piston.MechanicalPistonHeadBlock;
import com.simibubi.create.modules.contraptions.components.saw.SawBlock;
import com.simibubi.create.modules.contraptions.redstone.ContactBlock;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
import com.simibubi.create.modules.logistics.block.inventories.FlexcrateBlock;
+import net.minecraft.block.AbstractButtonBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.ChestBlock;
import net.minecraft.block.DoorBlock;
+import net.minecraft.block.PressurePlateBlock;
import net.minecraft.block.SlimeBlock;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.RenderTypeLookup;
@@ -159,6 +165,49 @@ public abstract class Contraption {
if (prevPos != null && !visited.contains(prevPos))
frontier.add(prevPos);
}
+
+ if (state.getBlock() instanceof MechanicalPistonBlock) {
+ int limit = AllConfigs.SERVER.kinetics.maxPistonPoles.get();
+ Direction direction = state.get(MechanicalPistonBlock.FACING);
+ if (state.get(MechanicalPistonBlock.STATE) == PistonState.EXTENDED) {
+ BlockPos searchPos = pos;
+ while (limit-- >= 0) {
+ searchPos = searchPos.offset(direction);
+ BlockState blockState = world.getBlockState(searchPos);
+ if (AllBlocks.PISTON_POLE.typeOf(blockState)) {
+ if (blockState.get(PistonPoleBlock.FACING).getAxis() != direction.getAxis())
+ break;
+ if (!visited.contains(searchPos))
+ frontier.add(searchPos);
+ continue;
+ }
+ if (blockState.getBlock() instanceof MechanicalPistonHeadBlock)
+ if (!visited.contains(searchPos))
+ frontier.add(searchPos);
+ break;
+ }
+ if (limit <= -1)
+ return false;
+ }
+
+ BlockPos searchPos = pos;
+ while (limit-- >= 0) {
+ searchPos = searchPos.offset(direction.getOpposite());
+ BlockState blockState = world.getBlockState(searchPos);
+ if (AllBlocks.PISTON_POLE.typeOf(blockState)) {
+ if (blockState.get(PistonPoleBlock.FACING).getAxis() != direction.getAxis())
+ break;
+ if (!visited.contains(searchPos))
+ frontier.add(searchPos);
+ continue;
+ }
+ break;
+ }
+
+ if (limit <= -1)
+ return false;
+ }
+
if (state.getBlock() instanceof DoorBlock) {
BlockPos otherPartPos = pos.up(state.get(DoorBlock.HALF) == DoubleBlockHalf.LOWER ? 1 : -1);
if (!visited.contains(otherPartPos))
@@ -169,7 +218,7 @@ public abstract class Contraption {
for (Direction offset : Direction.values()) {
BlockPos offsetPos = pos.offset(offset);
BlockState blockState = world.getBlockState(offsetPos);
- if (BlockMovementTraits.movementIgnored(blockState))
+ if (isAnchoringBlockAt(offsetPos))
continue;
if (!BlockMovementTraits.movementAllowed(world, offsetPos)) {
if (offset == forcedDirection && isSlimeBlock)
@@ -187,6 +236,10 @@ public abstract class Contraption {
return true;
}
+ protected boolean isAnchoringBlockAt(BlockPos pos) {
+ return pos.equals(anchor);
+ }
+
protected static boolean isChassis(BlockState state) {
return state.getBlock() instanceof AbstractChassisBlock;
}
@@ -217,6 +270,14 @@ public abstract class Contraption {
blockstate = blockstate.with(FlexcrateBlock.DOUBLE, false);
if (AllBlocks.CONTACT.typeOf(blockstate))
blockstate = blockstate.with(ContactBlock.POWERED, true);
+ if (blockstate.getBlock() instanceof AbstractButtonBlock) {
+ blockstate = blockstate.with(AbstractButtonBlock.POWERED, false);
+ world.getPendingBlockTicks().scheduleTick(pos, blockstate.getBlock(), -1);
+ }
+ if (blockstate.getBlock() instanceof PressurePlateBlock) {
+ blockstate = blockstate.with(PressurePlateBlock.POWERED, false);
+ world.getPendingBlockTicks().scheduleTick(pos, blockstate.getBlock(), -1);
+ }
CompoundNBT compoundnbt = getTileEntityNBT(world, pos);
TileEntity tileentity = world.getTileEntity(pos);
return Pair.of(new BlockInfo(pos, blockstate, compoundnbt), tileentity);
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionCollider.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionCollider.java
index 63d4f3711..39cb238df 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionCollider.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionCollider.java
@@ -14,6 +14,7 @@ import net.minecraft.entity.EntityType;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.MoverType;
import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.Direction.AxisDirection;
@@ -73,6 +74,7 @@ public class ContraptionCollider {
if (allowedMovement.equals(relativeMotion))
continue;
+
if (allowedMovement.y != relativeMotion.y) {
entity.handleFallDamage(entity.fallDistance, 1);
entity.fallDistance = 0;
@@ -80,6 +82,8 @@ public class ContraptionCollider {
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> checkForClientPlayerCollision(entity));
}
+ if (entity instanceof ServerPlayerEntity)
+ ((ServerPlayerEntity) entity).connection.floatingTickCount = 0;
if (entity instanceof PlayerEntity && !world.isRemote)
return;
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/BearingBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/BearingBlock.java
index 6c7961167..d0b630bd4 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/BearingBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/BearingBlock.java
@@ -25,11 +25,6 @@ public abstract class BearingBlock extends DirectionalKineticBlock {
return true;
}
- @Override
- protected boolean turnBackOnWrenched() {
- return true;
- }
-
@Override
public Axis getRotationAxis(BlockState state) {
return state.get(FACING).getAxis();
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingBlock.java
index fa8c2bd75..638d5e10d 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingBlock.java
@@ -1,6 +1,6 @@
package com.simibubi.create.modules.contraptions.components.contraptions.bearing;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
@@ -12,7 +12,7 @@ import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
-public class ClockworkBearingBlock extends BearingBlock implements IWithTileEntity {
+public class ClockworkBearingBlock extends BearingBlock implements ITE {
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
@@ -41,4 +41,9 @@ public class ClockworkBearingBlock extends BearingBlock implements IWithTileEnti
return ActionResultType.PASS;
}
+ @Override
+ public Class getTileEntityClass() {
+ return ClockworkBearingTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingTileEntity.java
index a6c53e481..b8d4fd577 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingTileEntity.java
@@ -299,4 +299,8 @@ public class ClockworkBearingTileEntity extends KineticTileEntity implements IBe
return this.minuteHand == contraption;
}
+ public boolean isRunning() {
+ return running;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingBlock.java
index 05f7ef6e8..1c6198bdf 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingBlock.java
@@ -1,6 +1,6 @@
package com.simibubi.create.modules.contraptions.components.contraptions.bearing;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@@ -13,7 +13,7 @@ import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
-public class MechanicalBearingBlock extends BearingBlock implements IWithTileEntity {
+public class MechanicalBearingBlock extends BearingBlock implements ITE {
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
@@ -56,4 +56,9 @@ public class MechanicalBearingBlock extends BearingBlock implements IWithTileEnt
withTileEntityDo(worldIn, pos, MechanicalBearingTileEntity::neighbourChanged);
}
+ @Override
+ public Class getTileEntityClass() {
+ return MechanicalBearingTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java
index 06491ad09..d962824b6 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java
@@ -52,13 +52,13 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp
}
@Override
- public float getAddedStressCapacity() {
- return isWindmill ? super.getAddedStressCapacity() : 0;
+ public float calculateAddedStressCapacity() {
+ return isWindmill ? super.calculateAddedStressCapacity() : 0;
}
@Override
- public float getStressApplied() {
- return isWindmill ? 0 : super.getStressApplied();
+ public float calculateStressApplied() {
+ return isWindmill ? 0 : super.calculateStressApplied();
}
public void neighbourChanged() {
@@ -298,5 +298,9 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp
public boolean isAttachedTo(ContraptionEntity contraption) {
return movedContraption == contraption;
}
+
+ public boolean isRunning() {
+ return running;
+ }
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/mounted/CartAssemblerBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/mounted/CartAssemblerBlock.java
index 4f0d45065..18f1c30ba 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/mounted/CartAssemblerBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/mounted/CartAssemblerBlock.java
@@ -129,6 +129,11 @@ public class CartAssemblerBlock extends AbstractRailBlock {
public PushReaction getPushReaction(BlockState state) {
return PushReaction.BLOCK;
}
+
+ @Override
+ public boolean isNormalCube(BlockState state, IBlockReader worldIn, BlockPos pos) {
+ return false;
+ }
public static class MinecartAnchorBlock extends RenderUtilityBlock {
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonBlock.java
index b82344e37..ced89a706 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonBlock.java
@@ -3,7 +3,7 @@ package com.simibubi.create.modules.contraptions.components.contraptions.piston;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.config.AllConfigs;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.modules.contraptions.base.DirectionalAxisKineticBlock;
@@ -34,7 +34,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.Tags;
public class MechanicalPistonBlock extends DirectionalAxisKineticBlock
- implements IWithTileEntity {
+ implements ITE {
public static final EnumProperty STATE = EnumProperty.create("state", PistonState.class);
protected boolean isSticky;
@@ -102,11 +102,6 @@ public class MechanicalPistonBlock extends DirectionalAxisKineticBlock
return super.onWrenched(state, context);
}
- @Override
- protected boolean turnBackOnWrenched() {
- return true;
- }
-
public enum PistonState implements IStringSerializable {
RETRACTED, MOVING, EXTENDED;
@@ -176,4 +171,9 @@ public class MechanicalPistonBlock extends DirectionalAxisKineticBlock
return VoxelShapes.fullCube();
}
+ @Override
+ public Class getTileEntityClass() {
+ return MechanicalPistonTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonHeadBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonHeadBlock.java
index 7a7367232..fdeb87f99 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonHeadBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonHeadBlock.java
@@ -9,6 +9,7 @@ import com.simibubi.create.modules.contraptions.components.contraptions.piston.M
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
+import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.state.EnumProperty;
@@ -37,6 +38,11 @@ public class MechanicalPistonHeadBlock extends ProperDirectionalBlock implements
super.fillStateContainer(builder);
}
+ @Override
+ public PushReaction getPushReaction(BlockState state) {
+ return PushReaction.NORMAL;
+ }
+
@Override
public ItemStack getPickBlock(BlockState state, RayTraceResult target, IBlockReader world, BlockPos pos,
PlayerEntity player) {
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/PistonPoleBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/PistonPoleBlock.java
index e0fe41c39..efa1100db 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/PistonPoleBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/PistonPoleBlock.java
@@ -7,6 +7,7 @@ import com.simibubi.create.modules.contraptions.components.contraptions.piston.M
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
+import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.properties.BlockStateProperties;
@@ -25,6 +26,11 @@ public class PistonPoleBlock extends ProperDirectionalBlock {
super(Properties.from(Blocks.PISTON_HEAD));
setDefaultState(getDefaultState().with(FACING, Direction.UP));
}
+
+ @Override
+ public PushReaction getPushReaction(BlockState state) {
+ return PushReaction.NORMAL;
+ }
@Override
public void onBlockHarvested(World worldIn, BlockPos pos, BlockState state, PlayerEntity player) {
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyBlock.java
index 0a790c022..46f0906b8 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyBlock.java
@@ -2,7 +2,7 @@ package com.simibubi.create.modules.contraptions.components.contraptions.pulley;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.contraptions.base.HorizontalAxisKineticBlock;
@@ -24,7 +24,7 @@ import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
-public class PulleyBlock extends HorizontalAxisKineticBlock implements IWithTileEntity {
+public class PulleyBlock extends HorizontalAxisKineticBlock implements ITE {
public static EnumProperty HORIZONTAL_AXIS = BlockStateProperties.HORIZONTAL_AXIS;
@@ -131,4 +131,9 @@ public class PulleyBlock extends HorizontalAxisKineticBlock implements IWithTile
}
+ @Override
+ public Class getTileEntityClass() {
+ return PulleyTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyTileEntity.java
index 327ad7c76..d65f0a5f3 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyTileEntity.java
@@ -30,6 +30,11 @@ public class PulleyTileEntity extends LinearActuatorTileEntity {
return super.getRenderBoundingBox().expand(0, -offset, 0);
}
+ @Override
+ public double getMaxRenderDistanceSquared() {
+ return super.getMaxRenderDistanceSquared() + offset * offset;
+ }
+
@Override
protected void assemble() {
if (speed == 0)
@@ -151,7 +156,7 @@ public class PulleyTileEntity extends LinearActuatorTileEntity {
@Override
protected int getExtensionRange() {
- return Math.min(AllConfigs.SERVER.kinetics.maxRopeLength.get(), pos.getY() - 1);
+ return Math.max(0, Math.min(AllConfigs.SERVER.kinetics.maxRopeLength.get(), pos.getY() - 1));
}
@Override
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterBlock.java
index d1eb44e22..0dd6589c0 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterBlock.java
@@ -2,7 +2,7 @@ package com.simibubi.create.modules.contraptions.components.crafter;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour;
import com.simibubi.create.foundation.block.connected.IHaveConnectedTextures;
import com.simibubi.create.foundation.utility.AngleHelper;
@@ -41,7 +41,7 @@ import net.minecraftforge.items.ItemHandlerHelper;
import net.minecraftforge.items.ItemStackHandler;
public class MechanicalCrafterBlock extends HorizontalKineticBlock
- implements IWithTileEntity, IHaveConnectedTextures {
+ implements ITE, IHaveConnectedTextures {
public static final EnumProperty POINTING = EnumProperty.create("pointing", Pointing.class);
@@ -290,4 +290,9 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock
return new InputCTBehaviour();
}
+ @Override
+ public Class getTileEntityClass() {
+ return MechanicalCrafterTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntity.java
index 94af97494..0a538eb5b 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntity.java
@@ -309,7 +309,7 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
if (!AllBlocks.BELT.typeOf(world.getBlockState(targetPos)))
return false;
TileEntity te = world.getTileEntity(targetPos);
- if (te == null || !(te instanceof BeltTileEntity))
+ if (!(te instanceof BeltTileEntity))
return false;
return ((KineticTileEntity) te).getSpeed() != 0;
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntityRenderer.java
index 1484ee573..67df7f724 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntityRenderer.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntityRenderer.java
@@ -163,10 +163,9 @@ public class MechanicalCrafterTileEntityRenderer extends SafeTileEntityRenderer<
if (te.phase == Phase.EXPORTING) {
int textureIndex = (int) ((te.getCountDownSpeed() / 128f * AnimationTickHolder.ticks));
- beltBuffer.shiftUVtoSheet(animatedTexture.getOriginal(), animatedTexture.getTarget(),
- (textureIndex % 4) * 4, 0);
+ beltBuffer.shiftUVtoSheet(animatedTexture, (textureIndex % 4) / 4f, 0, 1);
} else {
- beltBuffer.shiftUVtoSheet(animatedTexture.getOriginal(), animatedTexture.getTarget(), 0, 0);
+ beltBuffer.dontShiftUV();
}
beltBuffer.renderInto(ms, vb);
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crank/HandCrankBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crank/HandCrankBlock.java
index 5acd86159..4e2d58221 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/crank/HandCrankBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crank/HandCrankBlock.java
@@ -1,7 +1,7 @@
package com.simibubi.create.modules.contraptions.components.crank;
import com.simibubi.create.AllBlocks;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.contraptions.base.DirectionalKineticBlock;
@@ -22,7 +22,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
-public class HandCrankBlock extends DirectionalKineticBlock implements IWithTileEntity {
+public class HandCrankBlock extends DirectionalKineticBlock implements ITE {
public HandCrankBlock() {
super(Properties.from(AllBlocks.COGWHEEL.get()));
@@ -96,4 +96,9 @@ public class HandCrankBlock extends DirectionalKineticBlock implements IWithTile
return state.get(FACING).getAxis();
}
+ @Override
+ public Class getTileEntityClass() {
+ return HandCrankTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java
index 1ae490d34..139f71f29 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java
@@ -3,8 +3,8 @@ package com.simibubi.create.modules.contraptions.components.crusher;
import static com.simibubi.create.modules.contraptions.components.crusher.CrushingWheelControllerBlock.VALID;
import com.simibubi.create.AllBlocks;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.AllShapes;
-import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock;
import net.minecraft.block.BlockState;
@@ -20,7 +20,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
-public class CrushingWheelBlock extends RotatedPillarKineticBlock {
+public class CrushingWheelBlock extends RotatedPillarKineticBlock implements ITE {
public CrushingWheelBlock() {
super(Properties.from(Blocks.DIORITE));
@@ -74,15 +74,22 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock {
BlockState otherState = world.getBlockState(otherWheelPos);
if (AllBlocks.CRUSHING_WHEEL.typeOf(otherState)) {
controllerShouldExist = true;
- KineticTileEntity te = (KineticTileEntity) world.getTileEntity(pos);
- KineticTileEntity otherTe = (KineticTileEntity) world.getTileEntity(otherWheelPos);
- if (te != null && otherTe != null && (te.getSpeed() > 0) != (otherTe.getSpeed() > 0)
- && te.getSpeed() != 0) {
- float signum = Math.signum(te.getSpeed()) * (state.get(AXIS) == Axis.X ? -1 : 1);
- controllerShouldBeValid = facing.getAxisDirection().getOffset() != signum;
- }
- if (otherState.get(AXIS) != state.get(AXIS))
+
+ try {
+ CrushingWheelTileEntity te = getTileEntity(world, pos);
+ CrushingWheelTileEntity otherTe = getTileEntity(world, otherWheelPos);
+
+ if (te != null && otherTe != null && (te.getSpeed() > 0) != (otherTe.getSpeed() > 0)
+ && te.getSpeed() != 0) {
+ float signum = Math.signum(te.getSpeed()) * (state.get(AXIS) == Axis.X ? -1 : 1);
+ controllerShouldBeValid = facing.getAxisDirection().getOffset() != signum;
+ }
+ if (otherState.get(AXIS) != state.get(AXIS))
+ controllerShouldExist = false;
+
+ } catch (TileEntityException e) {
controllerShouldExist = false;
+ }
}
if (!controllerShouldExist) {
@@ -107,24 +114,25 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock {
@Override
public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) {
- KineticTileEntity te = (KineticTileEntity) worldIn.getTileEntity(pos);
- if (te == null)
- return;
- if (entityIn.getY() < pos.getY() + 1.25f || !entityIn.onGround)
- return;
+ try {
+ CrushingWheelTileEntity te = getTileEntity(worldIn, pos);
+ if (entityIn.getY() < pos.getY() + 1.25f || !entityIn.onGround)
+ return;
- double x = 0;
- double z = 0;
+ double x = 0;
+ double z = 0;
- if (state.get(AXIS) == Axis.X) {
- z = te.getSpeed() / 20f;
- x += (pos.getX() + .5f - entityIn.getX()) * .1f;
- }
- if (state.get(AXIS) == Axis.Z) {
- x = te.getSpeed() / -20f;
- z += (pos.getZ() + .5f - entityIn.getZ()) * .1f;
- }
- entityIn.setMotion(entityIn.getMotion().add(x, 0, z));
+ if (state.get(AXIS) == Axis.X) {
+ z = te.getSpeed() / 20f;
+ x += (pos.getX() + .5f - entityIn.getX()) * .1f;
+ }
+ if (state.get(AXIS) == Axis.Z) {
+ x = te.getSpeed() / -20f;
+ z += (pos.getZ() + .5f - entityIn.getZ()) * .1f;
+ }
+ entityIn.setMotion(entityIn.getMotion().add(x, 0, z));
+
+ } catch (TileEntityException e) {}
}
@Override
@@ -169,4 +177,9 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock {
return 1f;
}
+ @Override
+ public Class getTileEntityClass() {
+ return CrushingWheelTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerBlock.java
index e5543980d..9fec22fd9 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerBlock.java
@@ -4,6 +4,8 @@ import java.util.Random;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
+import com.simibubi.create.foundation.block.ITE;
+import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import net.minecraft.block.Block;
@@ -12,7 +14,6 @@ import net.minecraft.block.Blocks;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
-import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.NBTUtil;
@@ -33,7 +34,8 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
-public class CrushingWheelControllerBlock extends Block implements IHaveNoBlockItem {
+public class CrushingWheelControllerBlock extends Block
+ implements IHaveNoBlockItem, ITE {
public static final BooleanProperty VALID = BooleanProperty.create("valid");
@@ -51,6 +53,11 @@ public class CrushingWheelControllerBlock extends Block implements IHaveNoBlockI
return false;
}
+ @Override
+ public boolean addRunningEffects(BlockState state, World world, BlockPos pos, Entity entity) {
+ return true;
+ }
+
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new CrushingWheelControllerTileEntity();
@@ -65,11 +72,10 @@ public class CrushingWheelControllerBlock extends Block implements IHaveNoBlockI
public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) {
if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen())
return;
- CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn.getTileEntity(pos);
- if (te == null)
- return;
- if (te.processingEntity == entityIn)
- entityIn.setMotionMultiplier(state, new Vec3d(0.25D, (double) 0.05F, 0.25D));
+ withTileEntityDo(worldIn, pos, te -> {
+ if (te.processingEntity == entityIn)
+ entityIn.setMotionMultiplier(state, new Vec3d(0.25D, (double) 0.05F, 0.25D));
+ });
}
@Override
@@ -77,25 +83,23 @@ public class CrushingWheelControllerBlock extends Block implements IHaveNoBlockI
super.onLanded(worldIn, entityIn);
if (CrushingWheelControllerTileEntity.isFrozen())
return;
- TileEntity tileEntity = worldIn.getTileEntity(entityIn.getPosition().down());
- if (tileEntity == null)
- return;
- if (!(tileEntity instanceof CrushingWheelControllerTileEntity))
- return;
- CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) tileEntity;
- if (te.crushingspeed == 0)
- return;
- if (entityIn instanceof ItemEntity)
- ((ItemEntity) entityIn).setPickupDelay(10);
- if (te.isOccupied())
- return;
- boolean isPlayer = entityIn instanceof PlayerEntity;
- if (isPlayer && ((PlayerEntity) entityIn).isCreative())
- return;
- if (isPlayer && entityIn.world.getDifficulty() == Difficulty.PEACEFUL)
- return;
- te.startCrushing(entityIn);
+ try {
+ CrushingWheelControllerTileEntity te = getTileEntity(worldIn, entityIn.getPosition().down());
+ if (te.crushingspeed == 0)
+ return;
+ if (entityIn instanceof ItemEntity)
+ ((ItemEntity) entityIn).setPickupDelay(10);
+ if (te.isOccupied())
+ return;
+ boolean isPlayer = entityIn instanceof PlayerEntity;
+ if (isPlayer && ((PlayerEntity) entityIn).isCreative())
+ return;
+ if (isPlayer && entityIn.world.getDifficulty() == Difficulty.PEACEFUL)
+ return;
+
+ te.startCrushing(entityIn);
+ } catch (TileEntityException e) {}
}
@Override
@@ -118,32 +122,29 @@ public class CrushingWheelControllerBlock extends Block implements IHaveNoBlockI
}
public void updateSpeed(BlockState state, World world, BlockPos pos) {
- TileEntity tileEntity = world.getTileEntity(pos);
- if (tileEntity == null || !(tileEntity instanceof CrushingWheelControllerTileEntity))
- return;
-
- CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) tileEntity;
- if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen()) {
- if (te.crushingspeed != 0) {
- te.crushingspeed = 0;
- te.sendData();
+ withTileEntityDo(world, pos, te -> {
+ if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen()) {
+ if (te.crushingspeed != 0) {
+ te.crushingspeed = 0;
+ te.sendData();
+ }
+ return;
}
- return;
- }
- for (Direction d : Direction.values()) {
- if (d.getAxis().isVertical())
- continue;
- BlockState neighbour = world.getBlockState(pos.offset(d));
- if (!AllBlocks.CRUSHING_WHEEL.typeOf(neighbour))
- continue;
- if (neighbour.get(BlockStateProperties.AXIS) == d.getAxis())
- continue;
- KineticTileEntity wheelTe = (KineticTileEntity) world.getTileEntity(pos.offset(d));
- te.crushingspeed = Math.abs(wheelTe.getSpeed() / 50f);
- te.sendData();
- break;
- }
+ for (Direction d : Direction.values()) {
+ if (d.getAxis().isVertical())
+ continue;
+ BlockState neighbour = world.getBlockState(pos.offset(d));
+ if (!AllBlocks.CRUSHING_WHEEL.typeOf(neighbour))
+ continue;
+ if (neighbour.get(BlockStateProperties.AXIS) == d.getAxis())
+ continue;
+ KineticTileEntity wheelTe = (KineticTileEntity) world.getTileEntity(pos.offset(d));
+ te.crushingspeed = Math.abs(wheelTe.getSpeed() / 50f);
+ te.sendData();
+ break;
+ }
+ });
}
@Override
@@ -165,29 +166,27 @@ public class CrushingWheelControllerBlock extends Block implements IHaveNoBlockI
if (new AxisAlignedBB(pos).contains(entity.getPositionVec()))
return VoxelShapes.empty();
- CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn.getTileEntity(pos);
- if (te == null)
- return VoxelShapes.fullCube();
- if (te.processingEntity == entity)
- return VoxelShapes.empty();
+ try {
+ CrushingWheelControllerTileEntity te = getTileEntity(worldIn, pos);
+ if (te.processingEntity == entity)
+ return VoxelShapes.empty();
+ } catch (TileEntityException e) {}
}
return VoxelShapes.fullCube();
}
@Override
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
- if (state.hasTileEntity() && state.getBlock() != newState.getBlock()) {
- if (worldIn.getTileEntity(pos) == null)
- return;
- CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn.getTileEntity(pos);
- for (int slot = 0; slot < te.inventory.getSlots(); slot++) {
- InventoryHelper.spawnItemStack(worldIn, pos.getX(), pos.getY(), pos.getZ(),
- te.inventory.getStackInSlot(slot));
- }
+ if (!state.hasTileEntity() || state.getBlock() == newState.getBlock())
+ return;
- worldIn.removeTileEntity(pos);
- }
+ withTileEntityDo(worldIn, pos, te -> ItemHelper.dropContents(worldIn, pos, te.inventory));
+ worldIn.removeTileEntity(pos);
+ }
+ @Override
+ public Class getTileEntityClass() {
+ return CrushingWheelControllerTileEntity.class;
}
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerTileEntity.java
index 13230664f..394882555 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerTileEntity.java
@@ -204,7 +204,7 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen
@Override
public CompoundNBT write(CompoundNBT compound) {
- if (hasEntity() && !isFrozen())
+ if (hasEntity())
compound.put("Entity", NBTUtil.writeUniqueId(entityUUID));
compound.put("Inventory", inventory.serializeNBT());
compound.putFloat("Speed", crushingspeed);
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerBlock.java
index 4539c3ca3..544be097c 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerBlock.java
@@ -3,7 +3,7 @@ package com.simibubi.create.modules.contraptions.components.deployer;
import com.simibubi.create.AllItems;
import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour;
import com.simibubi.create.foundation.behaviour.filtering.FilteringBehaviour;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.contraptions.base.DirectionalAxisKineticBlock;
import com.simibubi.create.modules.contraptions.components.contraptions.IPortableBlock;
@@ -26,7 +26,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
public class DeployerBlock extends DirectionalAxisKineticBlock
- implements IWithTileEntity, IPortableBlock {
+ implements ITE, IPortableBlock {
public static MovementBehaviour MOVEMENT = new DeployerMovementBehaviour();
@@ -111,4 +111,9 @@ public class DeployerBlock extends DirectionalAxisKineticBlock
return MOVEMENT;
}
+ @Override
+ public Class getTileEntityClass() {
+ return DeployerTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerItemHandler.java b/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerItemHandler.java
new file mode 100644
index 000000000..b598ff183
--- /dev/null
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerItemHandler.java
@@ -0,0 +1,104 @@
+package com.simibubi.create.modules.contraptions.components.deployer;
+
+import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour;
+import com.simibubi.create.foundation.behaviour.filtering.FilteringBehaviour;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Hand;
+import net.minecraftforge.items.IItemHandlerModifiable;
+import net.minecraftforge.items.ItemHandlerHelper;
+
+public class DeployerItemHandler implements IItemHandlerModifiable {
+
+ private DeployerTileEntity te;
+ private DeployerFakePlayer player;
+
+ public DeployerItemHandler(DeployerTileEntity te) {
+ this.te = te;
+ this.player = te.player;
+ }
+
+ @Override
+ public int getSlots() {
+ return 1;
+ }
+
+ @Override
+ public ItemStack getStackInSlot(int slot) {
+ return getHeld();
+ }
+
+ public ItemStack getHeld() {
+ if (player == null)
+ return ItemStack.EMPTY;
+ return player.getHeldItemMainhand();
+ }
+
+ public void set(ItemStack stack) {
+ if (player == null)
+ return;
+ if (te.getWorld().isRemote)
+ return;
+ player.setHeldItem(Hand.MAIN_HAND, stack);
+ te.markDirty();
+ te.sendData();
+ }
+
+ @Override
+ public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {
+ ItemStack held = getHeld();
+ if (!isItemValid(slot, stack))
+ return stack;
+ if (held.isEmpty()) {
+ if (!simulate)
+ set(stack);
+ return ItemStack.EMPTY;
+ }
+ if (!ItemHandlerHelper.canItemStacksStack(held, stack))
+ return stack;
+
+ int space = held.getMaxStackSize() - held.getCount();
+ ItemStack split = stack.copy().split(space);
+
+ if (space == 0)
+ return stack;
+ if (!simulate) {
+ held = held.copy();
+ held.setCount(held.getCount() + split.getCount());
+ set(held);
+ }
+
+ return split;
+ }
+
+ @Override
+ public ItemStack extractItem(int slot, int amount, boolean simulate) {
+ ItemStack held = getHeld();
+ if (amount == 0 || held.isEmpty())
+ return ItemStack.EMPTY;
+ if (simulate)
+ return held.copy().split(amount);
+
+ ItemStack toReturn = held.split(amount);
+ te.markDirty();
+ te.sendData();
+ return toReturn;
+ }
+
+ @Override
+ public int getSlotLimit(int slot) {
+ return Math.min(getHeld().getMaxStackSize(), 64);
+ }
+
+ @Override
+ public boolean isItemValid(int slot, ItemStack stack) {
+ FilteringBehaviour filteringBehaviour = TileEntityBehaviour.get(te, FilteringBehaviour.TYPE);
+ return filteringBehaviour == null || filteringBehaviour.test(stack);
+ }
+
+ @Override
+ public void setStackInSlot(int slot, ItemStack stack) {
+ set(stack);
+ }
+
+}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerTileEntity.java
index 66170283d..0087f8eda 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerTileEntity.java
@@ -41,8 +41,12 @@ import net.minecraft.util.math.RayTraceContext.BlockMode;
import net.minecraft.util.math.RayTraceContext.FluidMode;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.server.ServerWorld;
+import net.minecraftforge.common.capabilities.Capability;
+import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.common.util.Constants.NBT;
+import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
+import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper;
public class DeployerTileEntity extends KineticTileEntity {
@@ -61,6 +65,7 @@ public class DeployerTileEntity extends KineticTileEntity {
protected boolean boop = false;
protected List overflowItems = new ArrayList<>();
private ListNBT deferredInventoryList;
+ private LazyOptional invHandler;
enum State {
WAITING, EXPANDING, RETRACTING, DUMPING;
@@ -98,7 +103,10 @@ public class DeployerTileEntity extends KineticTileEntity {
heldItem = player.getHeldItemMainhand();
sendData();
}
+ Vec3d initialPos = VecHelper.getCenterOf(pos.offset(getBlockState().get(FACING)));
+ player.setPosition(initialPos.x, initialPos.y, initialPos.z);
}
+ invHandler = LazyOptional.of(this::createHandler);
}
protected void onExtract(ItemStack stack) {
@@ -372,6 +380,10 @@ public class DeployerTileEntity extends KineticTileEntity {
super.readClientUpdate(tag);
}
+ private IItemHandlerModifiable createHandler() {
+ return new DeployerItemHandler(this);
+ }
+
@Override
public boolean hasFastRenderer() {
return false;
@@ -387,15 +399,24 @@ public class DeployerTileEntity extends KineticTileEntity {
return super.getRenderBoundingBox().grow(3);
}
+ @Override
+ public void remove() {
+ super.remove();
+ invHandler.invalidate();
+ }
+
public void changeMode() {
- eject();
mode = mode == Mode.PUNCH ? Mode.USE : Mode.PUNCH;
markDirty();
sendData();
}
- protected void eject() {
-
+ @Override
+ public LazyOptional getCapability(Capability cap, Direction side) {
+ if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY && invHandler != null) {
+ return invHandler.cast();
+ }
+ return super.getCapability(cap, side);
}
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/fan/AirCurrent.java b/src/main/java/com/simibubi/create/modules/contraptions/components/fan/AirCurrent.java
index 89fb3a6ab..7d472a462 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/fan/AirCurrent.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/fan/AirCurrent.java
@@ -9,6 +9,7 @@ import org.apache.commons.lang3.tuple.Pair;
import com.simibubi.create.config.AllConfigs;
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.modules.contraptions.particle.AirFlowParticleData;
+import com.simibubi.create.modules.contraptions.relays.belt.BeltHelper;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
import com.simibubi.create.modules.logistics.InWorldProcessing;
import com.simibubi.create.modules.logistics.InWorldProcessing.Type;
@@ -17,6 +18,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
+import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.TileEntity;
@@ -94,6 +96,9 @@ public class AirCurrent {
entity.setMotion(previousMotion.add(new Vec3d(xIn, yIn, zIn).scale(1 / 8f)));
entity.fallDistance = 0;
+ if (entity instanceof ServerPlayerEntity)
+ ((ServerPlayerEntity) entity).connection.floatingTickCount = 0;
+
if (InWorldProcessing.isFrozen())
return;
@@ -267,15 +272,16 @@ public class AirCurrent {
public void tickBelts() {
for (Pair pair : affectedBelts) {
BeltTileEntity belt = pair.getKey();
+ World world = belt.getWorld();
InWorldProcessing.Type processingType = pair.getRight();
+
BeltTileEntity controller = belt.getControllerTE();
if (controller == null)
continue;
- World world = belt.getWorld();
controller.getInventory().forEachWithin(belt.index + .5f, .51f, (transported) -> {
InWorldProcessing.spawnParticlesForProcessing(world,
- controller.getInventory().getVectorForOffset(transported.beltPosition), processingType);
+ BeltHelper.getVectorForOffset(controller, transported.beltPosition), processingType);
if (world.isRemote)
return null;
return InWorldProcessing.applyProcessing(transported, belt, processingType);
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/fan/EncasedFanBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/fan/EncasedFanBlock.java
index 69ef42ca1..09519dcb0 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/fan/EncasedFanBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/fan/EncasedFanBlock.java
@@ -1,12 +1,13 @@
package com.simibubi.create.modules.contraptions.components.fan;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.modules.contraptions.base.DirectionalKineticBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.item.BlockItemUseContext;
+import net.minecraft.item.ItemUseContext;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@@ -16,7 +17,7 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
-public class EncasedFanBlock extends DirectionalKineticBlock implements IWithTileEntity {
+public class EncasedFanBlock extends DirectionalKineticBlock implements ITE {
public EncasedFanBlock() {
super(Properties.from(Blocks.ANDESITE));
@@ -49,15 +50,21 @@ public class EncasedFanBlock extends DirectionalKineticBlock implements IWithTil
protected void blockUpdate(BlockState state, World worldIn, BlockPos pos) {
notifyFanTile(worldIn, pos);
- if (worldIn.isRemote || state.get(FACING) != Direction.DOWN)
+ if (worldIn.isRemote)
return;
- withTileEntityDo(worldIn, pos, EncasedFanTileEntity::updateGenerator);
+ withTileEntityDo(worldIn, pos, te -> te.updateGenerator(state.get(FACING)));
}
protected void notifyFanTile(IWorld world, BlockPos pos) {
withTileEntityDo(world, pos, EncasedFanTileEntity::blockInFrontChanged);
}
+ @Override
+ public BlockState updateAfterWrenched(BlockState newState, ItemUseContext context) {
+ blockUpdate(newState, context.getWorld(), context.getPos());
+ return newState;
+ }
+
// @Override // TODO 1.15 register layer
// public BlockRenderLayer getRenderLayer() {
// return BlockRenderLayer.CUTOUT;
@@ -83,4 +90,9 @@ public class EncasedFanBlock extends DirectionalKineticBlock implements IWithTil
return true;
}
+ @Override
+ public Class getTileEntityClass() {
+ return EncasedFanTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/fan/EncasedFanTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/fan/EncasedFanTileEntity.java
index 246c49e87..699d23817 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/fan/EncasedFanTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/fan/EncasedFanTileEntity.java
@@ -45,13 +45,13 @@ public class EncasedFanTileEntity extends GeneratingKineticTileEntity {
}
@Override
- public float getAddedStressCapacity() {
- return isGenerator ? super.getAddedStressCapacity() : 0;
+ public float calculateAddedStressCapacity() {
+ return isGenerator ? super.calculateAddedStressCapacity() : 0;
}
@Override
- public float getStressApplied() {
- return isGenerator ? 0 : super.getStressApplied();
+ public float calculateStressApplied() {
+ return isGenerator ? 0 : super.calculateStressApplied();
}
@Override
@@ -59,8 +59,8 @@ public class EncasedFanTileEntity extends GeneratingKineticTileEntity {
return isGenerator ? AllConfigs.SERVER.kinetics.generatingFanSpeed.get() : 0;
}
- public void updateGenerator() {
- boolean shouldGenerate = world.isBlockPowered(pos) && world.isBlockPresent(pos.down()) && blockBelowIsHot();
+ public void updateGenerator(Direction facing) {
+ boolean shouldGenerate = world.isBlockPowered(pos) && facing == Direction.DOWN && world.isBlockPresent(pos.down()) && blockBelowIsHot();
if (shouldGenerate == isGenerator)
return;
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/fan/NozzleTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/fan/NozzleTileEntity.java
index 318159cfa..23d67634d 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/fan/NozzleTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/fan/NozzleTileEntity.java
@@ -158,8 +158,21 @@ public class NozzleTileEntity extends SmartTileEntity {
pushingEntities.add(entity);
}
- if (!pushing && pushingEntities.size() > 512 && !world.isRemote)
- world.createExplosion(null, center.x, center.y, center.z, 6, Mode.BREAK);
+ for (Iterator iterator = pushingEntities.iterator(); iterator.hasNext();) {
+ Entity entity = iterator.next();
+ if (entity.isAlive())
+ continue;
+ iterator.remove();
+ }
+
+ if (!pushing && pushingEntities.size() > 256 && !world.isRemote) {
+ world.createExplosion(null, center.x, center.y, center.z, 2, Mode.NONE);
+ for (Iterator iterator = pushingEntities.iterator(); iterator.hasNext();) {
+ Entity entity = iterator.next();
+ entity.remove();
+ iterator.remove();
+ }
+ }
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/FlywheelTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/FlywheelTileEntity.java
index 8ee1418b0..d7f320305 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/FlywheelTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/FlywheelTileEntity.java
@@ -43,7 +43,7 @@ public class FlywheelTileEntity extends GeneratingKineticTileEntity {
}
@Override
- public float getAddedStressCapacity() {
+ public float calculateAddedStressCapacity() {
return generatedCapacity;
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/engine/FurnaceEngineBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/engine/FurnaceEngineBlock.java
index 6d77f6eed..f05ca701a 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/engine/FurnaceEngineBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/engine/FurnaceEngineBlock.java
@@ -2,7 +2,7 @@ package com.simibubi.create.modules.contraptions.components.flywheel.engine;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.AllShapes;
import net.minecraft.block.AbstractFurnaceBlock;
@@ -23,7 +23,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
@EventBusSubscriber
-public class FurnaceEngineBlock extends EngineBlock implements IWithTileEntity {
+public class FurnaceEngineBlock extends EngineBlock implements ITE {
public FurnaceEngineBlock() {
super(Properties.from(Blocks.GOLD_BLOCK));
@@ -76,4 +76,9 @@ public class FurnaceEngineBlock extends EngineBlock implements IWithTileEntity getTileEntityClass() {
+ return FurnaceEngineTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java
index df5e007d5..a5c024104 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java
@@ -1,6 +1,9 @@
package com.simibubi.create.modules.contraptions.components.millstone;
+import com.simibubi.create.foundation.block.ITE;
+import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.utility.AllShapes;
+import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.modules.contraptions.base.KineticBlock;
import net.minecraft.block.BlockState;
@@ -8,7 +11,6 @@ import net.minecraft.block.Blocks;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
-import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
@@ -28,7 +30,7 @@ import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemStackHandler;
-public class MillstoneBlock extends KineticBlock {
+public class MillstoneBlock extends KineticBlock implements ITE {
public MillstoneBlock() {
super(Properties.from(Blocks.ANDESITE));
@@ -53,29 +55,38 @@ public class MillstoneBlock extends KineticBlock {
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
return face == Direction.DOWN;
}
-
+
@Override
public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn,
BlockRayTraceResult hit) {
if (!player.getHeldItem(handIn).isEmpty())
return ActionResultType.PASS;
- if (worldIn.getTileEntity(pos) == null)
- return ActionResultType.PASS;
if (worldIn.isRemote)
return ActionResultType.SUCCESS;
- TileEntity tileEntity = worldIn.getTileEntity(pos);
- if (!(tileEntity instanceof MillstoneTileEntity))
- return ActionResultType.PASS;
- MillstoneTileEntity millstone = (MillstoneTileEntity) tileEntity;
-
- IItemHandlerModifiable inv = millstone.outputInv;
- for (int slot = 0; slot < inv.getSlots(); slot++) {
- player.inventory.placeItemBackInInventory(worldIn, inv.getStackInSlot(slot));
- inv.setStackInSlot(slot, ItemStack.EMPTY);
- }
- millstone.markDirty();
- millstone.sendData();
+ withTileEntityDo(worldIn, pos, millstone -> {
+ boolean emptyOutput = true;
+ IItemHandlerModifiable inv = millstone.outputInv;
+ for (int slot = 0; slot < inv.getSlots(); slot++) {
+ ItemStack stackInSlot = inv.getStackInSlot(slot);
+ if (!stackInSlot.isEmpty())
+ emptyOutput = false;
+ player.inventory.placeItemBackInInventory(worldIn, stackInSlot);
+ inv.setStackInSlot(slot, ItemStack.EMPTY);
+ }
+
+ if (emptyOutput) {
+ inv = millstone.inputInv;
+ for (int slot = 0; slot < inv.getSlots(); slot++) {
+ player.inventory.placeItemBackInInventory(worldIn, inv.getStackInSlot(slot));
+ inv.setStackInSlot(slot, ItemStack.EMPTY);
+ }
+ }
+
+ millstone.markDirty();
+ millstone.sendData();
+ });
+
return ActionResultType.SUCCESS;
}
@@ -88,15 +99,17 @@ public class MillstoneBlock extends KineticBlock {
if (!(entityIn instanceof ItemEntity))
return;
- BlockPos pos = entityIn.getPosition();
- TileEntity tileEntity = worldIn.getTileEntity(pos);
- if (!(tileEntity instanceof MillstoneTileEntity)) {
- tileEntity = worldIn.getTileEntity(pos.down());
- if (!(tileEntity instanceof MillstoneTileEntity))
- return;
+ MillstoneTileEntity millstone = null;
+ for (BlockPos pos : Iterate.hereAndBelow(entityIn.getPosition())) {
+ try {
+ millstone = getTileEntity(worldIn, pos);
+ } catch (TileEntityException e) {
+ continue;
+ }
}
+ if (millstone == null)
+ return;
- MillstoneTileEntity millstone = (MillstoneTileEntity) tileEntity;
ItemEntity itemEntity = (ItemEntity) entityIn;
LazyOptional capability = millstone.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY);
if (!capability.isPresent())
@@ -112,18 +125,10 @@ public class MillstoneBlock extends KineticBlock {
@Override
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
if (state.hasTileEntity() && state.getBlock() != newState.getBlock()) {
- TileEntity tileEntity = worldIn.getTileEntity(pos);
- if (!(tileEntity instanceof MillstoneTileEntity))
- return;
- MillstoneTileEntity te = (MillstoneTileEntity) tileEntity;
- for (int slot = 0; slot < te.inputInv.getSlots(); slot++) {
- InventoryHelper.spawnItemStack(worldIn, pos.getX(), pos.getY(), pos.getZ(),
- te.inputInv.getStackInSlot(slot));
- }
- for (int slot = 0; slot < te.outputInv.getSlots(); slot++) {
- InventoryHelper.spawnItemStack(worldIn, pos.getX(), pos.getY(), pos.getZ(),
- te.outputInv.getStackInSlot(slot));
- }
+ withTileEntityDo(worldIn, pos, te -> {
+ ItemHelper.dropContents(worldIn, pos, te.inputInv);
+ ItemHelper.dropContents(worldIn, pos, te.outputInv);
+ });
worldIn.removeTileEntity(pos);
}
@@ -139,4 +144,9 @@ public class MillstoneBlock extends KineticBlock {
return Axis.Y;
}
+ @Override
+ public Class getTileEntityClass() {
+ return MillstoneTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java
index 247272b33..ac11ac58d 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java
@@ -142,6 +142,16 @@ public class MillstoneTileEntity extends KineticTileEntity {
return super.getCapability(cap, side);
}
+ private boolean canProcess(ItemStack stack) {
+ ItemStackHandler tester = new ItemStackHandler(1);
+ tester.setStackInSlot(0, stack);
+ RecipeWrapper inventoryIn = new RecipeWrapper(tester);
+
+ if (lastRecipe != null && lastRecipe.matches(inventoryIn, world))
+ return true;
+ return world.getRecipeManager().getRecipe(AllRecipes.MILLING.getType(), inventoryIn, world).isPresent();
+ }
+
private class MillstoneInventoryHandler extends CombinedInvWrapper {
public MillstoneInventoryHandler() {
@@ -152,13 +162,15 @@ public class MillstoneTileEntity extends KineticTileEntity {
public boolean isItemValid(int slot, ItemStack stack) {
if (outputInv == getHandlerFromIndex(getIndexForSlot(slot)))
return false;
- return super.isItemValid(slot, stack);
+ return canProcess(stack) && super.isItemValid(slot, stack);
}
@Override
public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {
if (outputInv == getHandlerFromIndex(getIndexForSlot(slot)))
return stack;
+ if (!isItemValid(slot, stack))
+ return stack;
return super.insertItem(slot, stack, simulate);
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java
index 16355d719..54f1ca97c 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java
@@ -2,7 +2,7 @@ package com.simibubi.create.modules.contraptions.components.mixer;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.block.IHaveCustomBlockItem;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.contraptions.base.KineticBlock;
@@ -20,7 +20,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
public class MechanicalMixerBlock extends KineticBlock
- implements IWithTileEntity, IHaveCustomBlockItem {
+ implements ITE, IHaveCustomBlockItem {
public MechanicalMixerBlock() {
super(Properties.from(Blocks.ANDESITE));
@@ -89,4 +89,9 @@ public class MechanicalMixerBlock extends KineticBlock
return new BasinOperatorBlockItem(AllBlocks.MECHANICAL_MIXER, properties);
}
+ @Override
+ public Class getTileEntityClass() {
+ return MechanicalMixerTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/press/MechanicalPressBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/press/MechanicalPressBlock.java
index 8106e87b2..961c6535e 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/press/MechanicalPressBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/press/MechanicalPressBlock.java
@@ -6,8 +6,7 @@ import java.util.Optional;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.block.IHaveCustomBlockItem;
-import com.simibubi.create.foundation.block.IWithTileEntity;
-import com.simibubi.create.foundation.block.SyncedTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock;
@@ -18,7 +17,7 @@ import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.I
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Slope;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
-import com.simibubi.create.modules.contraptions.relays.belt.TransportedItemStack;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.TransportedItemStack;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@@ -39,7 +38,7 @@ import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
public class MechanicalPressBlock extends HorizontalKineticBlock
- implements IWithTileEntity, IBeltAttachment, IHaveCustomBlockItem {
+ implements ITE, IBeltAttachment, IHaveCustomBlockItem {
public MechanicalPressBlock() {
super(Properties.from(Blocks.PISTON));
@@ -63,17 +62,15 @@ public class MechanicalPressBlock extends HorizontalKineticBlock
boolean isMoving) {
if (worldIn.isRemote)
return;
- MechanicalPressTileEntity te = (MechanicalPressTileEntity) worldIn.getTileEntity(pos);
- if (te == null)
- return;
- if (worldIn.isBlockPowered(pos)) {
+ withTileEntityDo(worldIn, pos, te -> {
+ if (!worldIn.isBlockPowered(pos)) {
+ te.finished = false;
+ return;
+ }
if (!te.finished && !te.running && te.getSpeed() != 0)
te.start(Mode.WORLD);
- } else {
- te.finished = false;
- }
-
+ });
}
@Override
@@ -134,54 +131,61 @@ public class MechanicalPressBlock extends HorizontalKineticBlock
}
@Override
- public boolean startProcessingItem(BeltTileEntity te, TransportedItemStack transported, BeltAttachmentState state) {
- MechanicalPressTileEntity pressTe = (MechanicalPressTileEntity) te.getWorld()
- .getTileEntity(state.attachmentPos);
+ public boolean startProcessingItem(BeltTileEntity belt, TransportedItemStack transported,
+ BeltAttachmentState state) {
+ try {
+ MechanicalPressTileEntity pressTe = getTileEntity(belt.getWorld(), state.attachmentPos);
+ if (pressTe.getSpeed() == 0)
+ return false;
+ if (pressTe.running)
+ return false;
+ if (!pressTe.getRecipe(transported.stack).isPresent())
+ return false;
- if (pressTe == null || pressTe.getSpeed() == 0)
- return false;
- if (pressTe.running)
- return false;
- if (!pressTe.getRecipe(transported.stack).isPresent())
- return false;
+ state.processingDuration = 1;
+ pressTe.start(Mode.BELT);
+ return true;
- state.processingDuration = 1;
- pressTe.start(Mode.BELT);
- return true;
+ } catch (TileEntityException e) {}
+ return false;
}
@Override
- public boolean processItem(BeltTileEntity te, TransportedItemStack transportedStack, BeltAttachmentState state) {
- MechanicalPressTileEntity pressTe = (MechanicalPressTileEntity) te.getWorld()
- .getTileEntity(state.attachmentPos);
+ public boolean processItem(BeltTileEntity belt, TransportedItemStack transportedStack, BeltAttachmentState state) {
+ try {
+ MechanicalPressTileEntity pressTe = getTileEntity(belt.getWorld(), state.attachmentPos);
- // Not powered
- if (pressTe == null || pressTe.getSpeed() == 0)
- return false;
+ // Not powered
+ if (pressTe.getSpeed() == 0)
+ return false;
- // Running
- if (pressTe.running) {
- if (pressTe.runningTicks == 30) {
- Optional recipe = pressTe.getRecipe(transportedStack.stack);
+ // Running
+ if (!pressTe.running)
+ return false;
+ if (pressTe.runningTicks != 30)
+ return true;
- pressTe.pressedItems.clear();
- pressTe.pressedItems.add(transportedStack.stack);
+ Optional recipe = pressTe.getRecipe(transportedStack.stack);
- if (!recipe.isPresent())
- return false;
- ItemStack out = recipe.get().getRecipeOutput().copy();
- List multipliedOutput = ItemHelper.multipliedOutput(transportedStack.stack, out);
- if (multipliedOutput.isEmpty())
- transportedStack.stack = ItemStack.EMPTY;
- transportedStack.stack = multipliedOutput.get(0);
+ pressTe.pressedItems.clear();
+ pressTe.pressedItems.add(transportedStack.stack);
- TileEntity controllerTE = te.getWorld().getTileEntity(te.getController());
- if (controllerTE != null && controllerTE instanceof BeltTileEntity)
- ((SyncedTileEntity) controllerTE).sendData();
- pressTe.sendData();
- }
+ if (!recipe.isPresent())
+ return false;
+
+ ItemStack out = recipe.get().getRecipeOutput().copy();
+ List multipliedOutput = ItemHelper.multipliedOutput(transportedStack.stack, out);
+ if (multipliedOutput.isEmpty())
+ transportedStack.stack = ItemStack.EMPTY;
+ transportedStack.stack = multipliedOutput.get(0);
+
+ BeltTileEntity controllerTE = belt.getControllerTE();
+ if (controllerTE != null)
+ controllerTE.sendData();
+ pressTe.sendData();
return true;
- }
+
+ } catch (TileEntityException e) {}
return false;
}
@@ -191,4 +195,9 @@ public class MechanicalPressBlock extends HorizontalKineticBlock
return new BasinOperatorBlockItem(AllBlocks.MECHANICAL_PRESS, properties);
}
+ @Override
+ public Class getTileEntityClass() {
+ return MechanicalPressTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java
index e9b57ad4d..4d11e2a37 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java
@@ -2,7 +2,8 @@ package com.simibubi.create.modules.contraptions.components.saw;
import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour;
import com.simibubi.create.foundation.behaviour.filtering.FilteringBehaviour;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
+import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.contraptions.base.DirectionalAxisKineticBlock;
import com.simibubi.create.modules.contraptions.components.actors.SawMovementBehaviour;
@@ -15,7 +16,6 @@ import net.minecraft.block.Blocks;
import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
-import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
@@ -32,7 +32,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
-public class SawBlock extends DirectionalAxisKineticBlock implements IWithTileEntity, IPortableBlock {
+public class SawBlock extends DirectionalAxisKineticBlock implements ITE, IPortableBlock {
public static final BooleanProperty RUNNING = BooleanProperty.create("running");
public static DamageSource damageSourceSaw = new DamageSource("create.saw").setDamageBypassesArmor();
@@ -96,12 +96,13 @@ public class SawBlock extends DirectionalAxisKineticBlock implements IWithTileEn
super.onLanded(worldIn, entityIn);
if (!(entityIn instanceof ItemEntity))
return;
- BlockPos pos = entityIn.getPosition();
- if (!(worldIn.getTileEntity(pos) instanceof SawTileEntity))
- return;
if (entityIn.world.isRemote)
return;
+
+ BlockPos pos = entityIn.getPosition();
withTileEntityDo(entityIn.world, pos, te -> {
+ if (te.getSpeed() == 0)
+ return;
te.insertItem((ItemEntity) entityIn);
});
}
@@ -128,19 +129,12 @@ public class SawBlock extends DirectionalAxisKineticBlock implements IWithTileEn
@Override
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
- if (worldIn.getTileEntity(pos) == null)
+ if (!state.hasTileEntity() || state.getBlock() == newState.getBlock())
return;
- if (state.hasTileEntity() && state.getBlock() != newState.getBlock()) {
- withTileEntityDo(worldIn, pos, te -> {
- for (int slot = 0; slot < te.inventory.getSlots(); slot++) {
- InventoryHelper.spawnItemStack(worldIn, pos.getX(), pos.getY(), pos.getZ(),
- te.inventory.getStackInSlot(slot));
- }
- });
- TileEntityBehaviour.destroy(worldIn, pos, FilteringBehaviour.TYPE);
- worldIn.removeTileEntity(pos);
- }
+ withTileEntityDo(worldIn, pos, te -> ItemHelper.dropContents(worldIn, pos, te.inventory));
+ TileEntityBehaviour.destroy(worldIn, pos, FilteringBehaviour.TYPE);
+ worldIn.removeTileEntity(pos);
}
@Override
@@ -148,4 +142,9 @@ public class SawBlock extends DirectionalAxisKineticBlock implements IWithTileEn
return MOVEMENT;
}
+ @Override
+ public Class getTileEntityClass() {
+ return SawTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawTileEntity.java
index 0c0de4a35..fb695c9f8 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawTileEntity.java
@@ -55,6 +55,7 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity {
private int recipeIndex;
private LazyOptional invProvider = LazyOptional.empty();
private FilteringBehaviour filtering;
+ private boolean destroyed;
public SawTileEntity() {
super(AllTileEntities.SAW.type);
@@ -81,7 +82,7 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity {
super.onSpeedChanged(prevSpeed);
boolean shouldRun = Math.abs(getSpeed()) > 1 / 64f;
boolean running = getBlockState().get(RUNNING);
- if (shouldRun != running)
+ if (shouldRun != running && !destroyed)
world.setBlockState(pos, getBlockState().with(RUNNING, shouldRun), 2 | 16);
}
@@ -148,8 +149,6 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity {
if (stack.isEmpty())
continue;
-// if (itemMovementFacing.getAxis() == Axis.Z)
-// itemMovementFacing = itemMovementFacing.getOpposite();
if (((BeltTileEntity) te).tryInsertingFromSide(itemMovementFacing, stack, false))
inventory.setStackInSlot(slot, ItemStack.EMPTY);
else {
@@ -214,8 +213,9 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity {
@Override
public void remove() {
- super.remove();
invProvider.invalidate();
+ destroyed = true;
+ super.remove();
}
@Override
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/turntable/TurntableBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/turntable/TurntableBlock.java
index 70e5c1395..aa8629b5e 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/turntable/TurntableBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/turntable/TurntableBlock.java
@@ -1,5 +1,6 @@
package com.simibubi.create.modules.contraptions.components.turntable;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.modules.contraptions.base.KineticBlock;
@@ -22,7 +23,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
-public class TurntableBlock extends KineticBlock {
+public class TurntableBlock extends KineticBlock implements ITE {
public TurntableBlock() {
super(Properties.from(Blocks.STRIPPED_SPRUCE_LOG));
@@ -40,51 +41,48 @@ public class TurntableBlock extends KineticBlock {
@Override
public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity e) {
- TileEntity te = worldIn.getTileEntity(pos);
- if (!(te instanceof KineticTileEntity))
- return;
if (!e.onGround)
return;
if (e.getMotion().y > 0)
return;
-
- float speed = ((KineticTileEntity) te).getSpeed() * 3/10;
- World world = e.getEntityWorld();
-
- if (speed == 0)
- return;
if (e.getY() < pos.getY() + .5f)
return;
- if (world.isRemote && (e instanceof PlayerEntity)) {
- if (worldIn.getBlockState(e.getPosition()) != state) {
- Vec3d origin = VecHelper.getCenterOf(pos);
- Vec3d offset = e.getPositionVec().subtract(origin);
- offset = VecHelper.rotate(offset, MathHelper.clamp(speed, -16, 16) / 1f, Axis.Y);
- Vec3d movement = origin.add(offset).subtract(e.getPositionVec());
- e.setMotion(e.getMotion().add(movement));
+ withTileEntityDo(worldIn, pos, te -> {
+ float speed = ((KineticTileEntity) te).getSpeed() * 3 / 10;
+ if (speed == 0)
+ return;
+
+ World world = e.getEntityWorld();
+ if (world.isRemote && (e instanceof PlayerEntity)) {
+ if (worldIn.getBlockState(e.getPosition()) != state) {
+ Vec3d origin = VecHelper.getCenterOf(pos);
+ Vec3d offset = e.getPositionVec().subtract(origin);
+ offset = VecHelper.rotate(offset, MathHelper.clamp(speed, -16, 16) / 1f, Axis.Y);
+ Vec3d movement = origin.add(offset).subtract(e.getPositionVec());
+ e.setMotion(e.getMotion().add(movement));
+ e.velocityChanged = true;
+ }
+ }
+
+ if ((e instanceof PlayerEntity))
+ return;
+ if (world.isRemote)
+ return;
+
+ if ((e instanceof LivingEntity)) {
+ float diff = e.getRotationYawHead() - speed;
+ ((LivingEntity) e).setIdleTime(20);
+ e.setRenderYawOffset(diff);
+ e.setRotationYawHead(diff);
+ e.onGround = false;
e.velocityChanged = true;
}
- }
-
- if ((e instanceof PlayerEntity))
- return;
- if (world.isRemote)
- return;
- if ((e instanceof LivingEntity)) {
- float diff = e.getRotationYawHead() - speed;
- ((LivingEntity) e).setIdleTime(20);
- e.setRenderYawOffset(diff);
- e.setRotationYawHead(diff);
- e.onGround = false;
- e.velocityChanged = true;
- }
- e.rotationYaw -= speed;
+ e.rotationYaw -= speed;
+ });
}
- // IRotate:
-
@Override
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
return face == Direction.DOWN;
@@ -100,4 +98,9 @@ public class TurntableBlock extends KineticBlock {
return false;
}
+ @Override
+ public Class getTileEntityClass() {
+ return TurntableTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/turntable/TurntableHandler.java b/src/main/java/com/simibubi/create/modules/contraptions/components/turntable/TurntableHandler.java
index 9c6bd75bc..e5769910d 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/turntable/TurntableHandler.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/turntable/TurntableHandler.java
@@ -2,9 +2,9 @@ package com.simibubi.create.modules.contraptions.components.turntable;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.VecHelper;
-import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import net.minecraft.client.Minecraft;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
@@ -22,8 +22,12 @@ public class TurntableHandler {
if (mc.isGamePaused())
return;
- KineticTileEntity te = (KineticTileEntity) mc.world.getTileEntity(pos);
- float speed = te.getSpeed() * 3/10;
+ TileEntity tileEntity = mc.world.getTileEntity(pos);
+ if (!(tileEntity instanceof TurntableTileEntity))
+ return;
+
+ TurntableTileEntity turnTable = (TurntableTileEntity) tileEntity;
+ float speed = turnTable.getSpeed() * 3/10;
if (speed == 0)
return;
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/waterwheel/WaterWheelBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/waterwheel/WaterWheelBlock.java
index c173bb78a..bdbd234f0 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/components/waterwheel/WaterWheelBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/components/waterwheel/WaterWheelBlock.java
@@ -2,6 +2,7 @@ package com.simibubi.create.modules.contraptions.components.waterwheel;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.config.AllConfigs;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock;
import net.minecraft.block.BlockState;
@@ -19,7 +20,7 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
-public class WaterWheelBlock extends HorizontalKineticBlock {
+public class WaterWheelBlock extends HorizontalKineticBlock implements ITE {
public WaterWheelBlock() {
super(Properties.from(Blocks.STRIPPED_SPRUCE_WOOD));
@@ -78,46 +79,42 @@ public class WaterWheelBlock extends HorizontalKineticBlock {
}
private void updateFlowAt(BlockState state, World world, BlockPos pos, Direction f) {
- WaterWheelTileEntity te = (WaterWheelTileEntity) world.getTileEntity(pos);
- if (te == null)
- return;
if (f.getAxis() == state.get(HORIZONTAL_FACING).getAxis())
return;
- IFluidState fluid = world.getFluidState(pos.offset(f));
- Vec3d flowVec = fluid.getFlow(world, pos.offset(f));
- Direction wf = state.get(HORIZONTAL_FACING);
- double flow = 0;
- flowVec = flowVec.scale(f.getAxisDirection().getOffset());
+ IFluidState fluid = world.getFluidState(pos.offset(f));
+ Direction wf = state.get(HORIZONTAL_FACING);
boolean clockwise = wf.getAxisDirection() == AxisDirection.POSITIVE;
int clockwiseMultiplier = 2;
- flowVec = new Vec3d(Math.signum(flowVec.x), Math.signum(flowVec.y), Math.signum(flowVec.z));
- if (wf.getAxis() == Axis.Z) {
- if (f.getAxis() == Axis.Y)
- flow = flowVec.x > 0 ^ !clockwise ? -flowVec.x * clockwiseMultiplier : -flowVec.x;
- if (f.getAxis() == Axis.X)
- flow = flowVec.y < 0 ^ !clockwise ? flowVec.y * clockwiseMultiplier : flowVec.y;
- }
+ Vec3d vec = fluid.getFlow(world, pos.offset(f));
+ vec = vec.scale(f.getAxisDirection().getOffset());
+ vec = new Vec3d(Math.signum(vec.x), Math.signum(vec.y), Math.signum(vec.z));
+ Vec3d flow = vec;
- if (wf.getAxis() == Axis.X) {
- if (f.getAxis() == Axis.Y)
- flow = flowVec.z < 0 ^ !clockwise ? flowVec.z * clockwiseMultiplier : flowVec.z;
- if (f.getAxis() == Axis.Z)
- flow = flowVec.y > 0 ^ !clockwise ? -flowVec.y * clockwiseMultiplier : -flowVec.y;
- }
+ withTileEntityDo(world, pos, te -> {
+ double flowStrength = 0;
- te.setFlow(f, (float) (flow * AllConfigs.SERVER.kinetics.waterWheelSpeed.get() / 2f));
+ if (wf.getAxis() == Axis.Z) {
+ if (f.getAxis() == Axis.Y)
+ flowStrength = flow.x > 0 ^ !clockwise ? -flow.x * clockwiseMultiplier : -flow.x;
+ if (f.getAxis() == Axis.X)
+ flowStrength = flow.y < 0 ^ !clockwise ? flow.y * clockwiseMultiplier : flow.y;
+ }
+
+ if (wf.getAxis() == Axis.X) {
+ if (f.getAxis() == Axis.Y)
+ flowStrength = flow.z < 0 ^ !clockwise ? flow.z * clockwiseMultiplier : flow.z;
+ if (f.getAxis() == Axis.Z)
+ flowStrength = flow.y > 0 ^ !clockwise ? -flow.y * clockwiseMultiplier : -flow.y;
+ }
+
+ te.setFlow(f, (float) (flowStrength * AllConfigs.SERVER.kinetics.waterWheelSpeed.get() / 2f));
+ });
}
private void updateWheelSpeed(IWorld world, BlockPos pos) {
- if (world.isRemote())
- return;
- TileEntity tileEntity = world.getTileEntity(pos);
- if (!(tileEntity instanceof WaterWheelTileEntity))
- return;
- WaterWheelTileEntity te = (WaterWheelTileEntity) tileEntity;
- te.updateGeneratedRotation();
+ withTileEntityDo(world, pos, WaterWheelTileEntity::updateGeneratedRotation);
}
@Override
@@ -158,4 +155,9 @@ public class WaterWheelBlock extends HorizontalKineticBlock {
return true;
}
+ @Override
+ public Class getTileEntityClass() {
+ return WaterWheelTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinBlock.java
index 6e3c8a42b..3089d7890 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinBlock.java
@@ -1,7 +1,7 @@
package com.simibubi.create.modules.contraptions.processing;
import com.simibubi.create.AllBlocks;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.utility.AllShapes;
@@ -12,7 +12,6 @@ import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
-import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
@@ -27,7 +26,7 @@ import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper;
import net.minecraftforge.items.ItemStackHandler;
-public class BasinBlock extends Block implements IWithTileEntity {
+public class BasinBlock extends Block implements ITE {
public BasinBlock() {
super(Properties.from(Blocks.ANDESITE));
@@ -53,16 +52,16 @@ public class BasinBlock extends Block implements IWithTileEntity {
+ ItemStack insertItem = ItemHandlerHelper.insertItem(te.inputInventory, itemEntity.getItem().copy(), false);
- if (insertItem.isEmpty()) {
- itemEntity.remove();
- return;
- }
-
- itemEntity.setItem(insertItem);
+ if (insertItem.isEmpty()) {
+ itemEntity.remove();
+ return;
+ }
+ itemEntity.setItem(insertItem);
+ });
}
@Override
@@ -97,19 +95,15 @@ public class BasinBlock extends Block implements IWithTileEntity {
+ ItemHelper.dropContents(worldIn, pos, te.inputInventory);
+ ItemHelper.dropContents(worldIn, pos, te.outputInventory);
+ });
+ worldIn.removeTileEntity(pos);
}
@Override
@@ -119,12 +113,15 @@ public class BasinBlock extends Block implements IWithTileEntity getTileEntityClass() {
+ return BasinTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinOperatingTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinOperatingTileEntity.java
index ec78f988f..e2d21cbe1 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinOperatingTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinOperatingTileEntity.java
@@ -2,6 +2,7 @@ package com.simibubi.create.modules.contraptions.processing;
import java.util.ArrayList;
import java.util.List;
+import java.util.Optional;
import java.util.stream.Collectors;
import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour;
@@ -84,11 +85,11 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
if (isRunning())
return false;
- TileEntity basinTE = world.getTileEntity(pos.down(2));
- if (basinTE == null || !(basinTE instanceof BasinTileEntity))
+ Optional basinTe = getBasin();
+ if (!basinTe.isPresent())
return true;
if (!basinInv.isPresent())
- basinInv = basinTE.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY);
+ basinInv = basinTe.get().getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY);
if (!basinInv.isPresent())
return true;
@@ -160,9 +161,7 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
sendData();
}
- TileEntity basinTE = world.getTileEntity(pos.down(2));
- if (basinTE instanceof BasinTileEntity)
- ((BasinTileEntity) basinTE).contentsChanged = false;
+ getBasin().ifPresent(te -> te.contentsChanged = true);
}
protected List> getMatchingRecipes() {
@@ -176,6 +175,13 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
}
+ protected Optional getBasin() {
+ TileEntity basinTE = world.getTileEntity(pos.down(2));
+ if (!(basinTE instanceof BasinTileEntity))
+ return Optional.empty();
+ return Optional.of((BasinTileEntity) basinTE);
+ }
+
protected abstract boolean matchStaticFilters(IRecipe recipe);
protected abstract boolean matchBasinRecipe(IRecipe recipe);
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinTileEntity.java
index 217caedea..377e70692 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinTileEntity.java
@@ -1,5 +1,7 @@
package com.simibubi.create.modules.contraptions.processing;
+import java.util.Optional;
+
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.foundation.block.SyncedTileEntity;
@@ -111,11 +113,7 @@ public class BasinTileEntity extends SyncedTileEntity implements ITickableTileEn
}
public void onEmptied() {
- TileEntity te = world.getTileEntity(pos.up(2));
- if (te == null)
- return;
- if (te instanceof BasinOperatingTileEntity)
- ((BasinOperatingTileEntity) te).basinRemoved = true;
+ getOperator().ifPresent(te -> te.basinRemoved = true);
}
@Override
@@ -137,13 +135,14 @@ public class BasinTileEntity extends SyncedTileEntity implements ITickableTileEn
if (!contentsChanged)
return;
contentsChanged = false;
+ getOperator().ifPresent(te -> te.basinChecker.scheduleUpdate());
+ }
+ private Optional getOperator() {
TileEntity te = world.getTileEntity(pos.up(2));
- if (te == null)
- return;
if (te instanceof BasinOperatingTileEntity)
- ((BasinOperatingTileEntity) te).basinChecker.scheduleUpdate();
-
+ return Optional.of((BasinOperatingTileEntity) te);
+ return Optional.empty();
}
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverBlock.java
index 5904268b6..43d565978 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverBlock.java
@@ -2,7 +2,7 @@ package com.simibubi.create.modules.contraptions.redstone;
import java.util.Random;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@@ -27,7 +27,7 @@ import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
-public class AnalogLeverBlock extends HorizontalFaceBlock implements IWithTileEntity {
+public class AnalogLeverBlock extends HorizontalFaceBlock implements ITE {
public AnalogLeverBlock() {
super(Properties.from(Blocks.LEVER));
@@ -51,23 +51,24 @@ public class AnalogLeverBlock extends HorizontalFaceBlock implements IWithTileEn
return ActionResultType.SUCCESS;
}
- boolean sneak = player.isSneaking();
- AnalogLeverTileEntity te = getTileEntity(worldIn, pos);
- if (te == null)
- return ActionResultType.SUCCESS;
+ try {
+ boolean sneak = player.isSneaking();
+ AnalogLeverTileEntity te = getTileEntity(worldIn, pos);
+ te.changeState(sneak);
+ float f = .25f + ((te.state + 5) / 15f) * .5f;
+ worldIn.playSound(null, pos, SoundEvents.BLOCK_LEVER_CLICK, SoundCategory.BLOCKS, 0.2F, f);
+ } catch (TileEntityException e) {}
- te.changeState(sneak);
- float f = .25f + ((te.state + 5) / 15f) * .5f;
- worldIn.playSound(null, pos, SoundEvents.BLOCK_LEVER_CLICK, SoundCategory.BLOCKS, 0.2F, f);
return ActionResultType.SUCCESS;
}
@Override
public int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side) {
- AnalogLeverTileEntity tileEntity = getTileEntity(blockAccess, pos);
- if (tileEntity == null)
+ try {
+ return getTileEntity(blockAccess, pos).state;
+ } catch (TileEntityException e) {
return 0;
- return tileEntity.state;
+ }
}
@Override
@@ -83,21 +84,23 @@ public class AnalogLeverBlock extends HorizontalFaceBlock implements IWithTileEn
@Override
@OnlyIn(Dist.CLIENT)
public void animateTick(BlockState stateIn, World worldIn, BlockPos pos, Random rand) {
- AnalogLeverTileEntity tileEntity = getTileEntity(worldIn, pos);
- if (tileEntity == null)
- return;
- if (tileEntity.state != 0 && rand.nextFloat() < 0.25F)
- addParticles(stateIn, worldIn, pos, 0.5F);
+ try {
+ AnalogLeverTileEntity tileEntity = getTileEntity(worldIn, pos);
+ if (tileEntity.state != 0 && rand.nextFloat() < 0.25F)
+ addParticles(stateIn, worldIn, pos, 0.5F);
+ } catch (TileEntityException e) {}
}
@Override
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
- AnalogLeverTileEntity tileEntity = getTileEntity(worldIn, pos);
- if (tileEntity != null && !isMoving && state.getBlock() != newState.getBlock()) {
- if (tileEntity.state != 0)
- updateNeighbors(state, worldIn, pos);
- worldIn.removeTileEntity(pos);
- }
+ try {
+ AnalogLeverTileEntity tileEntity = getTileEntity(worldIn, pos);
+ if (!isMoving && state.getBlock() != newState.getBlock()) {
+ if (tileEntity.state != 0)
+ updateNeighbors(state, worldIn, pos);
+ worldIn.removeTileEntity(pos);
+ }
+ } catch (TileEntityException e) {}
}
private static void addParticles(BlockState state, IWorld worldIn, BlockPos pos, float alpha) {
@@ -128,4 +131,9 @@ public class AnalogLeverBlock extends HorizontalFaceBlock implements IWithTileEn
super.fillStateContainer(builder.add(HORIZONTAL_FACING, FACE));
}
+ @Override
+ public Class getTileEntityClass() {
+ return AnalogLeverTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java
index e1d9f138b..fa05ef4f6 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java
@@ -1,16 +1,16 @@
package com.simibubi.create.modules.contraptions.relays.advanced.sequencer;
import com.simibubi.create.AllItems;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.gui.ScreenOpener;
import com.simibubi.create.modules.contraptions.base.HorizontalAxisKineticBlock;
import com.simibubi.create.modules.contraptions.base.KineticBlock;
-import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
+import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItem;
import net.minecraft.item.BlockItemUseContext;
@@ -33,8 +33,7 @@ import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.DistExecutor;
-public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock
- implements IWithTileEntity {
+public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock implements ITE {
public static final BooleanProperty VERTICAL = BooleanProperty.create("vertical");
public static final IntegerProperty STATE = IntegerProperty.create("state", 0, 5);
@@ -88,9 +87,8 @@ public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock
return ActionResultType.PASS;
}
- DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> {
- displayScreen((SequencedGearshiftTileEntity) worldIn.getTileEntity(pos));
- });
+ if (player instanceof ClientPlayerEntity)
+ DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> withTileEntityDo(worldIn, pos, this::displayScreen));
return ActionResultType.SUCCESS;
}
@@ -109,12 +107,13 @@ public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock
@Override
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
- Direction facing = context.getFace();
- if (facing.getAxis().isVertical() && !state.get(VERTICAL)) {
- KineticTileEntity.switchToBlockState(context.getWorld(), context.getPos(), state.cycle(VERTICAL));
- return ActionResultType.SUCCESS;
- }
- return super.onWrenched(state, context);
+ BlockState newState = state;
+
+ if (context.getFace().getAxis() != Axis.Y)
+ if (newState.get(HORIZONTAL_AXIS) != context.getFace().getAxis())
+ newState = newState.cycle(VERTICAL);
+
+ return super.onWrenched(newState, context);
}
private BlockState withAxis(Axis axis, BlockItemUseContext context) {
@@ -136,4 +135,9 @@ public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock
return true;
}
+ @Override
+ public Class getTileEntityClass() {
+ return SequencedGearshiftTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/AllBeltAttachments.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/AllBeltAttachments.java
index b426d8fc1..1a40ead5c 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/AllBeltAttachments.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/AllBeltAttachments.java
@@ -6,6 +6,7 @@ import java.util.function.Consumer;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.Create;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.TransportedItemStack;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
@@ -13,7 +14,6 @@ import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.INBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.nbt.NBTUtil;
-import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
@@ -59,12 +59,13 @@ public enum AllBeltAttachments {
default void onAttachmentPlaced(IWorld world, BlockPos pos, BlockState state) {
BlockPos beltPos = getBeltPositionForAttachment(world, pos, state);
- TileEntity te = world.getTileEntity(beltPos);
- if (te == null || !(te instanceof BeltTileEntity))
+ BeltTileEntity belt = BeltHelper.getSegmentTE(world, beltPos);
+
+ if (belt == null)
return;
- BeltTileEntity belt = (BeltTileEntity) te;
- if (!isAttachedCorrectly(world, pos, belt.getPos(), state, belt.getBlockState()))
+ if (!isAttachedCorrectly(world, pos, beltPos, state, world.getBlockState(beltPos)))
return;
+
belt.attachmentTracker.addAttachment(world, pos);
belt.markDirty();
belt.sendData();
@@ -72,16 +73,18 @@ public enum AllBeltAttachments {
default void onAttachmentRemoved(IWorld world, BlockPos pos, BlockState state) {
BlockPos beltPos = getBeltPositionForAttachment(world, pos, state);
- TileEntity te = world.getTileEntity(beltPos);
- if (te == null || !(te instanceof BeltTileEntity))
+ BeltTileEntity belt = BeltHelper.getSegmentTE(world, beltPos);
+
+ if (belt == null)
return;
- BeltTileEntity belt = (BeltTileEntity) te;
- if (!isAttachedCorrectly(world, pos, belt.getPos(), state, belt.getBlockState()))
+ if (!isAttachedCorrectly(world, pos, beltPos, state, world.getBlockState(beltPos)))
return;
+
belt.attachmentTracker.removeAttachment(pos);
belt.markDirty();
belt.sendData();
}
+
}
public static class BeltAttachmentState {
@@ -112,8 +115,8 @@ public enum AllBeltAttachments {
World world = belt.getWorld();
BlockPos beltPos = belt.getPos();
BlockState beltState = belt.getBlockState();
- List attachmentPositions = ba.attachment.getPotentialAttachmentPositions(world, beltPos,
- beltState);
+ List attachmentPositions =
+ ba.attachment.getPotentialAttachmentPositions(world, beltPos, beltState);
for (BlockPos potentialPos : attachmentPositions) {
if (!world.isBlockPresent(potentialPos))
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java
index cad9a5023..3d28578be 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java
@@ -10,11 +10,12 @@ import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems;
import com.simibubi.create.foundation.block.IHaveColorHandler;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock;
-import com.simibubi.create.modules.contraptions.relays.belt.BeltMovementHandler.TransportedEntityInfo;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.BeltMovementHandler.TransportedEntityInfo;
+import com.simibubi.create.modules.logistics.block.belts.tunnel.BeltTunnelBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType;
@@ -61,7 +62,7 @@ import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
public class BeltBlock extends HorizontalKineticBlock
- implements IHaveNoBlockItem, IWithTileEntity, IHaveColorHandler {
+ implements IHaveNoBlockItem, ITE, IHaveColorHandler {
public static final IProperty SLOPE = EnumProperty.create("slope", Slope.class);
public static final IProperty PART = EnumProperty.create("part", Part.class);
@@ -76,8 +77,10 @@ public class BeltBlock extends HorizontalKineticBlock
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
if (face.getAxis() != getRotationAxis(state))
return false;
- BeltTileEntity beltEntity = (BeltTileEntity) world.getTileEntity(pos);
- return beltEntity != null && beltEntity.hasPulley();
+ try {
+ return getTileEntity(world, pos).hasPulley();
+ } catch (TileEntityException e) {}
+ return false;
}
@Override
@@ -110,15 +113,9 @@ public class BeltBlock extends HorizontalKineticBlock
@Override
public void spawnAdditionalDrops(BlockState state, World worldIn, BlockPos pos, ItemStack stack) {
- withTileEntityDo(worldIn, pos, te -> {
- if (worldIn.isRemote)
- return;
- if (te.isController()) {
- BeltInventory inv = te.getInventory();
- for (TransportedItemStack s : inv.items)
- inv.eject(s);
- }
- });
+ BeltTileEntity controllerTE = BeltHelper.getControllerTE(worldIn, pos);
+ if (controllerTE != null)
+ controllerTE.getInventory().ejectAll();
}
@Override
@@ -146,9 +143,6 @@ public class BeltBlock extends HorizontalKineticBlock
@Override
public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) {
- BeltTileEntity belt = null;
- belt = (BeltTileEntity) worldIn.getTileEntity(pos);
-
if (state.get(SLOPE) == Slope.VERTICAL)
return;
if (entityIn instanceof PlayerEntity) {
@@ -158,6 +152,8 @@ public class BeltBlock extends HorizontalKineticBlock
if (player.abilities.isFlying)
return;
}
+
+ BeltTileEntity belt = BeltHelper.getSegmentTE(worldIn, pos);
if (belt == null || belt.getSpeed() == 0)
return;
if (entityIn instanceof ItemEntity && entityIn.isAlive()) {
@@ -177,12 +173,12 @@ public class BeltBlock extends HorizontalKineticBlock
return;
}
- BeltTileEntity controller = (BeltTileEntity) worldIn.getTileEntity(belt.getController());
+ BeltTileEntity controller = BeltHelper.getControllerTE(worldIn, pos);
if (controller == null || controller.passengers == null)
return;
if (controller.passengers.containsKey(entityIn)) {
TransportedEntityInfo info = controller.passengers.get(entityIn);
- if (info.ticksSinceLastCollision != 0 || pos.equals(entityIn.getPosition()))
+ if (info.getTicksSinceLastCollision() != 0 || pos.equals(entityIn.getPosition()))
info.refresh(pos, state);
} else {
controller.passengers.put(entityIn, new TransportedEntityInfo(pos, state));
@@ -223,10 +219,9 @@ public class BeltBlock extends HorizontalKineticBlock
return ActionResultType.SUCCESS;
}
- TileEntity te = worldIn.getTileEntity(pos);
- if (te == null || !(te instanceof BeltTileEntity))
+ BeltTileEntity belt = BeltHelper.getSegmentTE(worldIn, pos);
+ if (belt == null)
return ActionResultType.PASS;
- BeltTileEntity belt = (BeltTileEntity) te;
if (isHand) {
BeltTileEntity controllerBelt = belt.getControllerTE();
@@ -269,10 +264,6 @@ public class BeltBlock extends HorizontalKineticBlock
@Override
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
World world = context.getWorld();
- TileEntity te = world.getTileEntity(context.getPos());
- if (te == null || !(te instanceof BeltTileEntity))
- return ActionResultType.PASS;
- BeltTileEntity belt = (BeltTileEntity) te;
PlayerEntity player = context.getPlayer();
if (state.get(CASING)) {
@@ -288,8 +279,11 @@ public class BeltBlock extends HorizontalKineticBlock
if (world.isRemote)
return ActionResultType.SUCCESS;
world.setBlockState(context.getPos(), state.with(PART, Part.MIDDLE), 2);
- belt.detachKinetics();
- belt.attachKinetics();
+ BeltTileEntity belt = BeltHelper.getSegmentTE(world, context.getPos());
+ if (belt != null) {
+ belt.detachKinetics();
+ belt.attachKinetics();
+ }
if (!player.isCreative())
player.inventory.placeItemBackInInventory(world, new ItemStack(AllBlocks.SHAFT.get()));
return ActionResultType.SUCCESS;
@@ -364,16 +358,20 @@ public class BeltBlock extends HorizontalKineticBlock
public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos,
ISelectionContext context) {
VoxelShape shape = getShape(state, worldIn, pos, context);
- BeltTileEntity belt = (BeltTileEntity) worldIn.getTileEntity(pos);
- if (belt == null || context.getEntity() == null)
- return shape;
- BeltTileEntity controller = (BeltTileEntity) worldIn.getTileEntity(belt.getController());
- if (controller == null)
- return shape;
- if (controller.passengers == null || !controller.passengers.containsKey(context.getEntity())) {
- return BeltShapes.getCollisionShape(state);
- }
+ try {
+ if (context.getEntity() == null)
+ return shape;
+ BeltTileEntity belt = getTileEntity(worldIn, pos);
+ BeltTileEntity controller = belt.getControllerTE();
+
+ if (controller == null)
+ return shape;
+ if (controller.passengers == null || !controller.passengers.containsKey(context.getEntity())) {
+ return BeltShapes.getCollisionShape(state);
+ }
+
+ } catch (TileEntityException e) {}
return shape;
}
@@ -444,12 +442,8 @@ public class BeltBlock extends HorizontalKineticBlock
world.setBlockState(beltPos, currentState.with(CASING, false), 2);
}
- if (te.isController() && isVertical) {
- BeltInventory inventory = te.getInventory();
- for (TransportedItemStack s : inventory.items)
- inventory.eject(s);
- inventory.items.clear();
- }
+ if (te.isController() && isVertical)
+ te.getInventory().ejectAll();
} else {
world.destroyBlock(pos, true);
return;
@@ -489,11 +483,8 @@ public class BeltBlock extends HorizontalKineticBlock
TileEntity tileEntity = world.getTileEntity(currentPos);
if (tileEntity instanceof BeltTileEntity) {
BeltTileEntity te = (BeltTileEntity) tileEntity;
- if (te.isController()) {
- BeltInventory inv = te.getInventory();
- for (TransportedItemStack stack : inv.items)
- inv.eject(stack);
- }
+ if (te.isController())
+ te.getInventory().ejectAll();
te.remove();
hasPulley = te.hasPulley();
@@ -607,4 +598,9 @@ public class BeltBlock extends HorizontalKineticBlock
return new BeltColor();
}
+ @Override
+ public Class getTileEntityClass() {
+ return BeltTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltHelper.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltHelper.java
new file mode 100644
index 000000000..9adbcb5be
--- /dev/null
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltHelper.java
@@ -0,0 +1,70 @@
+package com.simibubi.create.modules.contraptions.relays.belt;
+
+import com.simibubi.create.foundation.utility.VecHelper;
+import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Slope;
+
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.MathHelper;
+import net.minecraft.util.math.Vec3d;
+import net.minecraft.util.math.Vec3i;
+import net.minecraft.world.IWorld;
+
+public class BeltHelper {
+
+ public static BeltTileEntity getSegmentTE(IWorld world, BlockPos pos) {
+ if (!world.isAreaLoaded(pos, 0))
+ return null;
+ TileEntity tileEntity = world.getTileEntity(pos);
+ if (!(tileEntity instanceof BeltTileEntity))
+ return null;
+ return (BeltTileEntity) tileEntity;
+ }
+
+ public static BeltTileEntity getControllerTE(IWorld world, BlockPos pos) {
+ BeltTileEntity segment = getSegmentTE(world, pos);
+ if (segment == null)
+ return null;
+ BlockPos controllerPos = segment.controller;
+ if (controllerPos == null)
+ return null;
+ return getSegmentTE(world, controllerPos);
+ }
+
+ public static BeltTileEntity getBeltAtSegment(BeltTileEntity controller, int segment) {
+ BlockPos pos = getPositionForOffset(controller, segment);
+ TileEntity te = controller.getWorld().getTileEntity(pos);
+ if (te == null || !(te instanceof BeltTileEntity))
+ return null;
+ return (BeltTileEntity) te;
+ }
+
+ public static BlockPos getPositionForOffset(BeltTileEntity controller, int offset) {
+ BlockPos pos = controller.getPos();
+ Vec3i vec = controller.getBeltFacing().getDirectionVec();
+ Slope slope = controller.getBlockState().get(BeltBlock.SLOPE);
+ int verticality = slope == Slope.DOWNWARD ? -1 : slope == Slope.UPWARD ? 1 : 0;
+
+ return pos.add(offset * vec.getX(), MathHelper.clamp(offset, 0, controller.beltLength - 1) * verticality,
+ offset * vec.getZ());
+ }
+
+ public static Vec3d getVectorForOffset(BeltTileEntity controller, float offset) {
+ Slope slope = controller.getBlockState().get(BeltBlock.SLOPE);
+ int verticality = slope == Slope.DOWNWARD ? -1 : slope == Slope.UPWARD ? 1 : 0;
+ float verticalMovement = verticality;
+ if (offset < .5)
+ verticalMovement = 0;
+ verticalMovement = verticalMovement * (Math.min(offset, controller.beltLength - .5f) - .5f);
+
+ Vec3d vec = VecHelper.getCenterOf(controller.getPos());
+ Vec3d horizontalMovement = new Vec3d(controller.getBeltFacing().getDirectionVec()).scale(offset - .5f);
+
+ if (slope == Slope.VERTICAL)
+ horizontalMovement = Vec3d.ZERO;
+
+ vec = vec.add(horizontalMovement).add(0, verticalMovement, 0);
+ return vec;
+ }
+
+}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntity.java
index 45afa22a5..1842a17d2 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntity.java
@@ -20,7 +20,10 @@ import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.Tracker;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Part;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Slope;
-import com.simibubi.create.modules.contraptions.relays.belt.BeltMovementHandler.TransportedEntityInfo;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.BeltInventory;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.BeltMovementHandler;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.BeltMovementHandler.TransportedEntityInfo;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.TransportedItemStack;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
@@ -53,7 +56,7 @@ public class BeltTileEntity extends KineticTileEntity {
protected BeltInventory inventory;
protected LazyOptional itemHandler;
- private CompoundNBT trackerUpdateTag;
+ public CompoundNBT trackerUpdateTag;
public BeltTileEntity() {
super(AllTileEntities.BELT.type);
@@ -99,7 +102,7 @@ public class BeltTileEntity extends KineticTileEntity {
passengers.forEach((entity, info) -> {
boolean canBeTransported = BeltMovementHandler.canBeTransported(entity);
boolean leftTheBelt =
- info.ticksSinceLastCollision > ((getBlockState().get(BeltBlock.SLOPE) != HORIZONTAL) ? 3 : 1);
+ info.getTicksSinceLastCollision() > ((getBlockState().get(BeltBlock.SLOPE) != HORIZONTAL) ? 3 : 1);
if (!canBeTransported || leftTheBelt) {
toRemove.add(entity);
return;
@@ -112,10 +115,10 @@ public class BeltTileEntity extends KineticTileEntity {
}
@Override
- public float getStressApplied() {
+ public float calculateStressApplied() {
if (!isController())
return 0;
- return super.getStressApplied();
+ return super.calculateStressApplied();
}
@Override
@@ -193,7 +196,7 @@ public class BeltTileEntity extends KineticTileEntity {
public void applyColor(DyeColor colorIn) {
int colorValue = colorIn.getMapColor().colorValue;
for (BlockPos blockPos : BeltBlock.getBeltChain(world, getController())) {
- BeltTileEntity belt = (BeltTileEntity) world.getTileEntity(blockPos);
+ BeltTileEntity belt = BeltHelper.getSegmentTE(world, blockPos);
if (belt == null)
continue;
belt.color = belt.color == -1 ? colorValue : ColorHelper.mixColors(belt.color, colorValue, .5f);
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntityRenderer.java
index 8d344e409..bcb765ae9 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntityRenderer.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntityRenderer.java
@@ -19,6 +19,7 @@ import com.simibubi.create.foundation.utility.TessellatorHelper;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Slope;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.TransportedItemStack;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
@@ -72,10 +73,9 @@ public class BeltTileEntityRenderer extends SafeTileEntityRenderer items;
+ private final List items;
final List toInsert;
boolean beltMovementPositive;
final float SEGMENT_WINDOW = .75f;
@@ -52,11 +54,11 @@ public class BeltInventory {
// Reverse item collection if belt just reversed
if (beltMovementPositive != movingPositive()) {
beltMovementPositive = movingPositive();
- Collections.reverse(items);
+ Collections.reverse(getItems());
belt.markDirty();
belt.sendData();
}
-
+
// Add items from previous cycle
if (!toInsert.isEmpty()) {
toInsert.forEach(this::insert);
@@ -68,7 +70,7 @@ public class BeltInventory {
// Assuming the first entry is furthest on the belt
TransportedItemStack stackInFront = null;
TransportedItemStack current = null;
- Iterator iterator = items.iterator();
+ Iterator iterator = getItems().iterator();
float beltSpeed = belt.getDirectionAwareBeltMovementSpeed();
Direction movementFacing = belt.getMovementFacing();
@@ -121,9 +123,13 @@ public class BeltInventory {
if (!onClient) {
// Don't move if belt attachments want to continue processing
if (segmentBefore != -1 && current.locked) {
- BeltTileEntity beltSegment = getBeltSegment(segmentBefore);
+ BeltTileEntity beltSegment = BeltHelper.getBeltAtSegment(belt, segmentBefore);
if (beltSegment != null) {
-
+
+ // wait in case belt isnt initialized yet
+ if (current.locked && beltSegment.trackerUpdateTag != null)
+ continue;
+
current.locked = false;
List attachments = beltSegment.attachmentTracker.attachments;
for (BeltAttachmentState attachmentState : attachments) {
@@ -143,7 +149,7 @@ public class BeltInventory {
int upcomingSegment = (int) (current.beltPosition + (beltMovementPositive ? .5f : -.5f));
for (int segment = upcomingSegment; beltMovementPositive ? segment + .5f <= nextOffset
: segment + .5f >= nextOffset; segment += beltMovementPositive ? 1 : -1) {
- BeltTileEntity beltSegment = getBeltSegment(segmentBefore);
+ BeltTileEntity beltSegment = BeltHelper.getBeltAtSegment(belt, segmentBefore);
if (beltSegment == null)
break;
for (BeltAttachmentState attachmentState : beltSegment.attachmentTracker.attachments) {
@@ -196,7 +202,7 @@ public class BeltInventory {
if (segment == -1)
continue;
if (!world.isRemote)
- world.updateComparatorOutputLevel(getPositionForOffset(segment),
+ world.updateComparatorOutputLevel(BeltHelper.getPositionForOffset(belt, segment),
belt.getBlockState().getBlock());
}
}
@@ -207,7 +213,8 @@ public class BeltInventory {
continue;
int lastOffset = beltMovementPositive ? belt.beltLength - 1 : 0;
- BlockPos nextPosition = getPositionForOffset(beltMovementPositive ? belt.beltLength : -1);
+ BlockPos nextPosition =
+ BeltHelper.getPositionForOffset(belt, beltMovementPositive ? belt.beltLength : -1);
BlockState state = world.getBlockState(nextPosition);
// next block is a basin or a saw
@@ -238,7 +245,7 @@ public class BeltInventory {
}
// next block is not a belt
- if (!AllBlocks.BELT.typeOf(state)) {
+ if (!AllBlocks.BELT.typeOf(state) || state.get(BeltBlock.SLOPE) == Slope.VERTICAL) {
if (!Block.hasSolidSide(state, world, nextPosition, movementFacing.getOpposite())) {
eject(current);
iterator.remove();
@@ -275,7 +282,7 @@ public class BeltInventory {
}
private boolean stuckAtTunnel(int offset, ItemStack stack, Direction movementDirection) {
- BlockPos pos = getPositionForOffset(offset).up();
+ BlockPos pos = BeltHelper.getPositionForOffset(belt, offset).up();
if (!AllBlocks.BELT_TUNNEL.typeOf(belt.getWorld().getBlockState(pos)))
return false;
TileEntity te = belt.getWorld().getTileEntity(pos);
@@ -313,7 +320,7 @@ public class BeltInventory {
private void flapTunnel(int offset, Direction side, boolean inward) {
if (belt.getBlockState().get(BeltBlock.SLOPE) != Slope.HORIZONTAL)
return;
- BlockPos pos = getPositionForOffset(offset).up();
+ BlockPos pos = BeltHelper.getPositionForOffset(belt, offset).up();
if (!AllBlocks.BELT_TUNNEL.typeOf(belt.getWorld().getBlockState(pos)))
return;
TileEntity te = belt.getWorld().getTileEntity(pos);
@@ -335,13 +342,13 @@ public class BeltInventory {
else if (!beltMovementPositive)
segmentPos += 1f;
- for (TransportedItemStack stack : items)
+ for (TransportedItemStack stack : getItems())
if (isBlocking(segment, side, segmentPos, stack))
return false;
- for (TransportedItemStack stack : toInsert)
+ for (TransportedItemStack stack : toInsert)
if (isBlocking(segment, side, segmentPos, stack))
return false;
-
+
return true;
}
@@ -356,27 +363,27 @@ public class BeltInventory {
public void addItem(TransportedItemStack newStack) {
toInsert.add(newStack);
}
-
+
private void insert(TransportedItemStack newStack) {
- if (items.isEmpty())
- items.add(newStack);
+ if (getItems().isEmpty())
+ getItems().add(newStack);
else {
int index = 0;
- for (TransportedItemStack stack : items) {
+ for (TransportedItemStack stack : getItems()) {
if (stack.compareTo(newStack) > 0 == beltMovementPositive)
break;
index++;
}
- items.add(index, newStack);
+ getItems().add(index, newStack);
}
}
public TransportedItemStack getStackAtOffset(int offset) {
float min = offset + .5f - (SEGMENT_WINDOW / 2);
float max = offset + .5f + (SEGMENT_WINDOW / 2);
- for (TransportedItemStack stack : items) {
+ for (TransportedItemStack stack : getItems()) {
if (stack.beltPosition > max)
- break;
+ continue;
if (stack.beltPosition > min)
return stack;
}
@@ -384,16 +391,16 @@ public class BeltInventory {
}
public void read(CompoundNBT nbt) {
- items.clear();
+ getItems().clear();
nbt.getList("Items", NBT.TAG_COMPOUND)
- .forEach(inbt -> items.add(TransportedItemStack.read((CompoundNBT) inbt)));
+ .forEach(inbt -> getItems().add(TransportedItemStack.read((CompoundNBT) inbt)));
beltMovementPositive = nbt.getBoolean("PositiveOrder");
}
public CompoundNBT write() {
CompoundNBT nbt = new CompoundNBT();
ListNBT itemsNBT = new ListNBT();
- items.forEach(stack -> itemsNBT.add(stack.serializeNBT()));
+ getItems().forEach(stack -> itemsNBT.add(stack.serializeNBT()));
nbt.put("Items", itemsNBT);
nbt.putBoolean("PositiveOrder", beltMovementPositive);
return nbt;
@@ -401,7 +408,7 @@ public class BeltInventory {
public void eject(TransportedItemStack stack) {
ItemStack ejected = stack.stack;
- Vec3d outPos = getVectorForOffset(stack.beltPosition);
+ Vec3d outPos = BeltHelper.getVectorForOffset(belt, stack.beltPosition);
float movementSpeed = Math.max(Math.abs(belt.getBeltMovementSpeed()), 1 / 8f);
Vec3d outMotion = new Vec3d(belt.getBeltChainDirection()).scale(movementSpeed).add(0, 1 / 8f, 0);
outPos.add(outMotion.normalize());
@@ -412,40 +419,9 @@ public class BeltInventory {
belt.getWorld().addEntity(entity);
}
- public Vec3d getVectorForOffset(float offset) {
- Slope slope = belt.getBlockState().get(BeltBlock.SLOPE);
- int verticality = slope == Slope.DOWNWARD ? -1 : slope == Slope.UPWARD ? 1 : 0;
- float verticalMovement = verticality;
- if (offset < .5)
- verticalMovement = 0;
- verticalMovement = verticalMovement * (Math.min(offset, belt.beltLength - .5f) - .5f);
-
- Vec3d vec = VecHelper.getCenterOf(belt.getPos());
- Vec3d horizontalMovement = new Vec3d(belt.getBeltFacing().getDirectionVec()).scale(offset - .5f);
-
- if (slope == Slope.VERTICAL)
- horizontalMovement = Vec3d.ZERO;
-
- vec = vec.add(horizontalMovement).add(0, verticalMovement, 0);
- return vec;
- }
-
- private BeltTileEntity getBeltSegment(int segment) {
- BlockPos pos = getPositionForOffset(segment);
- TileEntity te = belt.getWorld().getTileEntity(pos);
- if (te == null || !(te instanceof BeltTileEntity))
- return null;
- return (BeltTileEntity) te;
- }
-
- private BlockPos getPositionForOffset(int offset) {
- BlockPos pos = belt.getPos();
- Vec3i vec = belt.getBeltFacing().getDirectionVec();
- Slope slope = belt.getBlockState().get(BeltBlock.SLOPE);
- int verticality = slope == Slope.DOWNWARD ? -1 : slope == Slope.UPWARD ? 1 : 0;
-
- return pos.add(offset * vec.getX(), MathHelper.clamp(offset, 0, belt.beltLength - 1) * verticality,
- offset * vec.getZ());
+ public void ejectAll() {
+ getItems().forEach(this::eject);
+ getItems().clear();
}
private boolean movingPositive() {
@@ -460,7 +436,7 @@ public class BeltInventory {
Function> callback) {
List toBeAdded = new ArrayList<>();
boolean dirty = false;
- for (Iterator iterator = items.iterator(); iterator.hasNext();) {
+ for (Iterator iterator = getItems().iterator(); iterator.hasNext();) {
TransportedItemStack transportedItemStack = iterator.next();
if (Math.abs(position - transportedItemStack.beltPosition) < distance) {
List apply = callback.apply(transportedItemStack);
@@ -478,4 +454,8 @@ public class BeltInventory {
}
}
+ public List getItems() {
+ return items;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltMovementHandler.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/transport/BeltMovementHandler.java
similarity index 95%
rename from src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltMovementHandler.java
rename to src/main/java/com/simibubi/create/modules/contraptions/relays/belt/transport/BeltMovementHandler.java
index c4575af62..22a270b97 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltMovementHandler.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/transport/BeltMovementHandler.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.contraptions.relays.belt;
+package com.simibubi.create.modules.contraptions.relays.belt.transport;
import static net.minecraft.entity.MoverType.SELF;
import static net.minecraft.util.Direction.AxisDirection.NEGATIVE;
@@ -9,8 +9,10 @@ import java.util.List;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.modules.contraptions.components.contraptions.ContraptionEntity;
import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.BeltAttachmentState;
+import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Part;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Slope;
+import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
@@ -50,6 +52,10 @@ public class BeltMovementHandler {
ticksSinceLastCollision++;
return this;
}
+
+ public int getTicksSinceLastCollision() {
+ return ticksSinceLastCollision;
+ }
}
public static boolean canBeTransported(Entity entity) {
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/ItemHandlerBeltSegment.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/transport/ItemHandlerBeltSegment.java
similarity index 96%
rename from src/main/java/com/simibubi/create/modules/contraptions/relays/belt/ItemHandlerBeltSegment.java
rename to src/main/java/com/simibubi/create/modules/contraptions/relays/belt/transport/ItemHandlerBeltSegment.java
index 6ba9f7c1a..960ae27ed 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/ItemHandlerBeltSegment.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/transport/ItemHandlerBeltSegment.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.contraptions.relays.belt;
+package com.simibubi.create.modules.contraptions.relays.belt.transport;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/TransportedItemStack.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/transport/TransportedItemStack.java
similarity index 97%
rename from src/main/java/com/simibubi/create/modules/contraptions/relays/belt/TransportedItemStack.java
rename to src/main/java/com/simibubi/create/modules/contraptions/relays/belt/transport/TransportedItemStack.java
index 491c859ad..cc273e80e 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/TransportedItemStack.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/transport/TransportedItemStack.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.contraptions.relays.belt;
+package com.simibubi.create.modules.contraptions.relays.belt.transport;
import java.util.Random;
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/AdjustablePulleyBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/AdjustablePulleyBlock.java
index c77d13c4e..3e450b1bf 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/AdjustablePulleyBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/AdjustablePulleyBlock.java
@@ -1,6 +1,6 @@
package com.simibubi.create.modules.contraptions.relays.encased;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@@ -14,7 +14,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
-public class AdjustablePulleyBlock extends EncasedBeltBlock implements IWithTileEntity {
+public class AdjustablePulleyBlock extends EncasedBeltBlock implements ITE {
public static BooleanProperty POWERED = BlockStateProperties.POWERED;
@@ -34,10 +34,11 @@ public class AdjustablePulleyBlock extends EncasedBeltBlock implements IWithTile
@Override
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
- if (oldState.getBlock() != state.getBlock())
- withTileEntityDo(worldIn, pos, AdjustablePulleyTileEntity::neighborChanged);
+ if (oldState.getBlock() == state.getBlock())
+ return;
+ withTileEntityDo(worldIn, pos, AdjustablePulleyTileEntity::neighborChanged);
}
-
+
@Override
public void updateNeighbors(BlockState stateIn, IWorld worldIn, BlockPos pos, int flags) {
super.updateNeighbors(stateIn, worldIn, pos, flags);
@@ -55,10 +56,15 @@ public class AdjustablePulleyBlock extends EncasedBeltBlock implements IWithTile
return;
withTileEntityDo(worldIn, pos, AdjustablePulleyTileEntity::neighborChanged);
-
+
boolean previouslyPowered = state.get(POWERED);
if (previouslyPowered != worldIn.isBlockPowered(pos))
worldIn.setBlockState(pos, state.cycle(POWERED), 18);
}
+ @Override
+ public Class getTileEntityClass() {
+ return AdjustablePulleyTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/EncasedBeltBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/EncasedBeltBlock.java
index 306821f55..8805f618e 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/EncasedBeltBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/EncasedBeltBlock.java
@@ -16,7 +16,6 @@ import net.minecraft.state.EnumProperty;
import net.minecraft.state.IProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.Direction.AxisDirection;
@@ -120,6 +119,22 @@ public class EncasedBeltBlock extends RotatedPillarKineticBlock {
return stateIn.with(PART, part).with(CONNECTED_ALONG_FIRST_COORDINATE, connectionAlongFirst);
}
+ @Override
+ public BlockState updateAfterWrenched(BlockState newState, ItemUseContext context) {
+ Blocks.AIR.getDefaultState().updateNeighbors(context.getWorld(), context.getPos(), 1);
+ Axis axis = newState.get(AXIS);
+ newState = getDefaultState().with(AXIS, axis);
+ for (Direction facing : Direction.values()) {
+ if (facing.getAxis() == axis)
+ continue;
+ BlockPos pos = context.getPos();
+ BlockPos offset = pos.offset(facing);
+ newState = updatePostPlacement(newState, facing, context.getWorld().getBlockState(offset), context.getWorld(),
+ pos, offset); }
+ newState.updateNeighbors(context.getWorld(), context.getPos(), 1 | 2);
+ return newState;
+ }
+
@Override
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
return face.getAxis() == state.get(AXIS);
@@ -169,19 +184,6 @@ public class EncasedBeltBlock extends RotatedPillarKineticBlock {
return new EncasedShaftTileEntity();
}
- @Override
- public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
- Axis axis = state.get(AXIS);
- boolean connectionAlongFirst = state.get(CONNECTED_ALONG_FIRST_COORDINATE);
- Axis connectionAxis = connectionAlongFirst ? (axis == Axis.X ? Axis.Y : Axis.X)
- : (axis == Axis.Z ? Axis.Y : Axis.Z);
-
- if (context.getFace().getAxis() == connectionAxis)
- return ActionResultType.PASS;
-
- return super.onWrenched(state, context);
- }
-
@Override
protected boolean hasStaticPart() {
return true;
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/GearshiftBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/GearshiftBlock.java
index 6d7708c4e..f9e6eb079 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/GearshiftBlock.java
+++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/encased/GearshiftBlock.java
@@ -1,7 +1,7 @@
package com.simibubi.create.modules.contraptions.relays.encased;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.modules.contraptions.RotationPropagator;
-import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.relays.gearbox.GearshiftTileEntity;
import net.minecraft.block.Block;
@@ -17,7 +17,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
-public class GearshiftBlock extends EncasedShaftBlock {
+public class GearshiftBlock extends EncasedShaftBlock implements ITE {
public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
@@ -51,7 +51,7 @@ public class GearshiftBlock extends EncasedShaftBlock {
boolean previouslyPowered = state.get(POWERED);
if (previouslyPowered != worldIn.isBlockPowered(pos)) {
- RotationPropagator.handleRemoved(worldIn, pos, (KineticTileEntity) worldIn.getTileEntity(pos));
+ withTileEntityDo(worldIn, pos, te -> RotationPropagator.handleRemoved(worldIn, pos, te));
worldIn.setBlockState(pos, state.cycle(POWERED), 2);
}
}
@@ -60,4 +60,9 @@ public class GearshiftBlock extends EncasedShaftBlock {
return super.hasShaftTowards(world, pos, state, face);
}
+ @Override
+ public Class getTileEntityClass() {
+ return GearshiftTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockBlock.java b/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockBlock.java
index 04b525503..c22c599a2 100644
--- a/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockBlock.java
+++ b/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockBlock.java
@@ -6,10 +6,11 @@ import java.util.List;
import com.simibubi.create.foundation.block.IHaveCustomBlockModel;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
+import net.minecraft.block.Blocks;
import net.minecraft.block.FourWayBlock;
import net.minecraft.block.PaneBlock;
import net.minecraft.block.material.Material;
@@ -45,7 +46,7 @@ import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class WindowInABlockBlock extends PaneBlock
- implements IWithTileEntity, IHaveNoBlockItem, IHaveCustomBlockModel {
+ implements ITE, IHaveNoBlockItem, IHaveCustomBlockModel {
public WindowInABlockBlock() {
super(Properties.create(Material.ROCK));
@@ -69,32 +70,32 @@ public class WindowInABlockBlock extends PaneBlock
Vec3d start = player.getEyePosition(1);
Vec3d end = start.add(player.getLookVec().scale(player.getAttribute(PlayerEntity.REACH_DISTANCE).getValue()));
- BlockRayTraceResult target = world
- .rayTraceBlocks(new RayTraceContext(start, end, BlockMode.OUTLINE, FluidMode.NONE, player));
+ BlockRayTraceResult target =
+ world.rayTraceBlocks(new RayTraceContext(start, end, BlockMode.OUTLINE, FluidMode.NONE, player));
if (target == null || target.getHitVec() == null)
return super.removedByPlayer(state, world, pos, player, willHarvest, fluid);
- WindowInABlockTileEntity tileEntity = getTileEntity(world, pos);
- if (tileEntity == null)
- return super.removedByPlayer(state, world, pos, player, willHarvest, fluid);
- BlockState windowBlock = tileEntity.getWindowBlock();
- for (AxisAlignedBB bb : windowBlock.getShape(world, pos).toBoundingBoxList()) {
- if (bb.grow(.1d).contains(target.getHitVec().subtract(new Vec3d(pos)))) {
- windowBlock.getBlock().onBlockHarvested(world, pos, windowBlock, player);
- Block.spawnDrops(windowBlock, world, pos, null, player, player.getHeldItemMainhand());
- BlockState partialBlock = tileEntity.getPartialBlock();
- world.setBlockState(pos, partialBlock);
- for (Direction d : Direction.values()) {
- BlockPos offset = pos.offset(d);
- BlockState otherState = world.getBlockState(offset);
- partialBlock = partialBlock.updatePostPlacement(d, otherState, world, pos, offset);
- world.notifyBlockUpdate(offset, otherState, otherState, 2);
- }
- if (partialBlock != world.getBlockState(pos))
+ try {
+ WindowInABlockTileEntity tileEntity = getTileEntity(world, pos);
+ BlockState windowBlock = tileEntity.getWindowBlock();
+ for (AxisAlignedBB bb : windowBlock.getShape(world, pos).toBoundingBoxList()) {
+ if (bb.grow(.1d).contains(target.getHitVec().subtract(new Vec3d(pos)))) {
+ windowBlock.getBlock().onBlockHarvested(world, pos, windowBlock, player);
+ Block.spawnDrops(windowBlock, world, pos, null, player, player.getHeldItemMainhand());
+ BlockState partialBlock = tileEntity.getPartialBlock();
world.setBlockState(pos, partialBlock);
- return false;
+ for (Direction d : Direction.values()) {
+ BlockPos offset = pos.offset(d);
+ BlockState otherState = world.getBlockState(offset);
+ partialBlock = partialBlock.updatePostPlacement(d, otherState, world, pos, offset);
+ world.notifyBlockUpdate(offset, otherState, otherState, 2);
+ }
+ if (partialBlock != world.getBlockState(pos))
+ world.setBlockState(pos, partialBlock);
+ return false;
+ }
}
- }
+ } catch (TileEntityException e) {}
return super.removedByPlayer(state, world, pos, player, willHarvest, fluid);
}
@@ -111,49 +112,36 @@ public class WindowInABlockBlock extends PaneBlock
@Override
public boolean propagatesSkylightDown(BlockState state, IBlockReader reader, BlockPos pos) {
- WindowInABlockTileEntity tileEntity = getTileEntity(reader, pos);
- if (tileEntity == null)
- return super.propagatesSkylightDown(state, reader, pos);
- return tileEntity.getPartialBlock().propagatesSkylightDown(reader, pos);
+ return getSurroundingBlockState(reader, pos).propagatesSkylightDown(reader, pos);
}
@Override
public boolean collisionExtendsVertically(BlockState state, IBlockReader world, BlockPos pos,
Entity collidingEntity) {
- WindowInABlockTileEntity tileEntity = getTileEntity(world, pos);
- if (tileEntity == null)
- return false;
- return tileEntity.getPartialBlock().collisionExtendsVertically(world, pos, collidingEntity);
+ return getSurroundingBlockState(world, pos).collisionExtendsVertically(world, pos, collidingEntity);
}
@Override
public float getBlockHardness(BlockState blockState, IBlockReader worldIn, BlockPos pos) {
- WindowInABlockTileEntity tileEntity = getTileEntity(worldIn, pos);
- if (tileEntity == null)
- return 0;
- return tileEntity.getPartialBlock().getBlockHardness(worldIn, pos);
+ return getSurroundingBlockState(worldIn, pos).getBlockHardness(worldIn, pos);
}
@Override
public float getExplosionResistance(BlockState state, IWorldReader world, BlockPos pos, Entity exploder,
Explosion explosion) {
- WindowInABlockTileEntity tileEntity = getTileEntity(world, pos);
- if (tileEntity == null)
- return 0;
- return tileEntity.getPartialBlock().getExplosionResistance(world, pos, exploder, explosion);
+ return getSurroundingBlockState(world, pos).getExplosionResistance(world, pos, exploder, explosion);
}
@Override
public ItemStack getPickBlock(BlockState state, RayTraceResult target, IBlockReader world, BlockPos pos,
PlayerEntity player) {
- WindowInABlockTileEntity tileEntity = getTileEntity(world, pos);
- if (tileEntity == null)
- return ItemStack.EMPTY;
- for (AxisAlignedBB bb : tileEntity.getWindowBlock().getShape(world, pos).toBoundingBoxList()) {
+ BlockState window = getWindowBlockState(world, pos);
+ for (AxisAlignedBB bb : window.getShape(world, pos).toBoundingBoxList()) {
if (bb.grow(.1d).contains(target.getHitVec().subtract(new Vec3d(pos))))
- return tileEntity.getWindowBlock().getPickBlock(target, world, pos, player);
+ return window.getPickBlock(target, world, pos, player);
}
- return tileEntity.getPartialBlock().getPickBlock(target, world, pos, player);
+ BlockState surrounding = getSurroundingBlockState(world, pos);
+ return surrounding.getPickBlock(target, world, pos, player);
}
@Override
@@ -170,11 +158,8 @@ public class WindowInABlockBlock extends PaneBlock
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
- WindowInABlockTileEntity tileEntity = getTileEntity(worldIn, pos);
- if (tileEntity == null)
- return makeCuboidShape(7, 0, 7, 9, 16, 9);
- VoxelShape shape1 = tileEntity.getPartialBlock().getShape(worldIn, pos, context);
- VoxelShape shape2 = tileEntity.getWindowBlock().getShape(worldIn, pos, context);
+ VoxelShape shape1 = getSurroundingBlockState(worldIn, pos).getShape(worldIn, pos, context);
+ VoxelShape shape2 = getWindowBlockState(worldIn, pos).getShape(worldIn, pos, context);
return VoxelShapes.or(shape1, shape2);
}
@@ -187,10 +172,7 @@ public class WindowInABlockBlock extends PaneBlock
@SuppressWarnings("deprecation")
@Override
public MaterialColor getMaterialColor(BlockState state, IBlockReader worldIn, BlockPos pos) {
- WindowInABlockTileEntity tileEntity = getTileEntity(worldIn, pos);
- if (tileEntity == null)
- return MaterialColor.AIR;
- return tileEntity.getPartialBlock().getMaterialColor(worldIn, pos);
+ return getSurroundingBlockState(worldIn, pos).getMaterialColor(worldIn, pos);
}
@Override
@@ -199,8 +181,8 @@ public class WindowInABlockBlock extends PaneBlock
withTileEntityDo(worldIn, currentPos, te -> {
te.setWindowBlock(
te.getWindowBlock().updatePostPlacement(facing, facingState, worldIn, currentPos, facingPos));
- BlockState blockState = te.getPartialBlock().updatePostPlacement(facing, facingState, worldIn, currentPos,
- facingPos);
+ BlockState blockState =
+ te.getPartialBlock().updatePostPlacement(facing, facingState, worldIn, currentPos, facingPos);
if (blockState.getBlock() instanceof FourWayBlock) {
for (BooleanProperty side : Arrays.asList(FourWayBlock.EAST, FourWayBlock.NORTH, FourWayBlock.SOUTH,
FourWayBlock.WEST))
@@ -213,6 +195,20 @@ public class WindowInABlockBlock extends PaneBlock
return stateIn;
}
+ private BlockState getSurroundingBlockState(IBlockReader reader, BlockPos pos) {
+ try {
+ return getTileEntity(reader, pos).getPartialBlock();
+ } catch (TileEntityException e) {}
+ return Blocks.AIR.getDefaultState();
+ }
+
+ private BlockState getWindowBlockState(IBlockReader reader, BlockPos pos) {
+ try {
+ return getTileEntity(reader, pos).getWindowBlock();
+ } catch (TileEntityException e) {}
+ return Blocks.AIR.getDefaultState();
+ }
+
@OnlyIn(Dist.CLIENT)
public boolean isSideInvisible(BlockState state, BlockState adjacentBlockState, Direction side) {
return false;
@@ -224,4 +220,9 @@ public class WindowInABlockBlock extends PaneBlock
return new WindowInABlockModel(original);
}
+ @Override
+ public Class getTileEntityClass() {
+ return WindowInABlockTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockModel.java b/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockModel.java
index 24a55a9b9..9dfdf136b 100644
--- a/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockModel.java
+++ b/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockModel.java
@@ -28,6 +28,7 @@ import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraftforge.client.MinecraftForgeClient;
+import net.minecraftforge.client.model.data.EmptyModelData;
import net.minecraftforge.client.model.data.IModelData;
public class WindowInABlockModel extends WrappedBakedModel {
@@ -50,13 +51,20 @@ public class WindowInABlockModel extends WrappedBakedModel {
RenderType renderLayer = MinecraftForgeClient.getRenderLayer();
if (RenderTypeLookup.canRenderInLayer(partialState, renderLayer) && partialState != null) {
- quads.addAll(dispatcher.getModelForState(partialState).getQuads(partialState, side, rand, data));
+ IBakedModel partialModel = dispatcher.getModelForState(partialState);
+ IModelData modelData = partialModel.getModelData(Minecraft.getInstance().world, position, partialState,
+ EmptyModelData.INSTANCE);
+ quads.addAll(partialModel.getQuads(partialState, side, rand, modelData));
}
if (RenderTypeLookup.canRenderInLayer(windowState, renderLayer) && windowState != null) {
- quads.addAll(dispatcher.getModelForState(windowState).getQuads(windowState, side, rand, data).stream()
+ IBakedModel windowModel = dispatcher.getModelForState(windowState);
+ IModelData modelData =
+ windowModel.getModelData(Minecraft.getInstance().world, position, windowState, EmptyModelData.INSTANCE);
+ quads.addAll(dispatcher.getModelForState(windowState).getQuads(windowState, side, rand, modelData).stream()
.filter(q -> {
Direction face = q.getFace();
- if (face != null && windowState.isSideInvisible(world.getBlockState(position), face))
+ if (face != null
+ && world.getBlockState(position.offset(face)).isSideInvisible(windowState, face))
return false;
if (face != null && Block.hasSolidSide(partialState, world, position, face))
return false;
diff --git a/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowLoggingHandler.java b/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowLoggingHandler.java
new file mode 100644
index 000000000..1ccda0a3e
--- /dev/null
+++ b/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowLoggingHandler.java
@@ -0,0 +1,84 @@
+package com.simibubi.create.modules.curiosities.partialWindows;
+
+import java.util.Arrays;
+
+import com.simibubi.create.AllBlockTags;
+import com.simibubi.create.AllBlocks;
+import com.simibubi.create.config.AllConfigs;
+
+import net.minecraft.block.BlockState;
+import net.minecraft.block.FourWayBlock;
+import net.minecraft.block.WallBlock;
+import net.minecraft.item.BlockItem;
+import net.minecraft.item.ItemStack;
+import net.minecraft.state.BooleanProperty;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import net.minecraftforge.common.Tags;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock;
+import net.minecraftforge.eventbus.api.Event.Result;
+import net.minecraftforge.eventbus.api.SubscribeEvent;
+import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
+import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
+
+@EventBusSubscriber(bus = Bus.FORGE)
+public class WindowLoggingHandler {
+
+ @SubscribeEvent
+ public static void rightClickPartialBlockWithPaneMakesItWindowLogged(RightClickBlock event) {
+ if (event.getUseItem() == Result.DENY)
+ return;
+ if (event.getEntityLiving().isSneaking())
+ return;
+ if (!event.getPlayer().isAllowEdit())
+ return;
+ if (!AllConfigs.SERVER.curiosities.allowGlassPanesInPartialBlocks.get())
+ return;
+
+ ItemStack stack = event.getItemStack();
+ if (stack.isEmpty())
+ return;
+ if (!(stack.getItem() instanceof BlockItem))
+ return;
+ BlockItem item = (BlockItem) stack.getItem();
+ if (!item.isIn(Tags.Items.GLASS_PANES)
+ && (item.getBlock() == null || !item.getBlock().isIn(Tags.Blocks.GLASS_PANES)))
+ return;
+
+ BlockPos pos = event.getPos();
+ World world = event.getWorld();
+ BlockState blockState = world.getBlockState(pos);
+ if (!AllBlockTags.WINDOWABLE.matches(blockState))
+ return;
+ if (AllBlocks.WINDOW_IN_A_BLOCK.typeOf(blockState))
+ return;
+
+ BlockState defaultState = AllBlocks.WINDOW_IN_A_BLOCK.get().getDefaultState();
+ world.setBlockState(pos, defaultState);
+ TileEntity te = world.getTileEntity(pos);
+ if (te != null && te instanceof WindowInABlockTileEntity) {
+ WindowInABlockTileEntity wte = (WindowInABlockTileEntity) te;
+ wte.setWindowBlock(item.getBlock().getDefaultState());
+ wte.updateWindowConnections();
+
+ if (blockState.getBlock() instanceof FourWayBlock) {
+ for (BooleanProperty side : Arrays.asList(FourWayBlock.EAST, FourWayBlock.NORTH, FourWayBlock.SOUTH,
+ FourWayBlock.WEST))
+ blockState = blockState.with(side, false);
+ }
+ if (blockState.getBlock() instanceof WallBlock)
+ blockState = blockState.with(WallBlock.UP, true);
+
+ wte.setPartialBlock(blockState);
+ wte.requestModelDataUpdate();
+
+ if (!event.getPlayer().isCreative())
+ stack.shrink(1);
+ event.getPlayer().swingArm(event.getHand());
+ }
+
+ event.setCanceled(true);
+ }
+
+}
diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java
index d50bd5948..b80f3c34b 100644
--- a/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java
+++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java
@@ -9,7 +9,6 @@ import com.simibubi.create.modules.curiosities.tools.SandPaperItemRenderer.SandP
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.enchantment.Enchantment;
-import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
@@ -111,7 +110,7 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel {
@Override
public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) {
- return enchantment == Enchantments.FORTUNE || super.canApplyAtEnchantingTable(stack, enchantment);
+ return super.canApplyAtEnchantingTable(stack, enchantment);
}
@Override
diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperPolishingRecipe.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperPolishingRecipe.java
index d4cf72eb3..af430fff7 100644
--- a/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperPolishingRecipe.java
+++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperPolishingRecipe.java
@@ -1,25 +1,18 @@
package com.simibubi.create.modules.curiosities.tools;
-import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
import com.simibubi.create.AllRecipes;
-import com.simibubi.create.config.AllConfigs;
import com.simibubi.create.modules.contraptions.processing.ProcessingIngredient;
import com.simibubi.create.modules.contraptions.processing.ProcessingOutput;
import com.simibubi.create.modules.contraptions.processing.ProcessingRecipe;
import com.simibubi.create.modules.curiosities.tools.SandPaperPolishingRecipe.SandPaperInv;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.enchantment.Enchantments;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.DamageSource;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.Vec3d;
-import net.minecraft.world.Explosion.Mode;
import net.minecraft.world.World;
import net.minecraftforge.items.ItemStackHandler;
import net.minecraftforge.items.wrapper.RecipeWrapper;
@@ -34,46 +27,13 @@ public class SandPaperPolishingRecipe extends ProcessingRecipe {
}
public static boolean canPolish(World world, ItemStack stack) {
- return (stack.isDamageable() && isPolishingEnabled()) || !getMatchingRecipes(world, stack).isEmpty();
- }
-
- public static Boolean isPolishingEnabled() {
- return AllConfigs.SERVER.curiosities.enableSandPaperToolPolishing.get();
+ return !getMatchingRecipes(world, stack).isEmpty();
}
public static ItemStack applyPolish(World world, Vec3d position, ItemStack stack, ItemStack sandPaperStack) {
List> matchingRecipes = getMatchingRecipes(world, stack);
if (!matchingRecipes.isEmpty())
return matchingRecipes.get(0).getCraftingResult(new SandPaperInv(stack)).copy();
- if (stack.isDamageable() && isPolishingEnabled()) {
-
- stack.setDamage(stack.getDamage() / 2);
-
- int fortuneLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, sandPaperStack);
- float chanceToPunish = (float) (1 / Math.pow(2, fortuneLevel + 1));
-
- if (world.rand.nextFloat() > chanceToPunish)
- return stack;
-
- if (stack.isEnchanted()) {
- Map enchantments = EnchantmentHelper.getEnchantments(stack);
- ArrayList list = new ArrayList<>(enchantments.keySet());
- Enchantment randomKey = list.get(world.rand.nextInt(list.size()));
- int level = enchantments.get(randomKey);
- if (level <= 1)
- enchantments.remove(randomKey);
- else
- enchantments.put(randomKey, level - 1);
- EnchantmentHelper.setEnchantments(enchantments, stack);
- if (randomKey.isCurse())
- if (!world.isRemote)
- world.createExplosion(null, CURSED_POLISHING, position.x, position.y, position.z, 2, true,
- Mode.DESTROY);
- } else {
- stack = ItemStack.EMPTY;
- }
- }
-
return stack;
}
diff --git a/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java b/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java
index bb2e95de9..73d854d12 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java
@@ -12,7 +12,7 @@ import com.simibubi.create.foundation.utility.ColorHelper;
import com.simibubi.create.modules.contraptions.components.fan.SplashingRecipe;
import com.simibubi.create.modules.contraptions.processing.ProcessingRecipe;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
-import com.simibubi.create.modules.contraptions.relays.belt.TransportedItemStack;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.TransportedItemStack;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/AttachedLogisticalBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/AttachedLogisticalBlock.java
similarity index 98%
rename from src/main/java/com/simibubi/create/modules/logistics/block/belts/AttachedLogisticalBlock.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/AttachedLogisticalBlock.java
index 74b3ec7c5..a15cacd5d 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/AttachedLogisticalBlock.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/AttachedLogisticalBlock.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.logistics.block.belts;
+package com.simibubi.create.modules.logistics.block;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkBlock.java
index e95cf3f52..9acde6df9 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkBlock.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkBlock.java
@@ -1,15 +1,17 @@
package com.simibubi.create.modules.logistics.block;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.block.ProperDirectionalBlock;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.foundation.utility.Iterate;
+import com.simibubi.create.modules.contraptions.IWrenchable;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
-import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
+import net.minecraft.item.ItemUseContext;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@@ -25,7 +27,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
-public class RedstoneLinkBlock extends ProperDirectionalBlock {
+public class RedstoneLinkBlock extends ProperDirectionalBlock implements ITE, IWrenchable {
public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
public static final BooleanProperty RECEIVER = BooleanProperty.create("receiver");
@@ -72,11 +74,7 @@ public class RedstoneLinkBlock extends ProperDirectionalBlock {
if (previouslyPowered != shouldPower) {
worldIn.setBlockState(pos, state.cycle(POWERED), 2);
-
- RedstoneLinkTileEntity te = (RedstoneLinkTileEntity) worldIn.getTileEntity(pos);
- if (te == null)
- return;
- te.transmit(!previouslyPowered);
+ withTileEntityDo(worldIn, pos, te -> te.transmit(!previouslyPowered));
}
}
@@ -118,27 +116,35 @@ public class RedstoneLinkBlock extends ProperDirectionalBlock {
@Override
public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn,
BlockRayTraceResult hit) {
-
- if (player.isSneaking()) {
- RedstoneLinkTileEntity te = (RedstoneLinkTileEntity) worldIn.getTileEntity(pos);
- if (te == null)
- return ActionResultType.PASS;
-
- if (!worldIn.isRemote) {
- Boolean wasReceiver = state.get(RECEIVER);
- boolean blockPowered = worldIn.isBlockPowered(pos);
- worldIn.setBlockState(pos, state.cycle(RECEIVER).with(POWERED, blockPowered), 3);
- if (wasReceiver) {
- te.transmit(worldIn.isBlockPowered(pos));
- } else
- te.transmit(false);
- }
- return ActionResultType.SUCCESS;
- }
-
+ if (player.isSneaking())
+ return toggleMode(state, worldIn, pos);
return ActionResultType.PASS;
}
+ public ActionResultType toggleMode(BlockState state, World worldIn, BlockPos pos) {
+ if (worldIn.isRemote)
+ return ActionResultType.SUCCESS;
+ try {
+ RedstoneLinkTileEntity te = getTileEntity(worldIn, pos);
+ Boolean wasReceiver = state.get(RECEIVER);
+ boolean blockPowered = worldIn.isBlockPowered(pos);
+ worldIn.setBlockState(pos, state.cycle(RECEIVER).with(POWERED, blockPowered), 3);
+ if (wasReceiver) {
+ te.transmit(worldIn.isBlockPowered(pos));
+ } else
+ te.transmit(false);
+ return ActionResultType.SUCCESS;
+ } catch (TileEntityException e) {}
+ return ActionResultType.PASS;
+ }
+
+ @Override
+ public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
+ if (toggleMode(state, context.getWorld(), context.getPos()) == ActionResultType.SUCCESS)
+ return ActionResultType.SUCCESS;
+ return IWrenchable.super.onWrenched(state, context);
+ }
+
@Override
public boolean canConnectRedstone(BlockState state, IBlockReader world, BlockPos pos, Direction side) {
return side != null;
@@ -169,8 +175,8 @@ public class RedstoneLinkBlock extends ProperDirectionalBlock {
}
@Override
- public PushReaction getPushReaction(BlockState state) {
- return PushReaction.BLOCK;
+ public Class getTileEntityClass() {
+ return RedstoneLinkTileEntity.class;
}
}
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkTileEntity.java
index a55bc7fcb..5a8ae8120 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkTileEntity.java
@@ -6,14 +6,15 @@ import java.util.List;
import org.apache.commons.lang3.tuple.Pair;
+import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.foundation.behaviour.ValueBoxTransform;
import com.simibubi.create.foundation.behaviour.base.SmartTileEntity;
import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour;
import com.simibubi.create.foundation.behaviour.linked.LinkBehaviour;
+import net.minecraft.block.BlockState;
import net.minecraft.nbt.CompoundNBT;
-import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
@@ -97,9 +98,13 @@ public class RedstoneLinkTileEntity extends SmartTileEntity {
return;
if (world.isRemote)
return;
- if (receivedSignal != getBlockState().get(POWERED)) {
- world.setBlockState(pos, getBlockState().cycle(POWERED));
- Direction attachedFace = getBlockState().get(BlockStateProperties.FACING).getOpposite();
+ BlockState blockState = getBlockState();
+ if (!AllBlocks.REDSTONE_BRIDGE.typeOf(blockState))
+ return;
+
+ if (receivedSignal != blockState.get(POWERED)) {
+ world.setBlockState(pos, blockState.cycle(POWERED));
+ Direction attachedFace = blockState.get(RedstoneLinkBlock.FACING).getOpposite();
BlockPos attachedPos = pos.offset(attachedFace);
world.notifyNeighbors(attachedPos, world.getBlockState(attachedPos).getBlock());
return;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/StockswitchBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/StockswitchBlock.java
index 85c7eec40..7ce85f87e 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/StockswitchBlock.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/StockswitchBlock.java
@@ -1,5 +1,6 @@
package com.simibubi.create.modules.logistics.block;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.gui.ScreenOpener;
import net.minecraft.block.Block;
@@ -7,6 +8,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.HorizontalBlock;
import net.minecraft.block.material.PushReaction;
+import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.IntegerProperty;
@@ -25,7 +27,7 @@ import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.items.CapabilityItemHandler;
-public class StockswitchBlock extends HorizontalBlock {
+public class StockswitchBlock extends HorizontalBlock implements ITE {
public static final IntegerProperty INDICATOR = IntegerProperty.create("indicator", 0, 6);
@@ -37,7 +39,7 @@ public class StockswitchBlock extends HorizontalBlock {
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
updateObservedInventory(state, worldIn, pos);
}
-
+
@Override
public void onNeighborChange(BlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor) {
if (world.isRemote())
@@ -48,10 +50,7 @@ public class StockswitchBlock extends HorizontalBlock {
}
private void updateObservedInventory(BlockState state, IWorldReader world, BlockPos pos) {
- StockswitchTileEntity te = (StockswitchTileEntity) world.getTileEntity(pos);
- if (te == null)
- return;
- te.updateCurrentLevel();
+ withTileEntityDo(world, pos, StockswitchTileEntity::updateCurrentLevel);
}
private boolean isObserving(BlockState state, BlockPos pos, BlockPos observing) {
@@ -70,8 +69,10 @@ public class StockswitchBlock extends HorizontalBlock {
@Override
public int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side) {
- StockswitchTileEntity te = (StockswitchTileEntity) blockAccess.getTileEntity(pos);
- return te == null || !te.powered ? 0 : 15;
+ try {
+ return getTileEntity(blockAccess, pos).powered ? 15 : 0;
+ } catch (TileEntityException e) {}
+ return 0;
}
@Override
@@ -83,9 +84,8 @@ public class StockswitchBlock extends HorizontalBlock {
@Override
public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn,
BlockRayTraceResult hit) {
- DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> {
- displayScreen((StockswitchTileEntity) worldIn.getTileEntity(pos));
- });
+ if (player instanceof ClientPlayerEntity)
+ DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> withTileEntityDo(worldIn, pos, this::displayScreen));
return ActionResultType.SUCCESS;
}
@@ -133,10 +133,15 @@ public class StockswitchBlock extends HorizontalBlock {
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new StockswitchTileEntity();
}
-
+
@Override
public PushReaction getPushReaction(BlockState state) {
return PushReaction.BLOCK;
}
+ @Override
+ public Class getTileEntityClass() {
+ return StockswitchTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltAttachableLogisticalBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltAttachableLogisticalBlock.java
index f53da057a..4ed8d622b 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltAttachableLogisticalBlock.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltAttachableLogisticalBlock.java
@@ -10,7 +10,8 @@ import com.simibubi.create.foundation.behaviour.inventory.SingleTargetAutoExtrac
import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.BeltAttachmentState;
import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.IBeltAttachment;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
-import com.simibubi.create.modules.contraptions.relays.belt.TransportedItemStack;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.TransportedItemStack;
+import com.simibubi.create.modules.logistics.block.AttachedLogisticalBlock;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverBlock.java
similarity index 96%
rename from src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverBlock.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverBlock.java
index e787ab24b..fe6b02aed 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverBlock.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverBlock.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.logistics.block.belts;
+package com.simibubi.create.modules.logistics.block.belts.observer;
import java.util.Arrays;
import java.util.List;
@@ -7,7 +7,7 @@ import java.util.Random;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour;
import com.simibubi.create.foundation.behaviour.filtering.FilteringBehaviour;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.modules.contraptions.IWrenchable;
@@ -17,7 +17,7 @@ import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Part;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Slope;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
-import com.simibubi.create.modules.contraptions.relays.belt.TransportedItemStack;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.TransportedItemStack;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@@ -48,7 +48,7 @@ import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
public class BeltObserverBlock extends HorizontalBlock
- implements IWithTileEntity, IBeltAttachment, IWrenchable {
+ implements ITE, IBeltAttachment, IWrenchable {
public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
public static final BooleanProperty BELT = BooleanProperty.create("belt");
@@ -303,4 +303,9 @@ public class BeltObserverBlock extends HorizontalBlock
}
}
+ @Override
+ public Class getTileEntityClass() {
+ return BeltObserverTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverFilterSlot.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverFilterSlot.java
similarity index 91%
rename from src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverFilterSlot.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverFilterSlot.java
index cb8a12023..c96762cf7 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverFilterSlot.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverFilterSlot.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.logistics.block.belts;
+package com.simibubi.create.modules.logistics.block.belts.observer;
import com.simibubi.create.foundation.behaviour.ValueBoxTransform;
import com.simibubi.create.foundation.utility.AngleHelper;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverTileEntity.java
similarity index 76%
rename from src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverTileEntity.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverTileEntity.java
index aecb0662a..9afed749e 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverTileEntity.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.logistics.block.belts;
+package com.simibubi.create.modules.logistics.block.belts.observer;
import java.util.List;
@@ -6,11 +6,12 @@ import com.simibubi.create.AllTileEntities;
import com.simibubi.create.foundation.behaviour.base.SmartTileEntity;
import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour;
import com.simibubi.create.foundation.behaviour.filtering.FilteringBehaviour;
+import com.simibubi.create.modules.contraptions.relays.belt.BeltHelper;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
-import com.simibubi.create.modules.logistics.block.belts.BeltObserverBlock.Mode;
+import com.simibubi.create.modules.logistics.block.belts.observer.BeltObserverBlock.Mode;
import net.minecraft.nbt.CompoundNBT;
-import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
public class BeltObserverTileEntity extends SmartTileEntity {
@@ -43,16 +44,16 @@ public class BeltObserverTileEntity extends SmartTileEntity {
if (getBlockState().get(BeltObserverBlock.MODE) != Mode.DETECT)
return;
- TileEntity tileEntity =
- world.getTileEntity(pos.offset(getBlockState().get(BeltObserverBlock.HORIZONTAL_FACING)));
- if (!(tileEntity instanceof BeltTileEntity))
+ BlockPos targetPos = pos.offset(getBlockState().get(BeltObserverBlock.HORIZONTAL_FACING));
+
+ BeltTileEntity beltTE = BeltHelper.getSegmentTE(world, targetPos);
+ if (beltTE == null)
return;
- BeltTileEntity belt = (BeltTileEntity) tileEntity;
- BeltTileEntity controllerTE = belt.getControllerTE();
+ BeltTileEntity controllerTE = beltTE.getControllerTE();
if (controllerTE == null)
return;
- controllerTE.getInventory().forEachWithin(belt.index + .5f, .45f, stack -> {
+ controllerTE.getInventory().forEachWithin(beltTE.index + .5f, .45f, stack -> {
if (filtering.test(stack.stack) && turnOffTicks != 6) {
world.setBlockState(pos, getBlockState().with(BeltObserverBlock.POWERED, true));
world.notifyNeighborsOfStateChange(pos, getBlockState().getBlock());
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverTileEntityRenderer.java
similarity index 93%
rename from src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverTileEntityRenderer.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverTileEntityRenderer.java
index d2d44197f..b552e2332 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltObserverTileEntityRenderer.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/observer/BeltObserverTileEntityRenderer.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.logistics.block.belts;
+package com.simibubi.create.modules.logistics.block.belts.observer;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.behaviour.filtering.FilteringRenderer;
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelBlock.java
similarity index 95%
rename from src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelBlock.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelBlock.java
index 50b1561eb..af335eb28 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelBlock.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelBlock.java
@@ -1,13 +1,14 @@
-package com.simibubi.create.modules.contraptions.relays.belt;
+package com.simibubi.create.modules.logistics.block.belts.tunnel;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.simibubi.create.AllBlocks;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.modules.contraptions.IWrenchable;
+import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Slope;
import net.minecraft.block.Block;
@@ -33,7 +34,7 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
-public class BeltTunnelBlock extends Block implements IWithTileEntity, IWrenchable {
+public class BeltTunnelBlock extends Block implements ITE, IWrenchable {
public static final IProperty SHAPE = EnumProperty.create("shape", Shape.class);
public static final IProperty HORIZONTAL_AXIS = BlockStateProperties.HORIZONTAL_AXIS;
@@ -239,4 +240,9 @@ public class BeltTunnelBlock extends Block implements IWithTileEntity getTileEntityClass() {
+ return BeltTunnelTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelShapes.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelShapes.java
similarity index 96%
rename from src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelShapes.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelShapes.java
index e74c06610..1e6f51f76 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelShapes.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelShapes.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.contraptions.relays.belt;
+package com.simibubi.create.modules.logistics.block.belts.tunnel;
import static net.minecraft.block.Block.makeCuboidShape;
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelTileEntity.java
similarity index 97%
rename from src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelTileEntity.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelTileEntity.java
index 4cc980ca4..6fa975b40 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelTileEntity.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.contraptions.relays.belt;
+package com.simibubi.create.modules.logistics.block.belts.tunnel;
import java.util.HashMap;
import java.util.LinkedList;
@@ -10,7 +10,7 @@ import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.foundation.block.SyncedTileEntity;
import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue;
-import com.simibubi.create.modules.contraptions.relays.belt.BeltTunnelBlock.Shape;
+import com.simibubi.create.modules.logistics.block.belts.tunnel.BeltTunnelBlock.Shape;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack;
diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelTileEntityRenderer.java
similarity index 98%
rename from src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelTileEntityRenderer.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelTileEntityRenderer.java
index df4218c6f..99d623c12 100644
--- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTunnelTileEntityRenderer.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/tunnel/BeltTunnelTileEntityRenderer.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.contraptions.relays.belt;
+package com.simibubi.create.modules.logistics.block.belts.tunnel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorBlock.java
index c389bd418..e7124b30e 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorBlock.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorBlock.java
@@ -6,7 +6,7 @@ import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.modules.contraptions.components.contraptions.IPortableBlock;
import com.simibubi.create.modules.contraptions.components.contraptions.MovementBehaviour;
-import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock;
+import com.simibubi.create.modules.logistics.block.AttachedLogisticalBlock;
import com.simibubi.create.modules.logistics.block.belts.BeltAttachableLogisticalBlock;
import net.minecraft.block.Block;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorMovementBehaviour.java b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorMovementBehaviour.java
index 3662aab8c..bcb4b888d 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorMovementBehaviour.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorMovementBehaviour.java
@@ -4,7 +4,7 @@ import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.modules.contraptions.components.contraptions.MovementBehaviour;
import com.simibubi.create.modules.contraptions.components.contraptions.MovementContext;
-import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock;
+import com.simibubi.create.modules.logistics.block.AttachedLogisticalBlock;
import com.simibubi.create.modules.logistics.item.filter.FilterItem;
import net.minecraft.entity.Entity;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorSlots.java b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorSlots.java
index bc80c142c..072efd9d9 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorSlots.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorSlots.java
@@ -5,7 +5,7 @@ import static net.minecraft.block.HorizontalBlock.HORIZONTAL_FACING;
import com.simibubi.create.foundation.behaviour.ValueBoxTransform;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.VecHelper;
-import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock;
+import com.simibubi.create.modules.logistics.block.AttachedLogisticalBlock;
import com.simibubi.create.modules.logistics.block.transposer.TransposerBlock;
import net.minecraft.block.BlockState;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorTileEntity.java
index 7ae8a0532..e3c25a760 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorTileEntity.java
@@ -14,7 +14,7 @@ import com.simibubi.create.foundation.behaviour.inventory.SingleTargetAutoExtrac
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
-import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock;
+import com.simibubi.create.modules.logistics.block.AttachedLogisticalBlock;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/LinkedExtractorBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/LinkedExtractorBlock.java
index baf693e43..afaa439c2 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/LinkedExtractorBlock.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/LinkedExtractorBlock.java
@@ -5,7 +5,7 @@ import org.apache.commons.lang3.tuple.Pair;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.VecHelper;
-import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock;
+import com.simibubi.create.modules.logistics.block.AttachedLogisticalBlock;
import net.minecraft.block.BlockState;
import net.minecraft.tileentity.TileEntity;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelBlock.java
similarity index 90%
rename from src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelBlock.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelBlock.java
index 5f3f70f1a..4022e3c7b 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelBlock.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelBlock.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.logistics.block.belts;
+package com.simibubi.create.modules.logistics.block.funnel;
import java.util.Arrays;
import java.util.Collections;
@@ -7,14 +7,16 @@ import java.util.List;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour;
import com.simibubi.create.foundation.behaviour.filtering.FilteringBehaviour;
-import com.simibubi.create.foundation.block.IWithTileEntity;
+import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.contraptions.components.contraptions.IPortableBlock;
import com.simibubi.create.modules.contraptions.components.contraptions.MovementBehaviour;
import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.BeltAttachmentState;
import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.IBeltAttachment;
+import com.simibubi.create.modules.contraptions.relays.belt.BeltHelper;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
-import com.simibubi.create.modules.contraptions.relays.belt.TransportedItemStack;
+import com.simibubi.create.modules.contraptions.relays.belt.transport.TransportedItemStack;
+import com.simibubi.create.modules.logistics.block.AttachedLogisticalBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@@ -37,7 +39,8 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
-public class FunnelBlock extends AttachedLogisticalBlock implements IBeltAttachment, IWithTileEntity, IPortableBlock {
+public class FunnelBlock extends AttachedLogisticalBlock
+ implements IBeltAttachment, ITE, IPortableBlock {
public static final BooleanProperty BELT = BooleanProperty.create("belt");
public static final MovementBehaviour MOVEMENT = new FunnelMovementBehaviour();
@@ -124,17 +127,18 @@ public class FunnelBlock extends AttachedLogisticalBlock implements IBeltAttachm
@Override
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
onAttachmentPlaced(worldIn, pos, state);
+ if (worldIn.isRemote)
+ return;
if (isOnBelt(worldIn, pos)) {
- TileEntity te = worldIn.getTileEntity(pos.down());
- if (!(te instanceof BeltTileEntity))
+ BeltTileEntity belt = BeltHelper.getSegmentTE(worldIn, pos.down());
+ if (belt == null)
return;
- BeltTileEntity belt = (BeltTileEntity) te;
+
BeltTileEntity controllerBelt = belt.getControllerTE();
if (controllerBelt == null)
return;
- if (worldIn.isRemote)
- return;
+
controllerBelt.getInventory().forEachWithin(belt.index + .5f, .55f, (transportedItemStack) -> {
controllerBelt.getInventory().eject(transportedItemStack);
return Collections.emptyList();
@@ -200,7 +204,7 @@ public class FunnelBlock extends AttachedLogisticalBlock implements IBeltAttachm
public boolean process(BeltTileEntity belt, TransportedItemStack transported, BeltAttachmentState state) {
TileEntity te = belt.getWorld().getTileEntity(state.attachmentPos);
- if (te == null || !(te instanceof FunnelTileEntity))
+ if (!(te instanceof FunnelTileEntity))
return false;
FunnelTileEntity funnel = (FunnelTileEntity) te;
ItemStack stack = funnel.tryToInsert(transported.stack);
@@ -220,4 +224,9 @@ public class FunnelBlock extends AttachedLogisticalBlock implements IBeltAttachm
return MOVEMENT;
}
+ @Override
+ public Class getTileEntityClass() {
+ return FunnelTileEntity.class;
+ }
+
}
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelFilterSlot.java b/src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelFilterSlot.java
similarity index 92%
rename from src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelFilterSlot.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelFilterSlot.java
index b3d4d3867..798dd94b0 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelFilterSlot.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelFilterSlot.java
@@ -1,8 +1,9 @@
-package com.simibubi.create.modules.logistics.block.belts;
+package com.simibubi.create.modules.logistics.block.funnel;
import com.simibubi.create.foundation.behaviour.ValueBoxTransform;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.VecHelper;
+import com.simibubi.create.modules.logistics.block.AttachedLogisticalBlock;
import com.simibubi.create.modules.logistics.block.extractor.ExtractorBlock;
import net.minecraft.block.BlockState;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelMovementBehaviour.java b/src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelMovementBehaviour.java
similarity index 96%
rename from src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelMovementBehaviour.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelMovementBehaviour.java
index 0831d5b57..fbc52571d 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelMovementBehaviour.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelMovementBehaviour.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.logistics.block.belts;
+package com.simibubi.create.modules.logistics.block.funnel;
import java.util.List;
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelTileEntity.java
similarity index 93%
rename from src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelTileEntity.java
rename to src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelTileEntity.java
index 6f8122117..730899144 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/funnel/FunnelTileEntity.java
@@ -1,4 +1,4 @@
-package com.simibubi.create.modules.logistics.block.belts;
+package com.simibubi.create.modules.logistics.block.funnel;
import java.util.List;
@@ -11,14 +11,15 @@ import com.simibubi.create.foundation.behaviour.filtering.FilteringBehaviour;
import com.simibubi.create.foundation.behaviour.inventory.InsertingBehaviour;
import com.simibubi.create.foundation.behaviour.inventory.InventoryManagementBehaviour.Attachments;
import com.simibubi.create.foundation.utility.VecHelper;
+import com.simibubi.create.modules.contraptions.relays.belt.BeltHelper;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
+import com.simibubi.create.modules.logistics.block.AttachedLogisticalBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.particles.ItemParticleData;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.state.properties.BlockStateProperties;
-import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
@@ -103,10 +104,7 @@ public class FunnelTileEntity extends SmartTileEntity {
BlockPos targetPos = pos.offset(AttachedLogisticalBlock.getBlockFacing(getBlockState()));
if (!AllBlocks.BELT.typeOf(world.getBlockState(targetPos)))
return null;
- TileEntity te = world.getTileEntity(targetPos);
- if (te == null || !(te instanceof BeltTileEntity))
- return null;
- return (BeltTileEntity) te;
+ return BeltHelper.getSegmentTE(world, targetPos);
}
public void spawnParticles(ItemStack stack) {
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateBlock.java
index 9bc4660d6..af1789a24 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateBlock.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateBlock.java
@@ -76,10 +76,15 @@ public class FlexcrateBlock extends ProperDirectionalBlock {
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
if (oldState.getBlock() != state.getBlock() && state.hasTileEntity() && state.get(DOUBLE)
&& state.get(FACING).getAxisDirection() == AxisDirection.POSITIVE) {
- FlexcrateTileEntity te = (FlexcrateTileEntity) worldIn.getTileEntity(pos);
+ TileEntity tileEntity = worldIn.getTileEntity(pos);
+ if (!(tileEntity instanceof FlexcrateTileEntity))
+ return;
+
+ FlexcrateTileEntity te = (FlexcrateTileEntity) tileEntity;
FlexcrateTileEntity other = te.getOtherCrate();
if (other == null)
return;
+
for (int slot = 0; slot < other.inventory.getSlots(); slot++) {
te.inventory.setStackInSlot(slot, other.inventory.getStackInSlot(slot));
other.inventory.setStackInSlot(slot, ItemStack.EMPTY);
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateContainer.java b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateContainer.java
index 5d3425a29..43378fa62 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateContainer.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateContainer.java
@@ -10,6 +10,7 @@ import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
+import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.items.SlotItemHandler;
public class FlexcrateContainer extends Container {
@@ -21,10 +22,13 @@ public class FlexcrateContainer extends Container {
public FlexcrateContainer(int id, PlayerInventory inv, PacketBuffer extraData) {
super(AllContainers.FLEXCRATE.type, id);
ClientWorld world = Minecraft.getInstance().world;
- this.te = (FlexcrateTileEntity) world.getTileEntity(extraData.readBlockPos());
- this.te.handleUpdateTag(extraData.readCompoundTag());
+ TileEntity tileEntity = world.getTileEntity(extraData.readBlockPos());
this.playerInventory = inv;
- init();
+ if (tileEntity instanceof FlexcrateTileEntity) {
+ this.te = (FlexcrateTileEntity) tileEntity;
+ this.te.handleUpdateTag(extraData.readCompoundTag());
+ init();
+ }
}
public FlexcrateContainer(int id, PlayerInventory inv, FlexcrateTileEntity te) {
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateTileEntity.java
index 7b5fd303a..7de4030b2 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateTileEntity.java
@@ -86,11 +86,15 @@ public class FlexcrateTileEntity extends SyncedTileEntity implements INamedConta
}
public FlexcrateTileEntity getMainCrate() {
- if (isDoubleCrate() && getFacing().getAxisDirection() == AxisDirection.NEGATIVE)
+ if (isSecondaryCrate())
return getOtherCrate();
return this;
}
+ public boolean isSecondaryCrate() {
+ return isDoubleCrate() && getFacing().getAxisDirection() == AxisDirection.NEGATIVE;
+ }
+
public FlexcrateTileEntity getOtherCrate() {
if (!AllBlocks.FLEXCRATE.typeOf(getBlockState()))
return null;
@@ -158,20 +162,16 @@ public class FlexcrateTileEntity extends SyncedTileEntity implements INamedConta
@Override
public CompoundNBT write(CompoundNBT compound) {
- if (getMainCrate() == this) {
- compound.putBoolean("Main", true);
- compound.putInt("AllowedAmount", allowedAmount);
- compound.put("Inventory", inventory.serializeNBT());
- }
+ compound.putBoolean("Main", true);
+ compound.putInt("AllowedAmount", allowedAmount);
+ compound.put("Inventory", inventory.serializeNBT());
return super.write(compound);
}
@Override
public void read(CompoundNBT compound) {
- if (compound.contains("Main")) {
- allowedAmount = compound.getInt("AllowedAmount");
- inventory.deserializeNBT(compound.getCompound("Inventory"));
- }
+ allowedAmount = compound.getInt("AllowedAmount");
+ inventory.deserializeNBT(compound.getCompound("Inventory"));
super.read(compound);
}
@@ -193,8 +193,11 @@ public class FlexcrateTileEntity extends SyncedTileEntity implements INamedConta
@Override
public LazyOptional getCapability(Capability capability, Direction facing) {
- if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
- return getMainCrate().invHandler.cast();
+ if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) {
+ FlexcrateTileEntity mainCrate = getMainCrate();
+ if (mainCrate != null && mainCrate.invHandler.isPresent())
+ return mainCrate.invHandler.cast();
+ }
return super.getCapability(capability, facing);
}
diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/transposer/TransposerTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/block/transposer/TransposerTileEntity.java
index 59644b9ff..e291f0b9c 100644
--- a/src/main/java/com/simibubi/create/modules/logistics/block/transposer/TransposerTileEntity.java
+++ b/src/main/java/com/simibubi/create/modules/logistics/block/transposer/TransposerTileEntity.java
@@ -9,7 +9,7 @@ import com.simibubi.create.foundation.behaviour.inventory.InsertingBehaviour;
import com.simibubi.create.foundation.behaviour.inventory.InventoryManagementBehaviour.Attachments;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
-import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock;
+import com.simibubi.create.modules.logistics.block.AttachedLogisticalBlock;
import com.simibubi.create.modules.logistics.block.extractor.ExtractorTileEntity;
import net.minecraft.item.ItemStack;
diff --git a/src/main/java/com/simibubi/create/modules/palettes/CTGlassPaneBlock.java b/src/main/java/com/simibubi/create/modules/palettes/CTGlassPaneBlock.java
index 9144d60ec..420f25fba 100644
--- a/src/main/java/com/simibubi/create/modules/palettes/CTGlassPaneBlock.java
+++ b/src/main/java/com/simibubi/create/modules/palettes/CTGlassPaneBlock.java
@@ -4,10 +4,12 @@ import com.simibubi.create.foundation.block.connected.CTSpriteShiftEntry;
import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour;
import com.simibubi.create.foundation.block.connected.IHaveConnectedTextures;
import com.simibubi.create.foundation.block.connected.StandardCTBehaviour;
+import com.simibubi.create.modules.curiosities.partialWindows.WindowInABlockTileEntity;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.AxisDirection;
import net.minecraft.util.math.BlockPos;
@@ -33,8 +35,6 @@ public class CTGlassPaneBlock extends GlassPaneBlock implements IHaveConnectedTe
return adjacentBlockState == state;
return super.isSideInvisible(state, adjacentBlockState, side);
}
-
-
protected ConnectedTextureBehaviour createBehaviour() {
for (CTSpriteShiftEntry ctSpriteShiftEntry : ctGlass.getBehaviour().getAllCTShifts()) {
@@ -42,6 +42,15 @@ public class CTGlassPaneBlock extends GlassPaneBlock implements IHaveConnectedTe
@Override
public boolean connectsTo(BlockState state, BlockState other, ILightReader reader,
BlockPos pos, BlockPos otherPos, Direction face) {
+
+ TileEntity te = reader.getTileEntity(pos);
+ if (te instanceof WindowInABlockTileEntity)
+ state = ((WindowInABlockTileEntity) te).getWindowBlock();
+
+ TileEntity otherTE = reader.getTileEntity(otherPos);
+ if (otherTE instanceof WindowInABlockTileEntity)
+ other = ((WindowInABlockTileEntity) otherTE).getWindowBlock();
+
return state.getBlock() == other.getBlock();
}
diff --git a/src/main/java/com/simibubi/create/modules/schematics/ServerSchematicLoader.java b/src/main/java/com/simibubi/create/modules/schematics/ServerSchematicLoader.java
index af7c9afc7..2470cf8a3 100644
--- a/src/main/java/com/simibubi/create/modules/schematics/ServerSchematicLoader.java
+++ b/src/main/java/com/simibubi/create/modules/schematics/ServerSchematicLoader.java
@@ -26,6 +26,7 @@ import com.simibubi.create.modules.schematics.item.SchematicItem;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TranslationTextComponent;
@@ -105,8 +106,8 @@ public class ServerSchematicLoader {
try {
// Validate Referenced Block
- BlockState blockState = dimPos.world.getBlockState(dimPos.pos);
- if (!AllBlocks.SCHEMATIC_TABLE.typeOf(blockState))
+ SchematicTableTileEntity table = getTable(dimPos);
+ if (table == null)
return;
// Delete schematic with same name
@@ -131,8 +132,7 @@ public class ServerSchematicLoader {
activeUploads.put(playerSchematicId, new SchematicUploadEntry(writer, size, dimPos));
// Notify Tile Entity
- SchematicTableTileEntity tileEntity = (SchematicTableTileEntity) dimPos.world.getTileEntity(dimPos.pos);
- tileEntity.startUpload(schematic);
+ table.startUpload(schematic);
} catch (IOException e) {
Create.logger.error("Exception Thrown when starting Upload: " + playerSchematicId);
@@ -167,14 +167,12 @@ public class ServerSchematicLoader {
try {
entry.stream.write(data);
entry.idleTime = 0;
- BlockState blockState = entry.tablePos.world.getBlockState(entry.tablePos.pos);
- if (!AllBlocks.SCHEMATIC_TABLE.typeOf(blockState))
- return;
- SchematicTableTileEntity tileEntity =
- (SchematicTableTileEntity) entry.tablePos.world.getTileEntity(entry.tablePos.pos);
- tileEntity.uploadingProgress = (float) ((double) entry.bytesUploaded / entry.totalBytes);
- tileEntity.sendUpdate = true;
+ SchematicTableTileEntity table = getTable(entry.tablePos);
+ if (table == null)
+ return;
+ table.uploadingProgress = (float) ((double) entry.bytesUploaded / entry.totalBytes);
+ table.sendUpdate = true;
} catch (IOException e) {
Create.logger.error("Exception Thrown when uploading Schematic: " + playerSchematicId);
@@ -203,12 +201,17 @@ public class ServerSchematicLoader {
if (dimpos == null)
return;
- BlockState blockState = dimpos.world.getBlockState(dimpos.pos);
- if (!AllBlocks.SCHEMATIC_TABLE.typeOf(blockState))
- return;
+ SchematicTableTileEntity table = getTable(dimpos);
+ if (table != null)
+ table.finishUpload();
+ }
- SchematicTableTileEntity tileEntity = (SchematicTableTileEntity) dimpos.world.getTileEntity(dimpos.pos);
- tileEntity.finishUpload();
+ public SchematicTableTileEntity getTable(DimensionPos dimpos) {
+ TileEntity te = dimpos.world.getTileEntity(dimpos.pos);
+ if (!(te instanceof SchematicTableTileEntity))
+ return null;
+ SchematicTableTileEntity table = (SchematicTableTileEntity) te;
+ return table;
}
public void handleFinishedUpload(ServerPlayerEntity player, String schematic) {
@@ -227,11 +230,12 @@ public class ServerSchematicLoader {
if (!AllBlocks.SCHEMATIC_TABLE.typeOf(blockState))
return;
- SchematicTableTileEntity tileEntity = (SchematicTableTileEntity) dimpos.world.getTileEntity(dimpos.pos);
- tileEntity.finishUpload();
- tileEntity.inventory.setStackInSlot(0, ItemStack.EMPTY);
- tileEntity.inventory.setStackInSlot(1,
- SchematicItem.create(schematic, player.getName().getFormattedText()));
+ SchematicTableTileEntity table = getTable(dimpos);
+ if (table == null)
+ return;
+ table.finishUpload();
+ table.inventory.setStackInSlot(0, ItemStack.EMPTY);
+ table.inventory.setStackInSlot(1, SchematicItem.create(schematic, player.getName().getFormattedText()));
} catch (IOException e) {
Create.logger.error("Exception Thrown when finishing Upload: " + playerSchematicId);
diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableBlock.java b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableBlock.java
index d012260b5..67aa38774 100644
--- a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableBlock.java
+++ b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableBlock.java
@@ -1,5 +1,7 @@
package com.simibubi.create.modules.schematics.block;
+import com.simibubi.create.foundation.block.ITE;
+import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.utility.AllShapes;
import net.minecraft.block.Block;
@@ -9,7 +11,6 @@ import net.minecraft.block.HorizontalBlock;
import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
-import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.tileentity.TileEntity;
@@ -23,7 +24,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraftforge.fml.network.NetworkHooks;
-public class SchematicTableBlock extends HorizontalBlock {
+public class SchematicTableBlock extends HorizontalBlock implements ITE {
public SchematicTableBlock() {
super(Properties.from(Blocks.OAK_PLANKS));
@@ -34,7 +35,7 @@ public class SchematicTableBlock extends HorizontalBlock {
builder.add(HORIZONTAL_FACING);
super.fillStateContainer(builder);
}
-
+
@Override
public PushReaction getPushReaction(BlockState state) {
return PushReaction.BLOCK;
@@ -46,7 +47,8 @@ public class SchematicTableBlock extends HorizontalBlock {
}
@Override
- public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
+ public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos,
+ ISelectionContext context) {
return AllShapes.TABLE_POLE_SHAPE;
}
@@ -63,15 +65,12 @@ public class SchematicTableBlock extends HorizontalBlock {
@Override
public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn,
BlockRayTraceResult hit) {
+ if (worldIn.isRemote)
+ return ActionResultType.SUCCESS;
- if (worldIn.isRemote) {
- return ActionResultType.SUCCESS;
- } else {
- SchematicTableTileEntity te = (SchematicTableTileEntity) worldIn.getTileEntity(pos);
- if (te != null)
- NetworkHooks.openGui((ServerPlayerEntity) player, te, te::sendToContainer);
- return ActionResultType.SUCCESS;
- }
+ withTileEntityDo(worldIn, pos,
+ te -> NetworkHooks.openGui((ServerPlayerEntity) player, te, te::sendToContainer));
+ return ActionResultType.SUCCESS;
}
@Override
@@ -81,19 +80,16 @@ public class SchematicTableBlock extends HorizontalBlock {
@Override
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
- if (worldIn.getTileEntity(pos) == null)
+ if (!state.hasTileEntity() || state.getBlock() == newState.getBlock())
return;
- SchematicTableTileEntity te = (SchematicTableTileEntity) worldIn.getTileEntity(pos);
- for (int slot = 0; slot < te.inventory.getSlots(); slot++) {
- InventoryHelper.spawnItemStack(worldIn, pos.getX(), pos.getY(), pos.getZ(),
- te.inventory.getStackInSlot(slot));
- }
-
- if (state.hasTileEntity() && state.getBlock() != newState.getBlock()) {
- worldIn.removeTileEntity(pos);
- }
+ withTileEntityDo(worldIn, pos, te -> ItemHelper.dropContents(worldIn, pos, te.inventory));
+ worldIn.removeTileEntity(pos);
+ }
+ @Override
+ public Class getTileEntityClass() {
+ return SchematicTableTileEntity.class;
}
}
diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableContainer.java b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableContainer.java
index f9e9edde4..1157ab797 100644
--- a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableContainer.java
+++ b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableContainer.java
@@ -11,6 +11,7 @@ import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
+import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.items.SlotItemHandler;
public class SchematicTableContainer extends Container {
@@ -24,9 +25,12 @@ public class SchematicTableContainer extends Container {
super(AllContainers.SCHEMATIC_TABLE.type, id);
player = inv.player;
ClientWorld world = Minecraft.getInstance().world;
- this.te = (SchematicTableTileEntity) world.getTileEntity(extraData.readBlockPos());
- this.te.handleUpdateTag(extraData.readCompoundTag());
- init();
+ TileEntity tileEntity = world.getTileEntity(extraData.readBlockPos());
+ if (tileEntity instanceof SchematicTableTileEntity) {
+ this.te = (SchematicTableTileEntity) tileEntity;
+ this.te.handleUpdateTag(extraData.readCompoundTag());
+ init();
+ }
}
public SchematicTableContainer(int id, PlayerInventory inv, SchematicTableTileEntity te) {
diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonBlock.java b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonBlock.java
index 0a43bf660..5bded53d7 100644
--- a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonBlock.java
+++ b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonBlock.java
@@ -1,6 +1,7 @@
package com.simibubi.create.modules.schematics.block;
-import com.simibubi.create.AllItems;
+import com.simibubi.create.foundation.block.ITE;
+import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.utility.AllShapes;
import net.minecraft.block.Block;
@@ -9,8 +10,6 @@ import net.minecraft.block.Blocks;
import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
-import net.minecraft.inventory.InventoryHelper;
-import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
@@ -23,7 +22,7 @@ import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import net.minecraftforge.fml.network.NetworkHooks;
-public class SchematicannonBlock extends Block {
+public class SchematicannonBlock extends Block implements ITE {
public SchematicannonBlock() {
super(Properties.from(Blocks.DISPENSER));
@@ -38,7 +37,7 @@ public class SchematicannonBlock extends Block {
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new SchematicannonTileEntity();
}
-
+
@Override
public PushReaction getPushReaction(BlockState state) {
return PushReaction.BLOCK;
@@ -51,44 +50,32 @@ public class SchematicannonBlock extends Block {
@Override
public void onNeighborChange(BlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor) {
- ((SchematicannonTileEntity) world.getTileEntity(pos)).findInventories();
- super.onNeighborChange(state, world, pos, neighbor);
+ withTileEntityDo(world, pos, SchematicannonTileEntity::findInventories);
}
@Override
public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn,
BlockRayTraceResult hit) {
+ if (worldIn.isRemote)
+ return ActionResultType.SUCCESS;
- if (worldIn.isRemote) {
- return ActionResultType.SUCCESS;
- } else {
- SchematicannonTileEntity te = (SchematicannonTileEntity) worldIn.getTileEntity(pos);
- if (te != null)
- if (AllItems.BLUEPRINT.typeOf(player.getHeldItemMainhand())
- && te.inventory.getStackInSlot(0).isEmpty()) {
- te.inventory.setStackInSlot(0, player.getHeldItemMainhand());
- player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
- }
- NetworkHooks.openGui((ServerPlayerEntity) player, te, te::sendToContainer);
- return ActionResultType.SUCCESS;
- }
+ withTileEntityDo(worldIn, pos,
+ te -> NetworkHooks.openGui((ServerPlayerEntity) player, te, te::sendToContainer));
+ return ActionResultType.SUCCESS;
}
@Override
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
- if (worldIn.getTileEntity(pos) == null)
+ if (!state.hasTileEntity() || state.getBlock() == newState.getBlock())
return;
- SchematicannonTileEntity te = (SchematicannonTileEntity) worldIn.getTileEntity(pos);
- for (int slot = 0; slot < te.inventory.getSlots(); slot++) {
- InventoryHelper.spawnItemStack(worldIn, pos.getX(), pos.getY(), pos.getZ(),
- te.inventory.getStackInSlot(slot));
- }
-
- if (state.hasTileEntity() && state.getBlock() != newState.getBlock()) {
- worldIn.removeTileEntity(pos);
- }
+ withTileEntityDo(worldIn, pos, te -> ItemHelper.dropContents(worldIn, pos, te.inventory));
+ worldIn.removeTileEntity(pos);
+ }
+ @Override
+ public Class getTileEntityClass() {
+ return SchematicannonTileEntity.class;
}
}
diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonContainer.java b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonContainer.java
index 3f0edc182..d38c33ce7 100644
--- a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonContainer.java
+++ b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonContainer.java
@@ -10,6 +10,7 @@ import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
+import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.items.SlotItemHandler;
public class SchematicannonContainer extends Container {
@@ -21,9 +22,12 @@ public class SchematicannonContainer extends Container {
super(AllContainers.SCHEMATICANNON.type, id);
player = inv.player;
ClientWorld world = Minecraft.getInstance().world;
- this.te = (SchematicannonTileEntity) world.getTileEntity(buffer.readBlockPos());
- this.te.handleUpdateTag(buffer.readCompoundTag());
- init();
+ TileEntity tileEntity = world.getTileEntity(buffer.readBlockPos());
+ if (tileEntity instanceof SchematicannonTileEntity) {
+ this.te = (SchematicannonTileEntity) tileEntity;
+ this.te.handleUpdateTag(buffer.readCompoundTag());
+ init();
+ }
}
public SchematicannonContainer(int id, PlayerInventory inv, SchematicannonTileEntity te) {
@@ -34,7 +38,6 @@ public class SchematicannonContainer extends Container {
}
protected void init() {
-
int x = 20;
int y = 0;
diff --git a/src/main/java/com/simibubi/create/modules/schematics/packet/ConfigureSchematicannonPacket.java b/src/main/java/com/simibubi/create/modules/schematics/packet/ConfigureSchematicannonPacket.java
index 70937df2d..52d8f1e89 100644
--- a/src/main/java/com/simibubi/create/modules/schematics/packet/ConfigureSchematicannonPacket.java
+++ b/src/main/java/com/simibubi/create/modules/schematics/packet/ConfigureSchematicannonPacket.java
@@ -50,48 +50,45 @@ public class ConfigureSchematicannonPacket extends SimplePacketBase {
context.get().enqueueWork(() -> {
ServerPlayerEntity player = context.get().getSender();
World world = player.world;
-
- if (world == null || world.getTileEntity(pos) == null)
+ if (world == null)
return;
+
TileEntity tileEntity = world.getTileEntity(pos);
- if (tileEntity instanceof SchematicannonTileEntity) {
+ if (!(tileEntity instanceof SchematicannonTileEntity))
+ return;
- SchematicannonTileEntity te = (SchematicannonTileEntity) tileEntity;
- switch (option) {
- case DONT_REPLACE:
- case REPLACE_ANY:
- case REPLACE_EMPTY:
- case REPLACE_SOLID:
- te.replaceMode = option.ordinal();
- break;
- case SKIP_MISSING:
- te.skipMissing = set;
- break;
- case SKIP_TILES:
- te.replaceTileEntities = set;
- break;
-
- case PLAY:
- te.state = State.RUNNING;
- te.statusMsg = "running";
- break;
- case PAUSE:
- te.state = State.PAUSED;
- te.statusMsg = "paused";
- break;
- case STOP:
- te.state = State.STOPPED;
- te.statusMsg = "stopped";
- break;
- default:
- break;
- }
-
- te.sendUpdate = true;
+ SchematicannonTileEntity te = (SchematicannonTileEntity) tileEntity;
+ switch (option) {
+ case DONT_REPLACE:
+ case REPLACE_ANY:
+ case REPLACE_EMPTY:
+ case REPLACE_SOLID:
+ te.replaceMode = option.ordinal();
+ break;
+ case SKIP_MISSING:
+ te.skipMissing = set;
+ break;
+ case SKIP_TILES:
+ te.replaceTileEntities = set;
+ break;
+ case PLAY:
+ te.state = State.RUNNING;
+ te.statusMsg = "running";
+ break;
+ case PAUSE:
+ te.state = State.PAUSED;
+ te.statusMsg = "paused";
+ break;
+ case STOP:
+ te.state = State.STOPPED;
+ te.statusMsg = "stopped";
+ break;
+ default:
+ break;
}
- return;
+ te.sendUpdate = true;
});
context.get().setPacketHandled(true);
}
diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg
new file mode 100644
index 000000000..02bc0b9d4
--- /dev/null
+++ b/src/main/resources/META-INF/accesstransformer.cfg
@@ -0,0 +1 @@
+public net.minecraft.network.play.ServerPlayNetHandler field_147365_f # floatingTickCount
\ No newline at end of file
diff --git a/src/main/resources/assets/create/lang/en_us.json b/src/main/resources/assets/create/lang/en_us.json
index d48040e46..06d09ad10 100644
--- a/src/main/resources/assets/create/lang/en_us.json
+++ b/src/main/resources/assets/create/lang/en_us.json
@@ -635,7 +635,7 @@
"advancement.create:polished_rose_quartz.desc": "Polish Rose Quartz until you can see through it.",
"advancement.create:sand_paper_secret": "9001 Grit Sand Paper",
"advancement.create:sand_paper_secret.desc": "Use your Sand Paper to sand some Sand Paper.",
- "advancement.create:press": "'Bonk!' ",
+ "advancement.create:press": "'Bonk!'",
"advancement.create:press.desc": "Make a Mechanical Press and use it to create some Plates.",
"advancement.create:mixer": "Mixin' it Up",
"advancement.create:mixer.desc": "Create a Mechanical Mixer.",
@@ -943,7 +943,7 @@
"block.create.clockwork_bearing.tooltip": "CLOCKWORK BEARING",
"block.create.clockwork_bearing.tooltip.summary": "An advanced version of the _Mechanical_ _Bearing_ for rotating up to two _clock_ _hands_ according to current _in-game_ _time_.",
"block.create.clockwork_bearing.tooltip.condition1": "When Rotated",
- "block.create.clockwork_bearing.tooltip.behaviour1": "Starts rotating the attached Structure towards the _current_ _hour_. If a second structure is present, it will serve as the _minute_ _hand_.",
+ "block.create.clockwork_bearing.tooltip.behaviour1": "Starts rotating the attached Structure towards the _current_ _hour_. If an independent second structure exists in front of the first one, it will serve as the _minute_ _hand_.",
"block.create.sequenced_gearshift.tooltip": "SEQUENCED GEARSHIFT",
"block.create.sequenced_gearshift.tooltip.summary": "A _programmable_ _utility_ _component,_ which can change its _rotational_ _through-put_ according to up to _5_ _consecutive_ _instructions._ Use this to power Mechanical Bearings, Pistons or Pulleys with more control over timing and speed. May become less precise at higher speeds.",
@@ -1131,7 +1131,7 @@
"block.create.stress_gauge.tooltip.behaviour1": "Indicates a color corresponding to the level of stress. _Over-stressed_ _networks_ will cease to move. Stress can be relieved by adding more _rotational_ _sources_ to the network.",
"tool.create.sand_paper.tooltip": "SAND PAPER",
- "tool.create.sand_paper.tooltip.summary": "A rough paper that can be used to _polish_ _materials_ or sharpen your _tools_.",
+ "tool.create.sand_paper.tooltip.summary": "A rough paper that can be used to _polish_ _materials_. Can be automatically applied using the Deployer.",
"tool.create.sand_paper.tooltip.condition1": "When Used",
"tool.create.sand_paper.tooltip.behaviour1": "Applies polish to items held in the _offhand_ or lying on the _floor_ when _looking_ _at_ _them_",
diff --git a/src/main/resources/assets/create/lang/ja_jp.lang b/src/main/resources/assets/create/lang/ja_jp.lang
new file mode 100644
index 000000000..4b46d256a
--- /dev/null
+++ b/src/main/resources/assets/create/lang/ja_jp.lang
@@ -0,0 +1,1157 @@
+{
+
+ "_comment": "-------------------------] GAME ELEMENTS [------------------------------------------------",
+
+ "item.create.symmetry_wand": "察称ã®æ",
+ "item.create.placement_handgun": "æºåž¯åãããã¯ã¶ãããŒ",
+ "item.create.terrain_zapper": "æºåž¯åã¯ãŒã«ãã·ã§ã€ããŒ",
+ "item.create.tree_fertilizer": "æšã®è¥æ",
+ "item.create.empty_blueprint": "空ã®æŠç¥å³",
+ "item.create.andesite_alloy": "å®å±±å²©åé",
+ "item.create.chromatic_compound": "è²åœ©ã®ååç©",
+ "item.create.shadow_steel": "ã·ã£ããŠã¹ããŒã«",
+ "item.create.blueprint_and_quill": "æŠç¥å³ãšçŸœæ ¹ãã³",
+ "item.create.blueprint": "æŠç¥å³",
+ "item.create.belt_connector": "ã¡ã«ãã«ã«ãã«ã",
+ "item.create.goggles": "ãšã³ãžãã¢ã®ãŽãŒã°ã«",
+ "item.create.filter": "ãã£ã«ã¿ãŒ",
+ "item.create.property_filter": "å±æ§ãã£ã«ã¿ãŒ",
+ "item.create.rose_quartz": "ããŒãºã¯ã©ãŒã",
+ "item.create.polished_rose_quartz": "磚ãããããŒãºã¯ã©ãŒã",
+ "item.create.refined_radiance": "æŽç·ŽãããèŒã",
+ "item.create.iron_sheet": "éæ¿",
+ "item.create.gold_sheet": "éæ¿",
+ "item.create.lapis_plate": "ã©ãã¹éé",
+ "item.create.obsidian_dust": "é»æç³ã®ç²",
+ "item.create.propeller": "ãããã©",
+ "item.create.whisk": "泡ç«ãŠåš",
+ "item.create.brass_hand": "æ",
+ "item.create.slot_cover": "ã¯ã©ãã¿ãŒã¹ãããã«ããŒ",
+ "item.create.zinc_handle": "è¯è³ªãªããŒã«ã®æ",
+ "item.create.flour": "å°éºŠç²",
+ "item.create.dough": "çå°",
+ "item.create.wrench": "ã¬ã³ã",
+ "item.create.deforester": "ããã©ã¬ã¹ã¿ãŒ",
+ "item.create.crushed_iron": "ç ããéé±ç³",
+ "item.create.crushed_gold": "ç ããéé±ç³",
+ "item.create.sand_paper": "çŽããã",
+ "item.create.red_sand_paper": "èµ€ãçŽããã",
+
+ "item.create.brass_ingot": "çé®ã€ã³ãŽãã",
+ "item.create.brass_sheet": "çé®ã·ãŒã",
+ "item.create.brass_nugget": "çé®ãã²ãã",
+ "item.create.crushed_brass": "ç ããçé®",
+ "item.create.zinc_ingot": "äºéæ£",
+ "item.create.zinc_nugget": "äºéå¡",
+ "item.create.crushed_zinc": "ç ããäºé",
+ "item.create.copper_sheet": "é
æ¿",
+ "item.create.copper_ingot": "é
ã€ã³ãŽãã",
+ "item.create.copper_nugget": "é
å¡",
+ "item.create.crushed_copper": "ç ããé
",
+
+ "item.create.electron_tube": "é»å管",
+ "item.create.integrated_circuit": "éç©åè·¯",
+
+ "item.create.blazing_pickaxe": "ãã¬ã€ãžã³ã°ãªãã«ãã·",
+ "item.create.blazing_shovel": "ãã¬ã€ãžã³ã°ãªã·ã£ãã«",
+ "item.create.blazing_axe": "ãã¬ã€ãžã³ã°ãªæ§",
+ "item.create.blazing_sword": "ãã¬ã€ãžã³ã°ãªã¯ãªãŒããŒ",
+
+ "item.create.shadow_steel_pickaxe": "ã·ã£ããŒã¹ããŒã«ã®ãã«ãã·",
+ "item.create.shadow_steel_mattock": "ã·ã£ããŒã¹ããŒã«ã®ã¬ãŒãã³ãããã¯",
+ "item.create.shadow_steel_sword": "ã·ã£ããŒã¹ããŒã«ã®å£",
+
+ "item.create.rose_quartz_pickaxe": "éã¡ããã¯ã©ãŒãã®ãã«ãã·",
+ "item.create.rose_quartz_shovel": "éã¡ããã¯ã©ãŒãã®ã·ã£ãã«",
+ "item.create.rose_quartz_axe": "éã¡ããã¯ã©ãŒãã®æ§",
+ "item.create.rose_quartz_sword": "éã¡ããã¯ã©ãŒãã®å£",
+
+ "block.create.copper_ore": "é
é±ç³",
+ "block.create.copper_block": "é
ãããã¯",
+ "block.create.copper_shingles": "é
ã®ãããæ¿",
+ "block.create.zinc_ore": "äºéé±ç³",
+ "block.create.zinc_block": "äºéãããã¯",
+ "block.create.brass_block": "çé®ãããã¯",
+
+ "block.create.andesite_casing": "å®å±±å²©ã±ãŒã·ã³ã°",
+ "block.create.brass_casing": "çé®ã±ãŒã·ã³ã°",
+ "block.create.copper_casing": "é
ã±ãŒã·ã³ã°",
+
+ "block.create.cogwheel": "æ¯è»",
+ "block.create.large_cogwheel": "倧ããªæ¯è»",
+ "block.create.turntable": "ã¿ãŒã³ããŒãã«",
+ "block.create.gearbox": "ã®ã¢ããã¯ã¹",
+ "block.create.gearshift": "ã®ã¢ã·ãã",
+ "block.create.clutch": "ã¯ã©ãã",
+ "block.create.shaft": "軞",
+ "block.create.encased_belt": "ã±ãŒã¹å
¥ããã«ã",
+ "block.create.encased_shaft": "ã±ãŒã¹å
¥ãã·ã£ãã",
+ "block.create.encased_fan": "ã±ãŒã¹å
¥ããã¡ã³",
+ "block.create.adjustable_pulley": "ã¢ããã°ãã«ãããŒãªãŒ",
+ "block.create.nozzle": "ããºã«",
+ "block.create.hand_crank": "ãã³ãã¯ã©ã³ã¯",
+ "block.create.cuckoo_clock": "鳩æèš",
+ "block.create.creative_motor": "ã¢ãŒã¿ãŒ",
+ "block.create.belt": "ã¡ã«ãã«ã«ãã«ã",
+ "block.create.millstone": "ç³èŒ",
+ "block.create.crushing_wheel": "ç Žç ãã€ãŒã«",
+ "block.create.drill": "ã¡ã«ãã«ã«ããªã«",
+ "block.create.portable_storage_interface": "ããŒã¿ãã«ã¹ãã¬ãŒãžã€ã³ã¿ãŒãã§ã€ã¹",
+ "block.create.harvester": "ã¡ã«ãã«ã«ããŒãã¹ã¿ãŒ",
+ "block.create.saw": "ã¡ã«ãã«ã«éž",
+ "block.create.water_wheel": "æ°Žè»",
+ "block.create.mechanical_press": "ã¡ã«ãã«ã«ãã¬ã¹",
+ "block.create.mechanical_mixer": "ã¡ã«ãã«ã«ãããµãŒ",
+ "block.create.deployer": "ãããã€ã€ãŒ",
+ "block.create.basin": "é¢",
+ "block.create.mechanical_crafter": "ã¡ã«ãã«ã«ã¯ã©ãã¿ãŒ",
+ "block.create.flywheel": "å¢è»",
+ "block.create.furnace_engine": "ããŸã©ãšã³ãžã³",
+ "block.create.speed_gauge": "ã¹ããŒãã¡ãŒã¿ãŒ",
+ "block.create.stress_gauge": "ã¹ãã¬ã¹ã¡ãŒã¿ãŒ",
+ "block.create.cart_assembler": "ã«ãŒãã¢ã»ã³ãã©",
+ "block.create.analog_lever": "ã¢ããã°ã¬ããŒ",
+ "block.create.rotation_speed_controller": "å転é床å¶åŸ¡åš",
+
+ "block.create.sticky_mechanical_piston": "ç²çã¡ã«ãã«ã«ãã¹ãã³",
+ "block.create.mechanical_piston": "ã¡ã«ãã«ã«ãã¹ãã³",
+ "block.create.mechanical_piston_head": "ã¡ã«ãã«ã«ãã¹ãã³ããã",
+ "block.create.piston_pole": "ãã¹ãã³å»¶é·ããŒã«",
+ "block.create.mechanical_bearing": "ã¡ã«ãã«ã«ãã¢ãªã³ã°",
+ "block.create.clockwork_bearing": "æèšä»æãã®ãã¢ãªã³ã°",
+ "block.create.rope_pulley": "ããŒãããŒãªãŒ",
+ "block.create.rope": "ããŒã",
+ "block.create.pulley_magnet": "ããŒãªãŒãã°ããã",
+ "block.create.translation_chassis": "ãªãã¢ã·ã£ãŒã·",
+ "block.create.rotation_chassis": "ã©ãžã¢ã«ã·ã£ãŒã·",
+
+ "block.create.contact": "ã¬ããã¹ããŒã³ã³ã³ã¿ã¯ã",
+ "block.create.redstone_bridge": "ã¬ããã¹ããŒã³ãªã³ã¯",
+ "block.create.stockswitch": "åšåº«ã¹ã€ãã",
+ "block.create.flexcrate": "調æŽå¯èœãªã¯ã¬ãŒã",
+ "block.create.extractor": "ãšã¯ã¹ãã©ã¯ã¿ãŒ",
+ "block.create.belt_funnel": "æŒæ",
+ "block.create.linked_extractor": "ãªã³ã¯ããããšã¯ã¹ãã©ã¯ã¿ãŒ",
+ "block.create.transposer": "ãã©ã³ã¹ããŒã¶ãŒ",
+ "block.create.linked_transposer": "ãªã³ã¯ããããã©ã³ã¹ããŒã¶ãŒ",
+ "block.create.pulse_repeater": "ãã«ã¹ãªããŒã¿ãŒ",
+ "block.create.flexpulsepeater": "調æŽå¯èœãªãã«ã¹ãªããŒã¿ãŒ",
+ "block.create.redstone_latch": "ãã¯ãŒãã©ãã",
+ "block.create.toggle_latch": "ãã¯ãŒããã°ã«ã©ãã",
+ "block.create.flexpeater": "調æŽå¯èœãªãªããŒã¿ãŒ",
+ "block.create.entity_detector": "ãã«ããªãã¶ãŒããŒ",
+ "block.create.belt_tunnel": "ã³ã³ãã¢ãã³ãã«",
+ "block.create.sequenced_gearshift": "ã·ãŒã±ã³ã¹ã®ã¢ã·ãã",
+
+ "block.create.tiled_glass": "ã¿ã€ã«ã¬ã©ã¹",
+ "block.create.framed_glass": "倧ããªã¬ã©ã¹çª",
+ "block.create.vertical_framed_glass": "åçŽã¬ã©ã¹çª",
+ "block.create.horizontal_framed_glass": "暪åã¬ã©ã¹çª",
+ "block.create.oak_glass": "ãªãŒã¯ã®çª",
+ "block.create.spruce_glass": "ããã®çª",
+ "block.create.birch_glass": "ã·ã©ã«ãã®çª",
+ "block.create.jungle_glass": "ãžã£ã³ã°ã«ã®çª",
+ "block.create.dark_oak_glass": "ããŒã¯ãªãŒã¯ã®çª",
+ "block.create.acacia_glass": "ã¢ã«ã·ã¢ã®çª",
+ "block.create.iron_glass": "è¯ãããªéã®çª",
+
+ "block.create.tiled_glass_pane": "ã¿ã€ã«ã¬ã©ã¹æ¿",
+ "block.create.framed_glass_pane": "倧ããªã¬ã©ã¹çªæ¿",
+ "block.create.vertical_framed_glass_pane": "åçŽã¬ã©ã¹çªæ¿",
+ "block.create.horizontal_framed_glass_pane": "暪åã¬ã©ã¹çªæ¿",
+ "block.create.oak_glass_pane": "ãªãŒã¯ã®çªæ¿",
+ "block.create.spruce_glass_pane": "ããã®çªæ¿",
+ "block.create.birch_glass_pane": "ã·ã©ã«ãã®çªæ¿",
+ "block.create.jungle_glass_pane": "ãžã£ã³ã°ã«ã®çªæ¿",
+ "block.create.dark_oak_glass_pane": "ããŒã¯ãªãŒã¯ã®çªæ¿",
+ "block.create.acacia_glass_pane": "ã¢ã«ã·ã¢ã®çªæ¿",
+ "block.create.iron_glass_pane": "è¯ãããªéã®çªæ¿",
+
+ "block.create.window_in_a_block": "ãããã¯ã®ã¬ã©ã¹æ¿",
+ "block.create.andesite_bricks": "å®å±±å²©ã¬ã³ã¬",
+ "block.create.andesite_layers": "å±€ç¶å®å±±å²©",
+ "block.create.diorite_bricks": "éç·å²©ã¬ã³ã¬",
+ "block.create.diorite_layers": "å±€ç¶éç·å²©",
+ "block.create.granite_bricks": "è±åŽå²©ã¬ã³ã¬",
+ "block.create.granite_layers": "å±€ç¶è±åŽå²©",
+
+ "block.create.gabbro": "æãã岩",
+ "block.create.gabbro_stairs": "æãã岩ã®é段",
+ "block.create.gabbro_slab": "æãã岩ã®ããŒããããã¯",
+ "block.create.gabbro_wall": "æãã岩ã®å¡",
+ "block.create.polished_gabbro": "磚ãããæãã岩",
+ "block.create.gabbro_bricks": "æãã岩ã¬ã³ã¬",
+ "block.create.gabbro_bricks_stairs": "æãã岩ã¬ã³ã¬ã®é段",
+ "block.create.gabbro_bricks_wall": "æãã岩ã¬ã³ã¬ã®å¡",
+ "block.create.paved_gabbro_bricks": "èè£
ãããæãã岩ã¬ã³ã¬",
+ "block.create.paved_gabbro_bricks_slab": "èè£
ãããæãã岩ã¬ã³ã¬ã®ããŒããããã¯",
+ "block.create.indented_gabbro": "ã€ã³ãã³ããããæãã岩ã¿ã€ã«",
+ "block.create.indented_gabbro_slab": "ã€ã³ãã³ããããæãã岩ã®ããŒããããã¯",
+ "block.create.slightly_mossy_gabbro_bricks": "èãããæãã岩ã¬ã³ã¬",
+ "block.create.mossy_gabbro_bricks": "çãèã£ãæãã岩ã¬ã³ã¬",
+ "block.create.gabbro_layers": "å±€ç¶æãã岩",
+
+ "block.create.weathered_limestone": "颚åããç³ç°å²©",
+ "block.create.weathered_limestone_stairs": "颚åããç³ç°å²©ã®é段",
+ "block.create.weathered_limestone_wall": "颚åããç³ç°å²©ã®å¡",
+ "block.create.weathered_limestone_slab": "颚åããç³ç°å²©ã®ããŒããããã¯",
+ "block.create.polished_weathered_limestone": "磚ããã颚åç³ç°å²©",
+ "block.create.polished_weathered_limestone_slab": "磚ããã颚åç³ç°å²©ã®ããŒããããã¯",
+ "block.create.weathered_limestone_bricks": "颚åããç³ç°å²©ã¬ã³ã¬",
+ "block.create.weathered_limestone_bricks_stairs": "颚åããç³ç°å²©ã¬ã³ã¬ã®é段",
+ "block.create.weathered_limestone_bricks_wall": "颚åããç³ç°å²©ã¬ã³ã¬ã®å¡",
+ "block.create.weathered_limestone_bricks_slab": "颚åããç³ç°å²©ã¬ã³ã¬ã®ããŒããããã¯",
+ "block.create.weathered_limestone_pillar": "颚åããç³ç°å²©ã®æ±",
+ "block.create.weathered_limestone_layers": "å±€ç¶é¢šåããç³ç°å²©",
+
+ "block.create.dolomite_pillar": "èŠç°ç³ã®æ±",
+ "block.create.dolomite": "èŠç°ç³",
+ "block.create.dolomite_stairs": "èŠç°ç³ã®é段",
+ "block.create.dolomite_wall": "èŠç°ç³ã®å¡",
+ "block.create.dolomite_slab": "èŠç°ç³ã®ããŒããããã¯",
+ "block.create.dolomite_bricks": "èŠç°ç³ã¬ã³ã¬",
+ "block.create.dolomite_bricks_wall": "èŠç°ç³ã¬ã³ã¬ã®å¡",
+ "block.create.dolomite_bricks_stairs": "èŠç°ç³ã¬ã³ã¬ã®é段",
+ "block.create.dolomite_bricks_slab": "èŠç°ç³ã¬ã³ã¬ã®ããŒããããã¯",
+ "block.create.polished_dolomite": "磚ãããèŠç°ç³",
+ "block.create.dolomite_layers": "å±€ç¶èŠç°ç³",
+
+ "block.create.limesand": "ç³ç°ç ç ",
+ "block.create.limestone": "ç³ç°å²©",
+ "block.create.limestone_stairs": "ç³ç°å²©ã®é段",
+ "block.create.limestone_slab": "ç³ç°å²©ã®ããŒããããã¯",
+ "block.create.limestone_wall": "ç³ç°å²©ã®å¡",
+ "block.create.limestone_bricks": "ç³ç°å²©ã¬ã³ã¬",
+ "block.create.limestone_bricks_stairs": "ç³ç°å²©ã¬ã³ã¬ã®é段",
+ "block.create.limestone_bricks_slab": "ç³ç°å²©ã¬ã³ã¬ã®ããŒããããã¯",
+ "block.create.limestone_bricks_wall": "ç³ç°å²©ã¬ã³ã¬ã®å¡",
+ "block.create.polished_limestone": "磚ãããç³ç°å²©",
+ "block.create.polished_limestone_slab": "磚ãããç³ç°å²©ã®ããŒããããã¯",
+ "block.create.limestone_pillar": "ç³ç°å²©ã®æ±",
+ "block.create.limestone_layers": "å±€ç¶ç³ç°å²©",
+
+ "block.create.natural_scoria": "èªç¶ã¹ã³ãªã¢",
+ "block.create.scoria": "ã¹ã³ãªã¢",
+ "block.create.scoria_stairs": "ã¹ã³ãªã¢ã®é段",
+ "block.create.scoria_slab": "ã¹ã³ãªã¢ã®ããŒããããã¯",
+ "block.create.scoria_wall": "ã¹ã³ãªã¢ã®å¡",
+ "block.create.scoria_bricks": "ã¹ã³ãªã¢ã¬ã³ã¬",
+ "block.create.polished_scoria": "磚ãããã¹ã³ãªã¢",
+ "block.create.polished_scoria_slab": "磚ãããã¹ã³ãªã¢ã®ããŒããããã¯",
+ "block.create.scoria_pillar": "ã¹ã³ãªã¢ã®æ±",
+ "block.create.scoria_layers": "å±€ç¶ã¹ã³ãªã¢",
+
+ "block.create.dark_scoria": "ããŒã¯ã¹ã³ãªã¢",
+ "block.create.polished_dark_scoria": "磚ãããããŒã¯ã¹ã³ãªã¢",
+ "block.create.dark_scoria_tiles": "ããŒã¯ã¹ã³ãªã¢ã¿ã€ã«",
+ "block.create.dark_scoria_tiles_stairs": "ããŒã¯ã¹ã³ãªã¢ã¿ã€ã«ã®é段",
+ "block.create.dark_scoria_tiles_slab": "ããŒã¯ã¹ã³ãªã¢ã¿ã€ã«ã®ããŒããããã¯",
+ "block.create.dark_scoria_bricks": "ããŒã¯ã¹ã³ãªã¢ã¬ã³ã¬",
+ "block.create.dark_scoria_bricks_stairs": "ããŒã¯ã¹ã³ãªã¢ã¬ã³ã¬ã®é段",
+ "block.create.dark_scoria_bricks_slab": "ããŒã¯ã¹ã³ãªã¢ã¬ã³ã¬ã®ããŒããããã¯",
+ "block.create.dark_scoria_bricks_wall": "ããŒã¯ã¹ã³ãªã¢ã¬ã³ã¬ã®å¡",
+
+ "block.create.schematicannon": "æŠç¥å³ç ²",
+ "block.create.schematic_table": "æŠç¥å³ããŒãã«",
+ "block.create.creative_crate": "æŠç¥å³ç ²ã¯ãªãšãã£ãã£ã¢ãŒ",
+
+ "block.create.cocoa_log": "ã«ã«ãªè±ä»ããžã£ã³ã°ã«ã®åæš",
+
+ "_comment": "-------------------------] UI & MESSAGES [------------------------------------------------",
+
+ "death.attack.create.crush": "%1$s ã¯ç Žç ãã€ãŒã«ã«ãã£ãŠåŠçãããŸãã",
+ "death.attack.create.fan_fire": "%1$s ã¯ç±é¢šã§çŒæ»ãã",
+ "death.attack.create.fan_lava": "%1$s ã¯æº¶å²©ãã¡ã³ã«ãã£ãŠçŒæ»ãã",
+ "death.attack.create.drill": "%1$s ã¯ã¡ã«ãã«ã«ããªã«ã«çªãåºãã£ã",
+ "death.attack.create.saw": "%1$s ã¯ã¡ã«ãã«ã«éžã§ååã«ã«ããããã",
+ "create.block.deployer.damage_source_name": "æªããããã€ã€ãŒ",
+ "death.attack.create.curse_polish": "%1$s ã¯åªãããã¢ã€ãã ã磚ãããšãã",
+ "death.attack.create.cuckoo_clock_explosion": "%1$s ã¯æ¹ããããã鳩æèšã«çç Žããã",
+
+ "create.recipe.crushing": "ç²ç ",
+ "create.recipe.milling": "補ç²",
+ "create.recipe.splashing": "äžæ¬æŽæµ",
+ "create.recipe.splashing.fan": "æµããæ°Žã®åŸãã«ãã¡ã³ã眮ã",
+ "create.recipe.smokingViaFan": "äžæ¬ç»è£œ",
+ "create.recipe.smokingViaFan.fan": "çã®åŸãã«ãã¡ã³ã眮ã",
+ "create.recipe.blastingViaFan": "äžæ¬è£œé¬",
+ "create.recipe.blastingViaFan.fan": "溶岩ã®åŸãã«ãã¡ã³ã眮ã",
+ "create.recipe.pressing": "æŒãã€ã¶ã",
+ "create.recipe.mixing": "æ··å",
+ "create.recipe.packing": "å§çž®",
+ "create.recipe.sawing": "補æ",
+ "create.recipe.mechanical_crafting": "ã¡ã«ãã«ã«ã¯ã©ãã",
+ "create.recipe.block_cutting": "ãããã¯ã«ãã",
+ "create.recipe.blockzapperUpgrade": "æºåž¯åãããã¯ã¶ãããŒ",
+ "create.recipe.sandpaper_polishing": "çŽãããã§ã®ç 磚",
+ "create.recipe.mystery_conversion": "è²åœ©å€æ
",
+ "create.recipe.processing.catalyst": "觊åª",
+ "create.recipe.processing.chance": "%1$s%%ãã£ã³ã¹",
+ "create.recipe.processing.chanceToReturn": "%1$s%%ãã£ã³ã¹ã§æ»ã",
+
+ "create.generic.range": "ç¯å²",
+ "create.generic.radius": "ååŸ",
+ "create.generic.width": "å¹
",
+ "create.generic.height": "é«ã",
+ "create.generic.length": "é·ã",
+ "create.generic.speed": "é床",
+ "create.generic.delay": "é
延",
+ "create.generic.unit.ticks": "ãã£ãã¯",
+ "create.generic.unit.seconds": "ç§",
+ "create.generic.unit.minutes": "å",
+ "create.generic.unit.rpm": "RPM",
+ "create.generic.unit.stress": "su",
+ "create.generic.unit.degrees": "°",
+
+ "create.action.scroll": "ã¹ã¯ããŒã«",
+ "create.action.confirm": "確èª",
+ "create.action.abort": "äžæ¢",
+ "create.action.saveToFile": "ä¿å",
+ "create.action.discard": "æšãŠã",
+
+ "create.keyinfo.toolmenu": "ãã©ãŒã«ã¹ããŒã«ã¡ãã¥ãŒ",
+ "create.keyinfo.scrollup": "ããŠã¹ãã€ãŒã«ã¢ãããã·ãã¥ã¬ãŒã(ãã®äžçã§)",
+ "create.keyinfo.scrolldown": "ããŠã¹ãã€ãŒã«ããŠã³ãã·ãã¥ã¬ãŒã·ã§ã³(ãã®äžçã§)",
+
+ "create.gui.scrollInput.defaultTitle": "ãªãã·ã§ã³ãéžæ:",
+ "create.gui.scrollInput.scrollToModify": "ã¹ã¯ããŒã«ããŠå€æŽ",
+ "create.gui.scrollInput.scrollToAdjustAmount": "ã¹ã¯ããŒã«ããŠéé¡ã調æŽ",
+ "create.gui.scrollInput.scrollToSelect": "ã¹ã¯ããŒã«ããŠéžæ",
+ "create.gui.scrollInput.shiftScrollsFaster": "ã·ãããæŒããŠã¹ã¯ããŒã«ãå é",
+
+ "create.gui.toolmenu.focusKey": "[%1$s] é·æŒãã§ãã©ãŒã«ã¹",
+ "create.gui.toolmenu.cycle": "[SCROLL] ã§ãµã€ã¯ã«",
+
+ "create.gui.symmetryWand.mirrorType": "ãã©ãŒ",
+ "create.gui.symmetryWand.orientation": "ãªãªãšã³ããŒã·ã§ã³",
+ "create.symmetry.mirror.plane": "ç·å¯Ÿç§°",
+ "create.symmetry.mirror.doublePlane": "é·æ¹åœ¢",
+ "create.symmetry.mirror.triplePlane": "å
«è§åœ¢",
+ "create.orientation.orthogonal": "çŽäº€",
+ "create.orientation.diagonal": "察è§ç·",
+ "create.orientation.horizontal": "暪å",
+ "create.orientation.alongZ": "Zã«æ²¿ã",
+ "create.orientation.alongX": "Xã«æ²¿ã",
+
+ "create.gui.blockzapper.title": "æºåž¯åãããã¯ã¶ãããŒ",
+ "create.gui.blockzapper.replaceMode": "眮æã¢ãŒã",
+ "create.gui.blockzapper.searchDiagonal": "察è§ç·ã«ãã©ããŒ",
+ "create.gui.blockzapper.searchFuzzy": "ãããªã¢ã«ã®å¢çãç¡èŠ",
+ "create.gui.blockzapper.range": "ç¯å²",
+ "create.gui.blockzapper.needsUpgradedAmplifier": "å¢å¹
ã¢ããã°ã¬ãŒããå¿
èŠ",
+ "create.gui.blockzapper.patternSection": "æš¡æ§",
+ "create.gui.blockzapper.pattern.solid": "æ·ãè©°ã",
+ "create.gui.blockzapper.pattern.checkered": "ãã§ãã«ãŒããŒã",
+ "create.gui.blockzapper.pattern.inversecheckered": "éãã§ãã«ãŒããŒã",
+ "create.gui.blockzapper.pattern.chance25": "25% ããŒã«",
+ "create.gui.blockzapper.pattern.chance50": "50% ããŒã«",
+ "create.gui.blockzapper.pattern.chance75": "75% ããŒã«",
+
+ "create.gui.terrainzapper.title": "æºåž¯åã¯ãŒã«ãã·ã§ã€ããŒ",
+ "create.gui.terrainzapper.placement": "é
眮",
+ "create.gui.terrainzapper.placement.merged": "å䜵",
+ "create.gui.terrainzapper.placement.attached": "æ·»ãã",
+ "create.gui.terrainzapper.placement.inserted": "æ¿å
¥",
+ "create.gui.terrainzapper.brush": "磚ã",
+ "create.gui.terrainzapper.brush.cuboid": "ç«æ¹äœ",
+ "create.gui.terrainzapper.brush.sphere": "çäœ",
+ "create.gui.terrainzapper.brush.cylinder": "åç",
+ "create.gui.terrainzapper.tool": "ããŒã«",
+ "create.gui.terrainzapper.tool.fill": "åç«",
+ "create.gui.terrainzapper.tool.place": "èšçœ®",
+ "create.gui.terrainzapper.tool.replace": "眮æ",
+ "create.gui.terrainzapper.tool.clear": "åé€",
+ "create.gui.terrainzapper.tool.overlay": "éãã",
+ "create.gui.terrainzapper.tool.flatten": "å¹³åŠå",
+ "create.terrainzapper.shiftRightClickToSet": "ã·ãã-å³ã¯ãªãã¯ã§åœ¢ç¶ãéžæ",
+
+ "create.blockzapper.usingBlock": "䜿çšäž: %1$s",
+ "create.blockzapper.componentUpgrades": "ã³ã³ããŒãã³ãã¢ããã°ã¬ãŒã:",
+ "create.blockzapper.component.body": "ããã£ãŒ",
+ "create.blockzapper.component.amplifier": "å¢å¹
",
+ "create.blockzapper.component.accelerator": "å é",
+ "create.blockzapper.component.retriever": "ã¬ããªãŒããŒ",
+ "create.blockzapper.component.scope": "ç¯å²",
+ "create.blockzapper.componentTier.none": "ç¡ã",
+ "create.blockzapper.componentTier.brass": "çé®",
+ "create.blockzapper.componentTier.chromatic": "è²åœ©",
+ "create.blockzapper.leftClickToSet": "ãããã¯ãã·ãã-å·Šã¯ãªãã¯ã§ãããªã¢ã«ãéžæ",
+ "create.blockzapper.empty": "ãããã¯äžè¶³!",
+
+ "create.contraptions.movement_mode": "移åã¢ãŒã",
+ "create.contraptions.movement_mode.move_place": "åæ¢æã«åžžã«é
眮",
+ "create.contraptions.movement_mode.move_place_returned": "éå§äœçœ®ã®ã¿ã«é
眮",
+ "create.contraptions.movement_mode.move_never_place": "ã¢ã³ã«ãŒãç Žå£ããããšãã«ã®ã¿é
眮",
+ "create.contraptions.movement_mode.rotate_place": "åæ¢æã«åžžã«é
眮",
+ "create.contraptions.movement_mode.rotate_place_returned": "åæè§åºŠä»è¿ã®ã¿é
眮",
+ "create.contraptions.movement_mode.rotate_never_place": "ã¢ã³ã«ãŒãç Žå£ããããšãã«ã®ã¿é
眮",
+
+ "create.logistics.filter": "ãã£ã«ã¿",
+ "create.logistics.firstFrequency": "Freq. #1",
+ "create.logistics.secondFrequency": "Freq. #2",
+
+ "create.gui.goggles.generator_stats": "ãžã§ãã¬ãŒã¿ã®çµ±èš:",
+ "create.gui.goggles.kinetic_stats": "ååã®çµ±èš:",
+ "create.gui.goggles.at_current_speed": "çŸåšã®é床",
+ "create.gui.goggles.base_value": "åºæ¬å€",
+
+ "create.gui.gauge.info_header": "èšåšã®æ
å ±:",
+ "create.gui.speed_gauge.title": "å転é床",
+ "create.gui.stress_gauge.title": "ãããã¯ãŒã¯ã®å¿å",
+ "create.gui.stress_gauge.capacity": "æ®ãã®å®¹é",
+ "create.gui.stress_gauge.overstressed": "è¶
éå¿å",
+ "create.gui.stress_gauge.no_rotation": "å転ãªã",
+
+ "create.gui.contraptions.not_fast_enough": "ãã® %1$s ã¯_ååãª_å転ã_ããŠããªã_ããã§ãã",
+ "create.gui.contraptions.network_overstressed": "ãã®ä»æãã¯_è¶
éå¿å_ã®ããã§ããããã«ãœãŒã¹ãè¿œå ããããã³ã³ããŒãã³ãã«_è² è·ããã_å¿åã®åœ±é¿ã倧ããããŸãã",
+
+ "create.gui.flexcrate.title": "調æŽå¯èœãªã¯ã¬ãŒã",
+ "create.gui.flexcrate.storageSpace": "åçŽã¹ããŒã¹",
+
+ "create.gui.stockswitch.title": "åšåº«ã¹ã€ãã",
+ "create.gui.stockswitch.lowerLimit": "äžéãããå€",
+ "create.gui.stockswitch.upperLimit": "äžéãããå€",
+ "create.gui.stockswitch.startAt": "éå§ä¿¡å·",
+ "create.gui.stockswitch.startAbove": "以äžã®éå§ä¿¡å·",
+ "create.gui.stockswitch.stopAt": "åæ¢ä¿¡å·",
+ "create.gui.stockswitch.stopBelow": "以äžã®åæ¢ä¿¡å·",
+
+ "create.gui.sequenced_gearshift.title": "ã·ãŒã±ã³ã¹ã®ã¢ã·ãã",
+ "create.gui.sequenced_gearshift.instruction": "åœä»€",
+ "create.gui.sequenced_gearshift.instruction.turn_angle": "å転",
+ "create.gui.sequenced_gearshift.instruction.turn_angle.angle": "è§åºŠ",
+ "create.gui.sequenced_gearshift.instruction.turn_distance": "ãã¹ãã³",
+ "create.gui.sequenced_gearshift.instruction.turn_distance.distance": "è·é¢",
+ "create.gui.sequenced_gearshift.instruction.wait": "åŸ
æ©",
+ "create.gui.sequenced_gearshift.instruction.wait.duration": "æé",
+ "create.gui.sequenced_gearshift.instruction.end": "çµäº",
+ "create.gui.sequenced_gearshift.speed": "é床, æ¹å",
+ "create.gui.sequenced_gearshift.speed.forward": "å
¥åé床, ãã©ã¯ãŒã",
+ "create.gui.sequenced_gearshift.speed.forward_fast": "åé, ãã©ã¯ãŒã",
+ "create.gui.sequenced_gearshift.speed.back": "å
¥åé床, å転",
+ "create.gui.sequenced_gearshift.speed.back_fast": "åé, å転",
+
+ "create.schematicAndQuill.dimensions": "æŠç¥å³ãµã€ãº: %1$sx%2$sx%3$s",
+ "create.schematicAndQuill.firstPos": "æåã®äœçœ®ã»ããã",
+ "create.schematicAndQuill.secondPos": "2çªç®ã®äœçœ®ã»ããã",
+ "create.schematicAndQuill.noTarget": "[Ctrl] ãæŒãããŸãŸã§ç©ºæ°ãããã¯ãéžæããŸã",
+ "create.schematicAndQuill.abort": "éžæãåé€ããŸããã",
+ "create.schematicAndQuill.prompt": "æŠç¥å³ã®ååãå
¥åããŠãã ãã:",
+ "create.schematicAndQuill.fallbackName": "My Schematic",
+ "create.schematicAndQuill.saved": "%1$s ãšããŠä¿åããŸãã",
+
+ "create.schematic.invalid": "[!] ç¡å¹ãªã¢ã€ãã -代ããã«æŠç¥å³ããŒãã«ã䜿çšããŠãã ãã",
+ "create.schematic.position": "äœçœ®",
+ "create.schematic.rotation": "å転",
+ "create.schematic.rotation.none": "ç¡ã",
+ "create.schematic.rotation.cw90": "æèšåãã«90",
+ "create.schematic.rotation.cw180": "æèšåãã«180",
+ "create.schematic.rotation.cw270": "æèšåãã«270",
+ "create.schematic.mirror": "ãã©ãŒ",
+ "create.schematic.mirror.none": "ç¡ã",
+ "create.schematic.mirror.frontBack": "æ£é¢-èé¢",
+ "create.schematic.mirror.leftRight": "å·Š-å³",
+
+ "create.schematic.tool.deploy": "é
眮ãã",
+ "create.schematic.tool.move": "XZã移å",
+ "create.schematic.tool.movey": "Yã移å",
+ "create.schematic.tool.rotate": "å転",
+ "create.schematic.tool.print": "å°å·",
+ "create.schematic.tool.flip": "ããªãã",
+
+ "create.schematic.tool.deploy.description.0": "æ§é ãç¹å®ã®å Žæã«ç§»åããŸãã",
+ "create.schematic.tool.deploy.description.1": "å°é¢ãå³ã¯ãªãã¯ããŠé
眮ããŸãã",
+ "create.schematic.tool.deploy.description.2": "[Ctrl] ãæŒãããŸãŸãäžå®ã®è·é¢ã§éžæããŸãã",
+ "create.schematic.tool.deploy.description.3": "[Ctrl]-ã¹ã¯ããŒã«ããŠè·é¢ãå€æŽããŸãã",
+ "create.schematic.tool.move.description.0": "æŠç¥å³ãæ°Žå¹³ã«åãããŸãã",
+ "create.schematic.tool.move.description.1": "æŠç¥å³ããã€ã³ããã [Ctrl]-ã¹ã¯ããŒã«ããŠæŒãåºããŸãã",
+ "create.schematic.tool.move.description.2": "",
+ "create.schematic.tool.move.description.3": "",
+ "create.schematic.tool.movey.description.0": "æŠç¥å³ãåçŽã«åãããŸãã",
+ "create.schematic.tool.movey.description.1": "[Ctrl]-ã¹ã¯ããŒã«ããŠäžäžã«ç§»åããŸãã",
+ "create.schematic.tool.movey.description.2": "",
+ "create.schematic.tool.movey.description.3": "",
+ "create.schematic.tool.rotate.description.0": "æŠç¥å³ããã®äžå¿ãäžå¿ã«å転ãããŸãã",
+ "create.schematic.tool.rotate.description.1": "[Ctrl]-ã¹ã¯ããŒã«ããŠ90床å転ããŸãã",
+ "create.schematic.tool.rotate.description.2": "",
+ "create.schematic.tool.rotate.description.3": "",
+ "create.schematic.tool.print.description.0": "æ§é ç©ãå³åº§ã«ã¯ãŒã«ãã«é
眮ããŸãã",
+ "create.schematic.tool.print.description.1": "[å³ã¯ãªãã¯] ããŠãçŸåšã®å Žæãžã®é
眮ã確èªããŸãã",
+ "create.schematic.tool.print.description.2": "ãã®ããŒã«ã¯ã¯ãªãšã€ãã£ãã¢ãŒãå°çšã§ãã",
+ "create.schematic.tool.print.description.3": "",
+ "create.schematic.tool.flip.description.0": "éžæããé¢ã«æ²¿ã£ãŠæŠç¥å³ãå転ããŸãã",
+ "create.schematic.tool.flip.description.1": "æŠç¥å³ããã€ã³ããã [CTRL]-ã¹ã¯ããŒã«ããŠå転ããŸãã",
+ "create.schematic.tool.flip.description.2": "",
+ "create.schematic.tool.flip.description.3": "",
+
+ "create.schematics.synchronizing": "åæããŠããŸã...",
+ "create.schematics.uploadTooLarge": "æŠç¥å³ã倧ããããŸãã",
+ "create.schematics.maxAllowedSize": "æ倧蚱容æŠç¥å³ãã¡ã€ã«ãµã€ãºã¯:",
+
+ "create.gui.schematicTable.title": "æŠç¥å³ããŒãã«",
+ "create.gui.schematicTable.availableSchematics": "å©çšå¯èœãªæŠç¥å³",
+ "create.gui.schematicTable.noSchematics": "ä¿åãããæŠç¥å³ã¯ãããŸãã",
+ "create.gui.schematicTable.uploading": "ã¢ããããŒãããŠããŸã...",
+ "create.gui.schematicTable.finished": "ã¢ããããŒããå®äºããŸããïŒ",
+
+ "create.gui.schematicannon.title": "æŠç¥å³ç ²",
+ "create.gui.schematicannon.settingsTitle": "é
眮èšå®",
+ "create.gui.schematicannon.listPrinter": "ææãªã¹ãããªã³ã¿ãŒ",
+ "create.gui.schematicannon.gunpowderLevel": "ç«è¬ã¯ããš %1$s%% æ®ã£ãŠããŸã",
+ "create.gui.schematicannon.shotsRemaining": "æ®ãã®ã·ã§ããæ°: %1$s",
+ "create.gui.schematicannon.shotsRemainingWithBackup": "ããã¯ã¢ãããã: %1$s",
+ "create.gui.schematicannon.optionEnabled": "çŸåšæå¹",
+ "create.gui.schematicannon.optionDisabled": "çŸåšç¡å¹",
+ "create.gui.schematicannon.option.dontReplaceSolid": "åºäœãããã¯ã眮ãæããªã",
+ "create.gui.schematicannon.option.replaceWithSolid": "åºäœãåºäœã«çœ®ãæãã",
+ "create.gui.schematicannon.option.replaceWithAny": "åºäœãä»»æã®ãã®ã«çœ®ãæãã",
+ "create.gui.schematicannon.option.replaceWithEmpty": "空ã®åºäœãšäº€æ",
+ "create.gui.schematicannon.option.skipMissing": "äžè¶³ããŠãããããã¯ãã¹ããã",
+ "create.gui.schematicannon.option.skipTileEntities": "ã¿ã€ã«ãšã³ãã£ãã£ãä¿è·ãã",
+
+ "create.gui.schematicannon.option.skipMissing.description": "å€§ç ²ãé
眮ã«å¿
èŠãªãããã¯ãèŠã€ããããªãå Žåã次ã®å Žæã«é²ã¿ãŸãã",
+ "create.gui.schematicannon.option.skipTileEntities.description": "å€§ç ²ã¯ããã§ã¹ããªã©ã®ããŒã¿ä¿æãããã¯ã®äº€æãåé¿ããŸãã",
+ "create.gui.schematicannon.option.dontReplaceSolid.description": "å€§ç ²ã¯ããã®äœæ¥é åã®åºäœãããã¯ã眮ãæããããšã¯ãªããéåºäœãšç©ºæ°ã®ã¿ã眮ãæããŸãã",
+ "create.gui.schematicannon.option.replaceWithSolid.description": "å€§ç ²ã¯ãæŠç¥å³ã®äœçœ®ã«ãœãªãããããã¯ãå«ãŸããŠããå Žåã«ã®ã¿ããã®äœæ¥é åã®ãœãªãããããã¯ã眮ãæããŸãã",
+ "create.gui.schematicannon.option.replaceWithAny.description": "æŠç¥å³ã®ãã±ãŒã·ã§ã³ã«ãããã¯ãå«ãŸããŠããå Žåãå€§ç ²ã¯ãã®äœæ¥é åã®åäœãããã¯ã眮ãæããŸãã",
+ "create.gui.schematicannon.option.replaceWithEmpty.description": "å€§ç ²ã¯ã空æ°ã«çœ®ãæãããããã®ãå«ãããã®äœæ¥ãšãªã¢å
ã®ãã¹ãŠã®ãããã¯ãäžæããŸãã",
+
+ "create.schematicannon.status.idle": "åæ¢äž",
+ "create.schematicannon.status.ready": "æºåå®äº",
+ "create.schematicannon.status.running": "皌åäž",
+ "create.schematicannon.status.finished": "å®æ",
+ "create.schematicannon.status.paused": "äžæåæ¢äž",
+ "create.schematicannon.status.stopped": "åæ¢",
+ "create.schematicannon.status.noGunpowder": "ç«è¬äžè¶³",
+ "create.schematicannon.status.targetNotLoaded": "ãããã¯ãèªã¿èŸŒãŸããŠããŸãã",
+ "create.schematicannon.status.targetOutsideRange": "ã¿ãŒã²ãããé ãããŸã",
+ "create.schematicannon.status.searching": "æ€çŽ¢äž",
+ "create.schematicannon.status.skipping": "ã¹ããã",
+ "create.schematicannon.status.missingBlock": "äžæãªãããã¯:",
+ "create.schematicannon.status.placing": "é
眮äž",
+ "create.schematicannon.status.clearing": "ãããã¯ãã¯ãªã¢äž",
+ "create.schematicannon.status.schematicInvalid": "æŠç¥å³ãç¡å¹ã§ã",
+ "create.schematicannon.status.schematicNotPlaced": "é
眮ãããŠããªãæŠç¥å³ã§ã",
+ "create.schematicannon.status.schematicExpired": "æŠç¥å³ãã¡ã€ã«ãæéåãã§ã",
+
+ "create.gui.filter.blacklist": "ãã©ãã¯ãªã¹ã",
+ "create.gui.filter.blacklist.description": "äžèšã®ãããã«ãäžèŽããªãå Žåãã¢ã€ãã ã¯éãæããŸãã 空ã®ãã©ãã¯ãªã¹ãã¯ãã¹ãŠãåãå
¥ããŸãã",
+ "create.gui.filter.whitelist": "ãã¯ã€ããªã¹ã",
+ "create.gui.filter.whitelist.description": "äžèšã®ããããã«äžèŽããå Žåãã¢ã€ãã ã¯éãæããŸãã 空ã®ãã¯ã€ããªã¹ãã¯ãã¹ãŠãæåŠããŸãã",
+ "create.gui.filter.respect_data": "ããŒã¿ãéèŠ",
+ "create.gui.filter.respect_data.description": "ã¢ã€ãã ã¯ãèä¹
æ§ããšã³ãã£ã³ãããã®ä»ã®å±æ§ãäžèŽããå Žåã«ã®ã¿äžèŽããŸãã",
+ "create.gui.filter.ignore_data": "ããŒã¿ãç¡èŠ",
+ "create.gui.filter.ignore_data.description": "ã¢ã€ãã ã¯å±æ§ã«é¢ä¿ãªãäžèŽããŸãã",
+
+ "create.item_attributes.placeable": "èšçœ®å¯èœã",
+ "create.item_attributes.consumable": "é£ã¹ãããã",
+ "create.item_attributes.smeltable": "粟é¬å¯èœã",
+ "create.item_attributes.washable": "æŽããã",
+ "create.item_attributes.smokable": "ç»è£œå¯èœã",
+ "create.item_attributes.blastable": "é«çã§è£œé¬å¯èœã",
+ "create.item_attributes.enchanted": "ãšã³ãã£ã³ãæžã¿ã",
+ "create.item_attributes.damaged": "ç ŽæããŠãã",
+ "create.item_attributes.badly_damaged": "ã²ã©ãæå·ããŠãã",
+ "create.item_attributes.not_stackable": "ã¹ã¿ãã¯å¯èœã",
+ "create.item_attributes.equipable": "è£
åå¯èœã",
+ "create.item_attributes.furnace_fuel": "ããŸã©ã®çæã",
+ "create.item_attributes.in_tag": "%1$s ã®ã¿ã°ãä»ããããŠãã",
+ "create.item_attributes.in_item_group": "%1$s ã«å±ããŠãã",
+ "create.item_attributes.added_by": "%1$s ã«ãã£ãŠè¿œå ãããã",
+
+ "create.gui.attribute_filter.no_selected_attributes": "å±æ§ãéžæãããŠããŸãã",
+ "create.gui.attribute_filter.selected_attributes": "éžæãããå±æ§:",
+ "create.gui.attribute_filter.whitelist_disjunctive": "ãã¯ã€ããªã¹ãïŒã©ããïŒ",
+ "create.gui.attribute_filter.whitelist_disjunctive.description": "éžæããå±æ§ã®ãããããæã£ãŠããå Žåãã¢ã€ãã ã¯éãæããŸãã",
+ "create.gui.attribute_filter.whitelist_conjunctive": "ãã¯ã€ããªã¹ãïŒå
šãŠïŒ",
+ "create.gui.attribute_filter.whitelist_conjunctive.description": "éžæããå±æ§ããã¹ãŠãæã£ãŠããå Žåãã¢ã€ãã ã¯éãæããŸãã",
+ "create.gui.attribute_filter.blacklist": "ãã©ãã¯ãªã¹ã",
+ "create.gui.attribute_filter.blacklist.description": "éžæãããå±æ§ãæããªãå Žåãã¢ã€ãã ã¯éãæããŸãã",
+ "create.gui.attribute_filter.add_reference_item": "åç
§ã¢ã€ãã ãè¿œå ",
+
+ "create.tooltip.holdKey": "[%1$s] ãé·æŒã",
+ "create.tooltip.holdKeyOrKey": "[%1$s] ãŸã㯠[%2$s] ãé·æŒã",
+ "create.tooltip.keyShift": "Shift",
+ "create.tooltip.keyCtrl": "Ctrl",
+
+ "create.tooltip.speedRequirement": "ã¹ããŒãèŠä»¶: %1$s",
+ "create.tooltip.speedRequirement.none": "ç¡ã",
+ "create.tooltip.speedRequirement.medium": "äžé",
+ "create.tooltip.speedRequirement.high": "é«é",
+
+ "create.tooltip.stressImpact": "å¿åãžã®åœ±é¿: %1$s",
+ "create.tooltip.stressImpact.low": "äœ",
+ "create.tooltip.stressImpact.medium": "äž",
+ "create.tooltip.stressImpact.high": "é«",
+ "create.tooltip.stressImpact.overstressed": "è¶
éå¿å",
+
+ "create.tooltip.capacityProvided": "å¿å蚱容é: %1$s",
+ "create.tooltip.capacityProvided.low": "å°",
+ "create.tooltip.capacityProvided.medium": "äž",
+ "create.tooltip.capacityProvided.high": "倧",
+ "create.tooltip.capacityProvided.asGenerator": "(ãžã§ãã¬ãŒã¿ãšããŠ)",
+ "create.tooltip.generationSpeed" : "%1$s %2$sãçæ",
+
+ "create.tooltip.analogStrength": "ã¢ããã°åŒ·åºŠ: %1$s/15",
+
+ "create.tooltip.wip": "WIP",
+ "create.tooltip.workInProgress": "äœæ¥äžã§ãïŒ",
+
+ "create.tooltip.randomWipDescription0": "ãåæ§ã®æã®å±ããªããšããã«ä¿ç®¡ããŠãã ããã",
+ "create.tooltip.randomWipDescription1": "èµ€ã¡ãããã³ãã¯ããã®ã¢ã€ãã ã䜿çšãããã³ã«æ»ã«ãŸããããããã¹ãŠã®æéã",
+ "create.tooltip.randomWipDescription2": "èªå·±è²¬ä»»ã",
+ "create.tooltip.randomWipDescription3": "ããã¯ããªããæ¢ããŠããã¢ã€ãã ã§ã¯ãããŸããã* finger-wiggles *ãåæ£ãããŠãã ããã",
+ "create.tooltip.randomWipDescription4": "ãã®ã¢ã€ãã ã¯10ç§ã§èªå·±ç Žå£ããŸãã 10ã9ã8 ...",
+ "create.tooltip.randomWipDescription5": "ç§ãä¿¡ããŠãããã¯ç¡é§ã ã",
+ "create.tooltip.randomWipDescription6": "ãã®ã¢ã€ãã ã䜿çšããããšã«ãããã客æ§ã¯ããã«å
責äºé
ã«åæãããã®æ¡ä»¶ã«åæãããã®ãšããŸãã",
+ "create.tooltip.randomWipDescription7": "ããã¯ããªãã®ããã§ã¯ãªããããããŸããã ããã¯ã©ãïŒïŒ",
+ "create.tooltip.randomWipDescription8": "ããã䜿ã£ãŠããã«æ±ºæããããšã«åŸæããŠãã ããã",
+
+ "create.mechanical_mixer.min_ingredients": "æå° ææ",
+
+ "create.command.killTPSCommand": "killtps",
+ "create.command.killTPSCommand.status.slowed_by.0": "[Create]:ãµãŒããŒãã£ãã¯ã¯çŸåš %s ms é
ããªã£ãŠããŸã :o",
+ "create.command.killTPSCommand.status.slowed_by.1": "[Create]: ãµãŒããŒãã£ãã¯ã %s ms é
ããªããŸãã >:)",
+ "create.command.killTPSCommand.status.slowed_by.2": "[Create]: ãµãŒããŒãã£ãã¯ãéåžžã®é床ã«æ»ããŸãã:D",
+ "create.command.killTPSCommand.status.usage.0": "[Create]: /killtps stopã䜿çšããŠãµãŒããŒã®ãã£ãã¯ãéåžžã®é床ã«æ»ããŸã",
+ "create.command.killTPSCommand.status.usage.1": "[Create]: /killtps start ã䜿çšããŠããµãŒããŒã®ãã£ãã¯ãæå³çã«é
ãããŸã",
+ "create.command.killTPSCommand.argument.tickTime": "tickTime",
+
+ "advancement.create:root": "æåã«ãäœæããŸãããïŒ",
+ "advancement.create:root.desc": "ãã°ãããä»æããæ§ç¯ããæãæ¥ãŸããïŒ",
+ "advancement.create:andesite_alloy": "è±å¯ãªç¥è",
+ "advancement.create:andesite_alloy.desc": "Createã®ãããªã¢ã«ã®ååã¯å¥åŠã§ãããå®å±±å²©åéã¯ãã®1ã€ã§ãã",
+ "advancement.create:andesite_casing": "å®å±±å²©æ代",
+ "advancement.create:andesite_casing.desc": "巚人ã®ãã¢",
+ "advancement.create:crushing_wheel": "ããã€ãã®å®å±±å²©ãéå±ãæšæã䜿çšããŠãåºæ¬çãªã±ãŒã·ã³ã°ãäœæããã",
+ "advancement.create:crushing_wheel.desc": "ç Žç ãã€ãŒã«ãããã€ãäœæããŠãææãç²ç ããã",
+ "advancement.create:rotation": "çããŠãã
ãŒïŒ",
+ "advancement.create:rotation.desc": "æåã®éåã³ã³ããŒãã³ãã®å転ã芳å¯ããã",
+ "advancement.create:overstressed": "å¿åãããŸã£ãŠãã",
+ "advancement.create:overstressed.desc": "ç©çæ³åãçŽæ¥äœéšããŠãã ããã",
+ "advancement.create:sand_paper": "ãã¯ãŒããªãã·ã¥",
+ "advancement.create:sand_paper.desc": "çŽããããäœæããŠãèŠæ ããè¯ãããã",
+ "advancement.create:polished_rose_quartz": "ãã³ã¯ãã€ã€ã¢ã³ã",
+ "advancement.create:polished_rose_quartz.desc": "ããŒãºã¯ã©ãŒããéããŠèŠããããã«ããã",
+ "advancement.create:sand_paper_secret": "9001ççŽããã",
+ "advancement.create:sand_paper_secret.desc": "çŽãããã§ãããã€ãã®çŽããããçŽãããã§ç£šãã",
+ "advancement.create:press": "'ãã³ã¯ïŒ' ",
+ "advancement.create:press.desc": "ã¡ã«ãã«ã«ãã¬ã¹ãäœæããããã䜿çšããŠãã¬ãŒããäœæãããã",
+ "advancement.create:mixer": "ããã¯ã¹ã€ã³ã»ã€ããã»ã¢ãã",
+ "advancement.create:mixer.desc": "ã¡ã«ãã«ã«ãããµãŒãäœæããã",
+ "advancement.create:brass": "å®éã®åé",
+ "advancement.create:brass.desc": "é
ãšäºéã䜿çšããŠçé®ãäœæããã",
+ "advancement.create:brass_casing": "çé®ã®æ代",
+ "advancement.create:brass_casing.desc": "æ°ããå
¥æããçé®ãšããã€ãã®æšæã䜿çšããŠãããé«åºŠãªã±ãŒã·ã³ã°ãäœæããã",
+ "advancement.create:deployer": "çªããé
眮ãããæ»æãã",
+ "advancement.create:deployer.desc": "èªåãå®å
šã«åæ ãããããã€ã€ãŒãäœæããã",
+ "advancement.create:deployer_secret": "ããŠã³ãã€ããããïŒ",
+ "advancement.create:deployer_secret.desc": "2ã€ã®ãããã€ã€ãŒãæ³ãã³ãããã",
+ "advancement.create:chromatic_compound": "ãã€ããŒã©ææ",
+ "advancement.create:chromatic_compound.desc": "è²åœ©ã®ååç©ã®ããŒãäœæããã",
+ "advancement.create:shadow_steel": "ãã€ããªã¿ãŒããŒ",
+ "advancement.create:shadow_steel.desc": "äœããªãéå±ã®æ£ã§ããã·ã£ããŒã¹ããŒã«ãäœæããã",
+ "advancement.create:refined_radiance": "æããåºæ¿çãª",
+ "advancement.create:refined_radiance.desc": "匷åãªåœ©è²ç©è³ªã§ããæŽç·ŽãããèŒããäœæããã",
+ "advancement.create:refined_radiance_secret": "å
ã®ããŒã ã«ãã£ãŠã®åœé ",
+ "advancement.create:refined_radiance_secret.desc": "æŽç·ŽãããèŒããäœãå¥ã®æ¹æ³ãèŠã€ããã",
+ "advancement.create:speed_secret": "ãããŸãããïŒ ",
+ "advancement.create:speed_secret.desc": "ã¹ããŒãã¡ãŒã¿ãŒã確ãã«69 rpmã«éããã®ã確èªããã",
+
+ "create.subtitle.schematicannon_launch_block": "æŠç¥å³ç ²ãçºå°ãã",
+ "create.subtitle.schematicannon_finish": "æŠç¥å³ç ²ãçµäºãã",
+ "create.subtitle.slime_added": "ã¹ã©ã€ã ã¹ã¯ã€ãŒãº",
+ "create.subtitle.mechanical_press_activation": "ã¡ã«ãã«ã«ãã¬ã¹ãäœåãã",
+ "create.subtitle.mechanical_press_item_break": "éå±ã¯ã©ã³ã¯",
+ "create.subtitle.blockzapper_place": "ãããã¯ã¶ããããã",
+ "create.subtitle.blockzapper_confirm": "ã¢ãã¡ãŒããã£ããã£ã³",
+ "create.subtitle.blockzapper_deny": "è¡°éããããŒã",
+ "create.subtitle.block_funnel_eat": "ãã¡ã³ãã«CHOMPS",
+
+ "_comment": "-------------------------] ITEM DESCRIPTIONS [------------------------------------------------",
+
+ "item.create.example_item.tooltip": "ã¢ã€ãã ã®äŸïŒãã®ããŒã«ããããååšããåãªãããŒã«ãŒïŒ",
+ "item.create.example_item.tooltip.summary": "ã¢ã€ãã ã®ç°¡åãªèª¬æã _ã¢ã³ããŒã¹ã³ã¢_çšèªã匷調衚瀺ããŸãã",
+ "item.create.example_item.tooltip.condition1": "ããã¯",
+ "item.create.example_item.tooltip.behaviour1": "次ã«ããã®ã¢ã€ãã ã¯ãããè¡ããŸãã ïŒè¡åã¯ã·ããã§ç€ºãããŸãïŒ",
+ "item.create.example_item.tooltip.condition2": "ãããŠããã¯",
+ "item.create.example_item.tooltip.behaviour2": "ããªãã¯å¥œããªã ãè¡åãè¿œå ããããšãã§ããŸã",
+ "item.create.example_item.tooltip.control1": "CtrlãæŒãããšã",
+ "item.create.example_item.tooltip.action1": "ãããã®ã³ã³ãããŒã«ã衚瀺ãããŸãã",
+
+ "item.create.symmetry_wand.tooltip": "察称æ§ãå¿
èŠ",
+ "item.create.symmetry_wand.tooltip.summary": "æ§æããããã¬ãŒã³å
šäœã®ãããã¯é
眮ãå®å
šã«ãã©ãŒãªã³ã°ããŸãã",
+ "item.create.symmetry_wand.tooltip.condition1": "ãããããŒã«ãããšã",
+ "item.create.symmetry_wand.tooltip.behaviour1": "ã¢ã¯ãã£ãã®ãŸãŸ",
+ "item.create.symmetry_wand.tooltip.control1": "å°é¢ãå³ã¯ãªãã¯ãããšã",
+ "item.create.symmetry_wand.tooltip.action1": "ãã©ãŒã_äœæ_ãŸãã¯_移å_",
+ "item.create.symmetry_wand.tooltip.control2": "空äžãå³ã¯ãªãã¯ãããšã",
+ "item.create.symmetry_wand.tooltip.action2": "ã¢ã¯ãã£ããªãã©ãŒã_åé€_",
+ "item.create.symmetry_wand.tooltip.control3": "ã¹ããŒã¯ããªããå³ã¯ãªãã¯ãããšã",
+ "item.create.symmetry_wand.tooltip.action3": "_èšå®ã€ã³ã¿ãŒãã§ãŒã¹_ãéããŸã",
+
+ "item.create.placement_handgun.tooltip": "ãããã¯ã¶ãããŒ",
+ "item.create.placement_handgun.tooltip.summary": "é¢ããå Žæã«ãããã¯ãé
眮ãŸãã¯äº€æããããã®æ°ããã¬ãžã§ããã",
+ "item.create.placement_handgun.tooltip.control1": "ãããã¯ãå·Šã¯ãªãã¯ãããšã",
+ "item.create.placement_handgun.tooltip.action1": "ã¿ãŒã²ããã®ãããã¯ããã®ããŒã«ã«èšå®ããŸãã",
+ "item.create.placement_handgun.tooltip.control2": "ãããã¯ãå³ã¯ãªãã¯ãããšã",
+ "item.create.placement_handgun.tooltip.action2": "ã¿ãŒã²ãããããã¯ã_é
眮_ãŸãã¯_眮æ_ããŸãã",
+ "item.create.placement_handgun.tooltip.control3": "ã¹ããŒã¯ããªããå³ã¯ãªãã¯ãããšã",
+ "item.create.placement_handgun.tooltip.action3": "_èšå®ã€ã³ã¿ãŒãã§ãŒã¹_ãéããŸã",
+
+ "item.create.terrain_zapper.tooltip": "ãã³ããã«ãã¯ãŒã«ãã·ã§ãŒããŒ",
+ "item.create.terrain_zapper.tooltip.summary": "_颚æ¯_ã_å°åœ¢ã®ç¹åŸŽ_ãäœæããããã®äŸ¿å©ãªããŒã«ã",
+ "item.create.terrain_zapper.tooltip.control1": "ãããã¯ãå·Šã¯ãªãã¯ãããšã",
+ "item.create.terrain_zapper.tooltip.action1": "ã¿ãŒã²ããã®ãããã¯ããã®ããŒã«ã«èšå®ããŸãã",
+ "item.create.terrain_zapper.tooltip.control2": "ãããã¯ãå³ã¯ãªãã¯ãããšã",
+ "item.create.terrain_zapper.tooltip.action2": "çŸåšéžæãããŠãã_ãã©ã·_ãš_ããŒã«_ãã¿ãŒã²ããã®å Žæã«é©çšããŸãã",
+ "item.create.terrain_zapper.tooltip.control3": "ã¹ããŒã¯ããªããå³ã¯ãªãã¯ãããšã",
+ "item.create.terrain_zapper.tooltip.action3": "_èšå®ã€ã³ã¿ãŒãã§ãŒã¹_ãéããŸã",
+
+ "item.create.tree_fertilizer.tooltip": "æšè³ªè¥æ",
+ "item.create.tree_fertilizer.tooltip.summary": "äžè¬çãªæšã®çš®é¡ã®æé·ãå éããã®ã«é©ããããã©ã«ã®åŒ·åãªçµã¿åããã",
+ "item.create.tree_fertilizer.tooltip.condition1": "èæšã«äœ¿çšãããšã",
+ "item.create.tree_fertilizer.tooltip.behaviour1": "_ééã®æ¡ä»¶_ã«_é¢ä¿ãªã_ããªãŒãæé·ããã",
+
+ "item.create.deforester.tooltip": "ããã©ã¬ã¹ã¿ãŒ",
+ "item.create.deforester.tooltip.summary": "äžç¬ã§æšãåãåãããšãã§ãã_èŒãæ§_ã",
+
+ "item.create.filter.tooltip": "ãã£ã«ã¿",
+ "item.create.filter.tooltip.summary": "ããžã¹ãã£ãã¯ããã€ã¹ã®_åºå_ãš_å
¥å_ããã_æ£ç¢º_ã«_å¶åŸ¡_ãã_ã¢ã€ãã ã®ã»ãã_ãŸãã¯ããã€ãã®_ãã¹ãããããã£ã«ã¿ãŒ_ãšç
§åããŸãã",
+ "item.create.filter.tooltip.condition1": "ãã£ã«ã¿ãŒã¹ãããã«ã»ãããããšã",
+ "item.create.filter.tooltip.behaviour1": "_æ§æ_ã«å¿ããŠã¢ã€ãã ã®æµãã_å¶åŸ¡_ããŸãã",
+ "item.create.filter.tooltip.condition2": "å³ã¯ãªãã¯ãããšã",
+ "item.create.filter.tooltip.behaviour2": "_èšå®ã€ã³ã¿ãŒãã§ãŒã¹_ãéããŸã",
+
+ "item.create.property_filter.tooltip": "å±æ§ãã£ã«ã¿ãŒ",
+ "item.create.property_filter.tooltip.summary": "ããžã¹ãã£ãã¯ããã€ã¹ã®_åºå_ãš_å
¥å_ããã_æ£ç¢º_ã«_å¶åŸ¡_ããã¢ã€ãã ã®_å±æ§_ãš_ã«ããŽãªã®ã»ãã_ãšç
§åããŸãã",
+ "item.create.property_filter.tooltip.condition1": "ãã£ã«ã¿ãŒã¹ãããã«ã»ãããããšã",
+ "item.create.property_filter.tooltip.behaviour1": "_æ§æ_ã«å¿ããŠã¢ã€ãã ã®æµãã_å¶åŸ¡_ããŸãã",
+ "item.create.property_filter.tooltip.condition2": "å³ã¯ãªãã¯ãããšã",
+ "item.create.property_filter.tooltip.behaviour2": "_èšå®ã€ã³ã¿ãŒãã§ãŒã¹_ãéããŸã",
+
+ "block.create.cocoa_log.tooltip": "ã³ã³ã¢ãã°",
+ "block.create.cocoa_log.tooltip.summary": "_ã«ã«ãªè±_ã®èªååã容æãããžã£ã³ã°ã«ã®åæšã",
+ "block.create.cocoa_log.tooltip.condition1": "æçãããšã",
+ "block.create.cocoa_log.tooltip.behaviour1": "_ã«ã«ãªã®å®_ãåæ¹å
«æ¹ã«è²ãŠãã",
+
+ "item.create.empty_blueprint.tooltip": "空ã®ã¹ããŒã",
+ "item.create.empty_blueprint.tooltip.summary": "ã¬ã·ãã®ææãšããŠãããã³_æŠç¥å³ããŒãã«_ã§ã®èšè¿°ã«äœ¿çšãããŸãã",
+
+ "item.create.blueprint.tooltip": "æŠç¥å³",
+ "item.create.blueprint.tooltip.summary": "ã¯ãŒã«ãã«é
眮ããã³é
眮ãããæ§é ãä¿æããŸãã ããã°ã©ã ãå¿
èŠã«å¿ããŠé
眮ãã_æŠç¥å³ç ²_ã䜿çšããŠäœæããŸãã",
+ "item.create.blueprint.tooltip.condition1": "æã£ããšã",
+ "item.create.blueprint.tooltip.behaviour1": "ç»é¢äžã®ããŒã«ã䜿çšããŠé
眮ã§ããŸãã",
+ "item.create.blueprint.tooltip.control1": "ã¹ããŒã¯ããªããå³ã¯ãªãã¯ãããšã",
+ "item.create.blueprint.tooltip.action1": "æ£ç¢ºãª_座æš_ãå
¥åããããã®_ã€ã³ã¿ãŒãã§ãŒã¹_ãéããŸãã",
+
+ "item.create.blueprint_and_quill.tooltip": "æŠç¥å³ãšçŸœæ ¹ãã³",
+ "item.create.blueprint_and_quill.tooltip.summary": "ã¯ãŒã«ãã®æ§é ç©ã.nbtãã¡ã€ã«ã«ä¿åããããã«äœ¿çšãããŸãã",
+ "item.create.blueprint_and_quill.tooltip.condition1": "ã¹ããã1",
+ "item.create.blueprint_and_quill.tooltip.behaviour1": "å³ã¯ãªãã¯ããŠ2ã€ã®ã³ãŒããŒãã€ã³ããéžæããŸãã",
+ "item.create.blueprint_and_quill.tooltip.condition2": "ã¹ããã2",
+ "item.create.blueprint_and_quill.tooltip.behaviour2": "_CtrlããŒãæŒããªããã¹ã¯ããŒã«_ããŠããµã€ãºã調æŽããŸãã ããäžåºŠå³ã¯ãªãã¯ããŠä¿åããŸãã",
+ "item.create.blueprint_and_quill.tooltip.control1": "å³ã¯ãªãã¯ãããšã",
+ "item.create.blueprint_and_quill.tooltip.action1": "ã³ãŒããŒãã€ã³ããéžæ/ä¿åã確èªããŸãã",
+ "item.create.blueprint_and_quill.tooltip.control2": "Ctrlãé·æŒããŠããšã",
+ "item.create.blueprint_and_quill.tooltip.action2": "_空äž_ã§ãã€ã³ããéžæããŸãã _ã¹ã¯ããŒã«_ããŠè·é¢ã調æŽããŸãã",
+ "item.create.blueprint_and_quill.tooltip.control3": "ã¹ããŒã¯ããªããå³ã¯ãªãã¯ãããšã",
+ "item.create.blueprint_and_quill.tooltip.action3": "éžæã_ãªã»ãã_ããŠåé€ããŸãã",
+
+ "block.create.creative_crate.tooltip": "ã¯ãªãšã€ãã£ãã¯ã¬ãŒã",
+ "block.create.creative_crate.tooltip.summary": "é£æ¥ããæŠç¥å³ç ²ãžãããã¯ã®ç¡éã«äŸçµŠããŸãã",
+
+ "block.create.schematicannon.tooltip": "ã¹ããŒããã£ãã³",
+ "block.create.schematicannon.tooltip.summary": "ãããã¯ãæã£ãŠãå±éããã_æŠç¥å³_ãããšã«ã¯ãŒã«ãã«èšçœ®ããŸãã é£æ¥ããã€ã³ãã³ããªããã®ã¢ã€ãã ãäŸçµŠãã_ç«è¬_ãçæãšããŠäœ¿çšããŸãã",
+ "block.create.schematicannon.tooltip.control1": "å³ã¯ãªãã¯ãããšã",
+ "block.create.schematicannon.tooltip.action1": "_ã€ã³ã¿ãŒãã§ã€ã¹_ãéããŸã",
+
+ "block.create.schematic_table.tooltip": "æŠç¥å³ããŒãã«",
+ "block.create.schematic_table.tooltip.summary": "ä¿åãããæŠç¥å³ã_空ã®æŠç¥å³_ã«æžã蟌ã¿ãŸãã",
+ "block.create.schematic_table.tooltip.condition1": "空ã®æŠç¥å³ãäžãããããšã",
+ "block.create.schematic_table.tooltip.behaviour1": "Schematicsãã©ã«ãããéžæãããã¡ã€ã«ãã¢ããããŒãããŸãã",
+
+ "block.create.shaft.tooltip": "軞",
+ "block.create.shaft.tooltip.summary": "_å転_ãçŽç·ã§_äžç¶_ããŸãã",
+
+ "block.create.cogwheel.tooltip": "ã³ã°ãã€ãŒã«",
+ "block.create.cogwheel.tooltip.summary": "_å転_ãçŽç·ã§ãé£æ¥ãã_æ¯è»_ã«_äžç¶_ããŸãã",
+
+ "block.create.large_cogwheel.tooltip": "倧åã³ã°ãã€ãŒã«",
+ "block.create.large_cogwheel.tooltip.summary": "ãã倧ããªããŒãžã§ã³ã®_æ¯è»_ã«ãããå°ããªå¯Ÿå¿ç©ã«æ¥ç¶ãããšãã«_å転é床_ã_å€æŽ_ã§ããŸãã",
+
+ "block.create.encased_shaft.tooltip": "å
èµã·ã£ãã",
+ "block.create.encased_shaft.tooltip.summary": "_å転_ãçŽç·ã§_äžç¶_ããŸãã å£ãééããå転ã®äŒæã«é©ããŠããŸãã",
+
+ "block.create.gearbox.tooltip": "ã®ã¢ããã¯ã¹",
+ "block.create.gearbox.tooltip.summary": "_äžç¶_ãã_4æ¹å_ã®_å転_çŽç·æ¥ç¶ãéã«ããŸãã",
+
+ "block.create.gearshift.tooltip": "ã®ã¢ã·ãã",
+ "block.create.gearshift.tooltip.summary": "æ¥ç¶ãããã·ã£ããã®å転æ¹åãåãæ¿ããã³ã³ãããŒã«ã",
+ "block.create.gearshift.tooltip.condition1": "ãã¯ãŒãå
¥ã£ãŠããšã",
+ "block.create.gearshift.tooltip.behaviour1": "åºãŠè¡ãå転ã_é_ã«ããŸãã",
+
+ "block.create.clutch.tooltip": "ã¯ã©ãã",
+ "block.create.clutch.tooltip.summary": "æ¥ç¶ãããã·ã£ããã®å転ããªã³/ãªãããã³ã³ãããŒã«ã",
+ "block.create.clutch.tooltip.condition1": "ãã¯ãŒãå
¥ã£ãŠããšã",
+ "block.create.clutch.tooltip.behaviour1": "å察åŽãžã®å転ã®äŒéã_åæ¢_ããŸãã",
+
+ "block.create.encased_belt.tooltip": "ã±ãŒã¹å
¥ããã«ã",
+ "block.create.encased_belt.tooltip.summary": "_å転_ããã®ãããã¯ãšæ¥ç¶ããã_ã±ãŒã¹å
¥ããã«ã_ã«_äžç¶_ããŸãã",
+ "block.create.encased_belt.tooltip.condition1": "æ¥ç¶ãããšã",
+ "block.create.encased_belt.tooltip.behaviour1": "ã¢ã¿ããããããããã¯ã®_å転é床_ãšæ¹åã¯ãŸã£ãã_åã_ã§ãã 圌ãã¯åãããã«åãåãå¿
èŠã¯ãããŸããã",
+
+ "block.create.adjustable_pulley.tooltip": "ã¢ããã°ãã«ãããŒãªãŒ",
+ "block.create.adjustable_pulley.tooltip.summary": "ãããã¯ãä»ããŠ_å転ãäžç¶_ããåãä»ãããã_ã±ãŒã¹å
¥ããã«ã_ã«äŒéããŸãã åãä»ããããå
ã¿èŸŒãŸãããã«ãã¯ããã®ãããã¯ãåä¿¡ãã_ã¢ããã°ã¬ããã¹ããŒã³ä¿¡å·_ã«åºã¥ããŠ_ããéãå転_ããŸãã",
+ "block.create.adjustable_pulley.tooltip.condition1": "ã¬ããã¹ããŒã³ã³ã³ãããŒã«",
+ "block.create.adjustable_pulley.tooltip.behaviour1": "ä¿¡å·ããªããšãæ¥ç¶ãããŠãããã«ãã®_é床ãäžãããŸãã_ã ãã«ã¹ãã¬ã³ã°ã¹ã·ã°ãã«æ¥ç¶ãã«ãã«ããã_é床ã¯2åã«ãªããŸã_ã",
+
+ "item.create.belt_connector.tooltip": "ãã«ãã³ãã¯ã¿ãŒ",
+ "item.create.belt_connector.tooltip.summary": "2ã€ä»¥äžã®_ã·ã£ãã_ã_ã¡ã«ãã«ã«ãã«ã_ã§æ¥ç¶ããŸãã æ¥ç¶ãããã·ã£ããã®å転é床ãšæ¹åã¯ãŸã£ããåãã§ãã ãã«ãã¯ã_ã¢ã€ãã _ãš_ãšã³ãã£ãã£_ã®_ã³ã³ãã¢_ãšããŠæ©èœã§ããŸãã",
+ "item.create.belt_connector.tooltip.control1": "ã·ã£ãããå³ã¯ãªãã¯ãããšã",
+ "item.create.belt_connector.tooltip.action1": "ãã«ãã®1ã€ã®ããŒãªãŒãšããŠã·ã£ãããéžæããŸãã éžæããäž¡æ¹ã®ã·ã£ããã¯ã_ãã«ãã®æ¹å_ã«åãã£ãŠ_åçŽ_ã_æ°Žå¹³_ããŸãã¯_æã_ã«æŽåããå¿
èŠããããŸãã",
+ "item.create.belt_connector.tooltip.control2": "ã¹ããŒã¯ããªããã·ã£ãããå³ã¯ãªãã¯ãããšã",
+ "item.create.belt_connector.tooltip.action2": "ãã«ãã®æåã«éžæãããäœçœ®ã_ãªã»ãã_ããŸãã",
+
+ "item.create.goggles.tooltip": "ãŽãŒã°ã«",
+ "item.create.goggles.tooltip.summary": "æçšãªååæ
å ±ã§èŠèŠã匷åããããã®çŒé¡ã",
+ "item.create.goggles.tooltip.condition1": "ççšãããšã",
+ "item.create.goggles.tooltip.behaviour1": "é
眮ããããããã£ãã¯ã³ã³ããŒãã³ãã®_é床ã¬ãã«_ã«å¯Ÿå¿ãã_è²ä»ãã®ã€ã³ãžã±ãŒã¿ãŒ_ãšãåã
ã®ã³ã³ããŒãã³ã_ã®å¿åã®åœ±é¿_ãš_容é_ã衚瀺ããŸãã",
+ "item.create.goggles.tooltip.condition2": "èšåšãèŠããšã",
+ "item.create.goggles.tooltip.behaviour2": "èšåšãæ¥ç¶ãããŠãããããã¯ãŒã¯ã®é床ãŸãã¯å¿åã«é¢ãã詳现æ
å ±ã衚瀺ããŸãã",
+
+ "item.create.wrench.tooltip": "ã¬ã³ã",
+ "item.create.wrench.tooltip.summary": "ååè«çããããã«åãçµãããã®äŸ¿å©ãªããŒã«ã ã³ã³ããŒãã³ãã®_å転_ã_解äœ_ã_èšå®_ã«äœ¿çšã§ããŸãã",
+ "item.create.wrench.tooltip.control1": "ååãããã¯ãå³ã¯ãªãã¯ãããšã",
+ "item.create.wrench.tooltip.action1": "_æäœããé¢ã«åãã£ãŠããŸãã¯é¢ããé¢ããããã«_ã³ã³ããŒãã³ããå転ãããŸã_ã",
+ "item.create.wrench.tooltip.control2": "ã¹ããŒã¯ããªããå³ã¯ãªãã¯ãããšã",
+ "item.create.wrench.tooltip.action2": "_ååã³ã³ããŒãã³ããå解_ãã_ã€ã³ãã³ããª_ã«æ»ããŸãã",
+
+ "block.create.creative_motor.tooltip": "ã¯ãªãšã€ãã£ãã¢ãŒã¿ãŒ",
+ "block.create.creative_motor.tooltip.summary": "_å転å_ãèšå®å¯èœãªãœãŒã¹ã",
+
+ "block.create.water_wheel.tooltip": "æ°Žè»",
+ "block.create.water_wheel.tooltip.summary": "_é£æ¥ããæ°Žæµ_ããååŸããã_å転å_ãæäŸããŸãã",
+
+ "block.create.encased_fan.tooltip": "å
èµãã¡ã³",
+ "block.create.encased_fan.tooltip.summary": "_å転å_ã_æ°æµ_ã«å€æããæ»ããŸããããŸããŸãªçšéããããŸãã",
+ "block.create.encased_fan.tooltip.condition1": "ã¬ããã¹ããŒã³ååãäžãããšã",
+ "block.create.encased_fan.tooltip.behaviour1": "çŽäžã®_ç±æº_ãã_å転å_ãæäŸããŸãã ãã¡ã³ã¯äžåãã«ããå¿
èŠããããŸãã",
+ "block.create.encased_fan.tooltip.condition2": "å転ãããšã",
+ "block.create.encased_fan.tooltip.behaviour2": "å
¥åå転é床ã«å¿ããŠããšã³ãã£ãã£ã_æŒã_ãŸãã¯_åŒãæ»_ããŸãã",
+ "block.create.encased_fan.tooltip.condition3": "ç¹å¥ãªãããã¯ãå¹ãæãããšã",
+ "block.create.encased_fan.tooltip.behaviour3": "_液äœ_ãš_ç_ã®ç²åã空æ°ã®æµãã«æŸåºãããŸãã ããã¯ã_ã¢ã€ãã ã®åŠç_ã«äœ¿çšã§ããŸãã",
+
+ "block.create.nozzle.tooltip": "ããºã«",
+ "block.create.nozzle.tooltip.summary": "_ã±ãŒã¹å
¥ããã¡ã³_ã®åé¢ã«åãä»ããŠããšã³ãã£ãã£ãžã®åœ±é¿ã_å
šæ¹å_ã«åæ£ããŸãã",
+
+ "block.create.hand_crank.tooltip": "ãã³ãã¯ã©ã³ã¯",
+ "block.create.hand_crank.tooltip.summary": "ãã¬ã€ã€ãŒã®çžäºäœçšãå¿
èŠãšãã_å転åã®åçŽãªæ
å ±æº_ã",
+ "block.create.hand_crank.tooltip.condition1": "䜿çšããŠããšã",
+ "block.create.hand_crank.tooltip.behaviour1": "ä»å±ã®ä»æãã«_å転å_ãæäŸããŸãã _ã¹ããŒã¯ã§å転ãé_ã«ããŸãã",
+
+ "block.create.cuckoo_clock.tooltip": "鳩æèš",
+ "block.create.cuckoo_clock.tooltip.summary": "空éã_食ã_ã_æéã远跡ãã_ããã®çŽ æŽãããè·äººæã",
+ "block.create.cuckoo_clock.tooltip.condition1": "å転ãããšã",
+ "block.create.cuckoo_clock.tooltip.behaviour1": "_çŸåšã®æå»_ã衚瀺ãã1æ¥ã«2åæ²ãåçããŸãã _ãã¬ã€ã€ãŒãç ããããã«ãªã_ãšããã«ã_æ£å_ãšå€æ®ãã«1å_ã¢ã¯ãã£ã_ã«ãªããŸãã",
+
+ "block.create.turntable.tooltip": "ã¿ãŒã³ããŒãã«",
+ "block.create.turntable.tooltip.summary": "_å転å_ãæŽç·Žãããä¹ãç©é
ãã«å€ããŸãã",
+
+ "block.create.millstone.tooltip": "ç³èŒ",
+ "block.create.millstone.tooltip.summary": "æ¿å
¥ããã_ææ_ã®_ç å_ã«é©ãããããã£ãã¯ã³ã³ããŒãã³ãã é£æ¥ããæ¯è»ã«ãã£ãŠããŸãã¯äžéšã®ã·ã£ããã«æ¥ç¶ããããšã«ãã£ãŠãååãäŸçµŠã§ããŸãã çµæã¯ã³ã³ããŒãã³ãããæœåºããå¿
èŠããããŸãã",
+ "block.create.millstone.tooltip.condition1": "å転ãããšã",
+ "block.create.millstone.tooltip.behaviour1": "ãããã¯ã®åŽé¢ãŸãã¯äžé¢ããæ¿å
¥ãããã¢ã€ãã ã_ç²ç _ãéå§ããŸãã",
+ "block.create.millstone.tooltip.condition2": "å³ã¯ãªãã¯ãããšã",
+ "block.create.millstone.tooltip.behaviour2": "åºåç©ãæåã§åéããŸãã",
+
+ "block.create.crushing_wheel.tooltip": "ã¯ã©ãã·ã³ã°ãã€ãŒã«",
+ "block.create.crushing_wheel.tooltip.summary": "äœãã_å解_ãã倧ããªå転å¯èœãªãã€ãŒã«ã",
+ "block.create.crushing_wheel.tooltip.condition1": "ä»ã®ç Žç ãã€ãŒã«ã«åãä»ãããšã",
+ "block.create.crushing_wheel.tooltip.behaviour1": "æ§ã
ãªç©ãåŠçããããã®ç Žç æ©ã圢æããŸãã ãã€ãŒã«ã®æ¯ã¯ãåãé床ã§æ¥ç¶ããå察æ¹åã«åãå¿
èŠããããŸãã",
+
+ "block.create.mechanical_press.tooltip": "ã¡ã«ãã«ã«ãã¬ã¹",
+ "block.create.mechanical_press.tooltip.summary": "ãã®äžã®ã¢ã€ãã ãå§çž®ããããã®åŒ·åãªãã¹ãã³ã äžå®ã®_å転å_ãå¿
èŠã§ãã",
+ "block.create.mechanical_press.tooltip.condition1": "ã¬ããã¹ããŒã³ååãåãããšã",
+ "block.create.mechanical_press.tooltip.behaviour1": "ãã®äžã«ãããããããã¢ã€ãã ã®å§çž®ã_éå§_ããŸãã",
+ "block.create.mechanical_press.tooltip.condition2": "ã¡ã«ãã«ã«ãã«ãã®äžã«ãããšã",
+ "block.create.mechanical_press.tooltip.behaviour2": "ãã«ãäžã®ãã€ãã¹ã¢ã€ãã ã_èªåç_ã«å§çž®ããŸãã",
+ "block.create.mechanical_mixer.tooltip.condition3": "é¢ã®äžã«ãããšã",
+ "block.create.mechanical_mixer.tooltip.behaviour3": "å¿
èŠãªãã¹ãŠã®æåãååšãããšãã¯ãã€ã§ããé¢ã®_ã¢ã€ãã ãå§çž®_ãå§ããŸãã",
+
+ "block.create.basin.tooltip": "é¢",
+ "block.create.basin.tooltip.summary": "_ã¡ã«ãã«ã«ãããµãŒ_ãš_ã¡ã«ãã«ã«ãã¬ã¹_ã§ã®åŠçã«äœ¿çšããã䟿å©ãª_ã¢ã€ãã ã®å
¥ãç©_ã_ã¬ããã¹ããŒã³ã³ã³ãã¬ãŒã¿_ããµããŒãããŸãã",
+
+ "block.create.mechanical_mixer.tooltip": "ã¡ã«ãã«ã«ãããµãŒ",
+ "block.create.mechanical_mixer.tooltip.summary": "ãã®äžã®ã¢ã€ãã ã«åœ¢ç¶ã®ãªã補äœã¬ã·ããé©çšããããã®ååãããµãŒã äžå®ã®_å転å_ãšäžã«é
眮ããã_é¢_ãå¿
èŠã§ãïŒéã«ã®ã£ããããããŸãïŒã",
+ "block.create.mechanical_mixer.tooltip.condition1": "é¢ã®äžã«ãããšã",
+ "block.create.mechanical_mixer.tooltip.behaviour1": "å¿
èŠãªãã¹ãŠã®æåãååšãããšãã¯ãã€ã§ããé¢ã®ã¢ã€ãã ã®æ··åãéå§ããŸãã",
+ "block.create.mechanical_mixer.tooltip.condition2": "ã¬ã³ããšäœµçšãããšã",
+ "block.create.mechanical_mixer.tooltip.behaviour2": "é©çšãããã¬ã·ãã®_ç·ææ_ã®æå°éã_æ§æ_ããŸãã ãã®ãªãã·ã§ã³ã䜿çšããŠã䌌ãŠãããæåãå°ãªã_äžèŠãªã¬ã·ããé€å€_ããŸãã",
+
+ "block.create.mechanical_crafter.tooltip": "ã¡ã«ãã«ã«ã¯ã©ãã",
+ "block.create.mechanical_crafter.tooltip.summary": "_ãããã圢ç¶ã®è£œäœã¬ã·ã_ãèªååããããã®åçã¢ã»ã³ãã©ãŒã _ã¬ã·ãã«å¯Ÿå¿ããã°ãªããã«è€æ°ãé
眮_ãã_ãã§ã¢ãã«ããé
眮ããŠ_ãããããã®ã¯ã©ãã¿ãŒã®ã°ãªããããåºã_æµã_ãäœæããŸãã",
+ "block.create.mechanical_crafter.tooltip.condition1": "å転ãããšã",
+ "block.create.mechanical_crafter.tooltip.behaviour1": "ã°ãªããå
ã®_ãã¹ãŠã®ã¯ã©ãã¿ãŒ_ã«ãã³ãã¬ãŒãã_äžãããã_ãšããã«ã_çç£ããã»ã¹ãéå§_ããŸãã",
+ "block.create.mechanical_crafter.tooltip.control1": "ããã³ãã§ã¬ã³ããããšã",
+ "block.create.mechanical_crafter.tooltip.action1": "_åã
ã®çç£è
ã_ã¢ã€ãã ã移å_ãã_æ¹å_ã埪ç°ãããŸãã äœæ¥ã°ãªããã圢æããã«ã¯ããã¹ãŠã®ã¢ã€ãã ãæçµçãªã¯ã©ãã¿ãŒã«åãã£ãŠ_移åãããæµã_ã«_ãã«ã_ãé
眮ããŸãã æçµçãªã¯ã©ãã¿ãŒã¯ã°ãªãããã_é¢ãã_æ¹åãæããªããã°ãªããŸããã",
+ "block.create.mechanical_crafter.tooltip.control2": "åŸãã§ã¬ã³ããããšã",
+ "block.create.mechanical_crafter.tooltip.action2": "é£æ¥ããã¯ã©ãã¿ãŒã®_å
¥åã€ã³ãã³ããª_ã_æ¥ç¶_ããŸãã ããã䜿çšããŠãã¯ã©ããã°ãªããã®_ã¹ããããçµå_ãã_å
¥åäœæ¥ãç¯çŽ_ããŸãã",
+
+ "block.create.furnace_engine.tooltip": "ããŸã©ãšã³ãžã³",
+ "block.create.furnace_engine.tooltip.summary": "_皌åããããŸã©_ãæ©èœããããšãå¿
èŠãšãã匷åãª_å転ååæº_ã",
+ "block.create.furnace_engine.tooltip.condition1": "çããŠãããŸã©ã«åãä»ãããšã",
+ "block.create.furnace_engine.tooltip.behaviour1": "ãã®åïŒ1mé¢ããŠïŒã«é
眮ããã_ãã©ã€ãã€ãŒã«ãžã®ååäŸçµŠãéå§_ããŸãã é«éåããã«ã¯é«çã䜿çšããŠãã ããã",
+
+ "block.create.flywheel.tooltip": "å¢è»",
+ "block.create.flywheel.tooltip.summary": "_åãä»ããã®ãšã³ãžã³_ãçºçãã_åãå©çšããŠå®å®_ããã倧åã®éå±ãã€ãŒã«ã å¢è»ã_1 mé¢ããŠããŠ_ã_äºãã«90°ã®è§åºŠã«ãã_å Žåããšã³ãžã³ã«æ¥ç¶ããŸãã",
+ "block.create.flywheel.tooltip.condition1": "å®è¡äžã®ãšã³ãžã³ã«åãä»ããããŠããšã",
+ "block.create.flywheel.tooltip.behaviour1": "ãžã§ãã¬ãŒã¿ã®åŒ·åºŠãšé床ã«åºã¥ããŠãåãä»ããä»æãã«_å転å_ãæäŸããŸãã",
+
+ "block.create.portable_storage_interface.tooltip": "ããŒã¿ãã«ã¹ãã¬ãŒãžã€ã³ã¿ãŒãã§ã€ã¹",
+ "block.create.portable_storage_interface.tooltip.summary": "ãã¹ãã³ããã¢ãªã³ã°ããããã³ããŸãã¯ããŒãªãŒã«ãã£ãŠç§»åããã_æ§é ç©_ãšã®éã§_ã¢ã€ãã ã移å_ããããã®ããŒã¿ãã«äº€æãã€ã³ãã",
+ "block.create.portable_storage_interface.tooltip.condition1": "移åããŠããšã",
+ "block.create.portable_storage_interface.tooltip.behaviour1": "ã€ã³ã¿ãŒãã§ãŒã¹ã®_å察åŽ_ã«ãã_ãã©ã³ã¹ããŒã¶ãŒ_ã_ã¢ã€ãã ãåŒã£åŒµã_ãã€ã³ã¿ãŒãã§ãŒã¹ãã¿ãŒã²ãããšãããã©ã³ã¹ããŒã¶ãŒãæ¥ç¶ãããã€ã³ãã³ããªãã_ã¢ã€ãã ãæ¿å
¥_ããããã«ãåºå®ãã©ã³ã¹ããŒã¶ãŒãšçžäºäœçšããŸãã ã¢ã€ãã ã亀æããããšãããããã¯äžæçã«åæ¢ããŸãã",
+
+ "block.create.rotation_speed_controller.tooltip": "å転é床ã³ã³ãããŒã©ãŒ",
+ "block.create.rotation_speed_controller.tooltip.summary": "ã¿ãŒã²ããã³ã³ããŒãã³ããä»»æã®é床ã«å éãŸãã¯æžéã§ãã_æ§æå¯èœãªäžç¶_ã",
+ "block.create.rotation_speed_controller.tooltip.condition1": "倧ããªæ¯è»ã«åãä»ãããšã",
+ "block.create.rotation_speed_controller.tooltip.behaviour1": "å
¥ã£ãŠããå転åããã€ãŒã«ã«äžç¶ããç®æšãšããããã«æ§æããã_é床ã«äžèŽ_ãããããšããŸãã _æ¯è»ã¯ã³ã³ãããŒã©ãŒã®äžã«åãä»ãã_å¿
èŠããããŸãã",
+
+ "block.create.mechanical_piston.tooltip": "ã¡ã«ãã«ã«ãã¹ãã³",
+ "block.create.mechanical_piston.tooltip.summary": "_ãã¹ãã³_ããé«åºŠãªãã®ã _å転å_ã䜿çšããŠãåãä»ããããæ§é ç©ãæ£ç¢ºã«ç§»åããŸãã èé¢ã®_ãã¹ãã³å»¶é·æ¥µ_ã¯ããã®ããã€ã¹ã®_ç¯å²_ãå®çŸ©ããŸãã 延é·ããªããšããã¹ãã³ã¯åããŸããã _ã·ã£ãŒã·_ãŸãã¯_ã¹ã©ã€ã ãããã¯_ã䜿çšããŠã1è¡ä»¥äžã®ãããã¯ã移åããŸãã",
+ "block.create.mechanical_piston.tooltip.condition1": "å転ãããšã",
+ "block.create.mechanical_piston.tooltip.behaviour1": "åãä»ããããæ§é ç©ã®ç§»åãéå§ããŸãã é床ãšæ¹åã¯ãå
¥åãããå転é床ãšçžé¢ããŸãã",
+
+ "block.create.sticky_mechanical_piston.tooltip": "ç²çã¡ã«ãã«ã«ãã¹ãã³",
+ "block.create.sticky_mechanical_piston.tooltip.summary": "_ç²çãã¹ãã³_ããé«åºŠãªãã®ã _å転å_ã䜿çšããŠãåãä»ããããæ§é ç©ãæ£ç¢ºã«ç§»åããŸãã èé¢ã®_ãã¹ãã³å»¶é·æ¥µ_ã¯ããã®ããã€ã¹ã®_ç¯å²_ãå®çŸ©ããŸãã 延é·ããªããšããã¹ãã³ã¯åããŸããã _ã·ã£ãŒã·_ãŸãã¯_ã¹ã©ã€ã ãããã¯_ã䜿çšããŠã1è¡ä»¥äžã®ãããã¯ã移åããŸãã",
+ "block.create.sticky_mechanical_piston.tooltip.condition1": "å転ãããšã",
+ "block.create.sticky_mechanical_piston.tooltip.behaviour1": "åãä»ããããæ§é ç©ã®ç§»åãéå§ããŸãã é床ãšæ¹åã¯ãå
¥åãããå転é床ãšçžé¢ããŸãã",
+
+ "block.create.piston_pole.tooltip": "ãã¹ãã³ããŒã«",
+ "block.create.piston_pole.tooltip.summary": "ã¡ã«ãã«ã«ãã¹ãã³ã®ç¯å²ãæ¡åŒµããŸãã",
+ "block.create.piston_pole.tooltip.condition1": "ã¡ã«ãã«ã«ãã¹ãã³ã«åãä»ãããšã",
+ "block.create.piston_pole.tooltip.behaviour1": "ãã¹ãã³ã®ç¯å²ã1ãããã¯æ¡åŒµ",
+
+ "block.create.mechanical_bearing.tooltip": "ã¡ã«ãã«ã«ãã¢ãªã³ã°",
+ "block.create.mechanical_bearing.tooltip.summary": "_倧ããªæ§é ç©_ãå転ããããã颚ããã®_å転å_ãå©çšãããããããã«äœ¿çšãããŸãã",
+ "block.create.mechanical_bearing.tooltip.condition1": "å転ãããšã",
+ "block.create.mechanical_bearing.tooltip.behaviour1": "ã¢ã¿ããããããããã¯ã®å転ãéå§ããŸãã_ã·ã£ãŒã·_ãŸãã¯_ã¹ã©ã€ã ãããã¯_ã䜿çšããŠãè€æ°ã®ãããã¯ã移åããŸãã",
+ "block.create.mechanical_bearing.tooltip.condition2": "ã¬ããã¹ããŒã³ååãäžãããšã",
+ "block.create.mechanical_bearing.tooltip.behaviour2": "åãä»ããæ§é ç©ã®å転ããçæããã_å転å_ã®æäŸãéå§ããŸãã æ§é ã«ã¯ãé©åãª_åžãããã¯_ïŒçŸåšã¯ãã¹ãŠã®ãŠãŒã«ãããã¯ïŒãå«ããå¿
èŠããããŸãã",
+
+ "block.create.clockwork_bearing.tooltip": "æèšä»æããã¢ãªã³ã°",
+ "block.create.clockwork_bearing.tooltip.summary": "çŸåšã®_ã²ãŒã å
æé_ã«å¿ããŠæ倧2ã€ã®_æèšã®é_ãå転ãããã_ã¡ã«ãã«ã«ãã¢ãªã³ã°_ããé«åºŠãªãã®ã",
+ "block.create.clockwork_bearing.tooltip.condition1": "å転ãããšã",
+ "block.create.clockwork_bearing.tooltip.behaviour1": "çŸåšã®æéã«åãã£ãŠåãä»ããæ§é ç©ã®å転ãéå§ããŸãã 2çªç®ã®æ§é ãååšããå Žåãããã¯åéãšããŠæ©èœããŸãã",
+
+ "block.create.sequenced_gearshift.tooltip": "é 次ã®ã¢ã·ãã",
+ "block.create.sequenced_gearshift.tooltip.summary": "æ倧_5ã€ã®é£ç¶ããåœä»€_ã«åŸã£ãŠ_å転ã¹ã«ãŒããã_ãå€æŽã§ãã_ããã°ã©ã å¯èœ_ãª_ãŠãŒãã£ãªãã£ã³ã³ããŒãã³ã_ã ããã䜿çšããŠãã¡ã«ãã«ã«ãã¢ãªã³ã°ããã¹ãã³ããŸãã¯ããŒãªãŒã«ååãäŸçµŠããã¿ã€ãã³ã°ãšé床ããã现ããå¶åŸ¡ããŸãã é«éã§ã¯ç²ŸåºŠãäœäžããå¯èœæ§ããããŸãã",
+ "block.create.sequenced_gearshift.tooltip.condition1": "ã¬ããã¹ããŒã³ä¿¡å·ãäžãããšã",
+ "block.create.sequenced_gearshift.tooltip.behaviour1": "å
¥åé床ã«åºã¥ããŠããã°ã©ã ãããåœä»€ã®å®è¡ãéå§ããŸãã",
+ "block.create.sequenced_gearshift.tooltip.condition2": "å³ã¯ãªãã¯ãããšã",
+ "block.create.sequenced_gearshift.tooltip.behaviour2": "_èšå®ã€ã³ã¿ãŒãã§ãŒã¹_ãéããŸã",
+
+ "block.create.cart_assembler.tooltip": "ã«ãŒãã¢ãã»ã³ãã©ãŒ",
+ "block.create.cart_assembler.tooltip.summary": "æ¥ç¶ãããæ§é ç©ã_ééãããããã³_ã«åãä»ããŸãã",
+ "block.create.cart_assembler.tooltip.condition1": "ã¬ããã¹ããŒã³ä¿¡å·ãäžãããšã",
+ "block.create.cart_assembler.tooltip.behaviour1": "_ééããã«ãŒã_ã®ããŠã³ããããæ§é ç©ã_å解_ããããããã¯ãŒã«ãã«æ»ããŸãã",
+
+ "block.create.rope_pulley.tooltip": "ããŒãããŒãªãŒ",
+ "block.create.rope_pulley.tooltip.summary": "åãä»ãã_ãããã¯ãšæ§é ç©ãåçŽ_ã«ç§»åããŸãã _ã·ã£ãŒã·ãããã¯_ãŸãã¯_ã¹ã©ã€ã ãããã¯_ã䜿çšããŠã1ã€ä»¥äžã®ãããã¯ã移åããŸãã",
+ "block.create.rope_pulley.tooltip.condition1": "å転ãããšã",
+ "block.create.rope_pulley.tooltip.behaviour1": "åãä»ããæ§é ç©ã®ç§»åãéå§ããŸãã é床ãšæ¹åã¯ãå
¥åãããå転é床ã«çžé¢ããŸãã",
+
+ "block.create.translation_chassis.tooltip": "ãã©ã³ã¹ã·ã£ãŒã·",
+ "block.create.translation_chassis.tooltip.summary": "移åçšã®æ§é ãæ¥ç¶ããæ§æå¯èœãªããŒã¹ãããã¯ã",
+ "block.create.translation_chassis.tooltip.condition1": "移åãããšã",
+ "block.create.translation_chassis.tooltip.behaviour1": "_åãä»ãããããã¹ãŠã®ã·ã£ãŒã·_ãåãæ¹åã«ç§»åãããããã¯ã®åããã®ç¯å²å
ã«ç§»åããŸãã ãããã¯ã¯ãã·ã£ãŒã·ã®è¡šé¢ã_ç²çæ§_ãããå Žåã«ã®ã¿åŒã£åŒµãããŸãïŒ[Ctrl]ãåç
§ïŒã",
+ "block.create.translation_chassis.tooltip.condition2": "ã¬ã³ããããšã",
+ "block.create.translation_chassis.tooltip.behaviour2": "ãã®ã·ã£ãŒã·ãããã¯ã®_ç¯å²_ãæ§æããŸãã CTRLããŒãæŒãããŸãŸãæ¥ç¶ãããŠãããã¹ãŠã®ã·ã£ãŒã·ãããã¯ã®ç¯å²ãå€æŽããŸãã",
+ "block.create.translation_chassis.tooltip.control1": "ã¹ã©ã€ã ããŒã«ã§å³ã¯ãªãã¯ãããšã",
+ "block.create.translation_chassis.tooltip.action1": "ã¯ãªãã¯ããé¢ã_ç²çæ§_ã«ããŸãã 移åãããšãã·ã£ãŒã·ã¯ç§»åæ¹åã«é¢ä¿ãªããåãä»ãããããããã¯ã_åŒã£åŒµã_ãŸãã",
+
+ "block.create.rotation_chassis.tooltip": "å転ã·ã£ãŒã·",
+ "block.create.rotation_chassis.tooltip.summary": "移åçšã®æ§é ãåãä»ããæ§æå¯èœãªããŒã¹ãããã¯ã",
+ "block.create.rotation_chassis.tooltip.condition1": "åããããšã",
+ "block.create.rotation_chassis.tooltip.behaviour1": "åã«_åãä»ããããŠããã¹ãŠã®ã·ã£ãŒã·_ãããã³ããèªäœã®åšãã®ãããã¯ã®ã·ãªã³ããŒã_移å_ããŸãã åšå²ã®ãããã¯ã¯ãç¯å²å
ã«ãããç²çé¢ã«æ¥ç¶ãããŠããå Žåã«ã®ã¿ç§»åãããŸãïŒ[Ctrl]ãåç
§ïŒã",
+ "block.create.rotation_chassis.tooltip.condition2": "ã¬ã³ãã䜿ã£ããšã",
+ "block.create.rotation_chassis.tooltip.behaviour2": "ãã®ã·ã£ãŒã·ãããã¯ã®_ç¯å²_ãæ§æããŸãã CTRLããŒãæŒãããŸãŸãæ¥ç¶ãããŠãããã¹ãŠã®ã·ã£ãŒã·ãããã¯ã®ç¯å²ãå€æŽããŸãã",
+ "block.create.rotation_chassis.tooltip.control1": "ã¹ã©ã€ã ããŒã«ã§å³ã¯ãªãã¯ãããšã",
+ "block.create.rotation_chassis.tooltip.action1": "ã¯ãªãã¯ããé¢ã_ç²çæ§_ã«ããŸãã ã·ã£ãŒã·ã移åãããšãç²çé¢ã«æ¥ç¶ãããŠãããã¹ãŠã®æå®ãããã¯ãäžç·ã«ç§»åããŸãã",
+
+ "block.create.drill.tooltip": "æ©æ¢°ããªã«",
+ "block.create.drill.tooltip.summary": "_ãããã¯ãå£ã_ã®ã«é©ããæ©æ¢°è£
眮ã _ã¡ã«ãã«ã«ãã¹ãã³_ãŸãã¯_ãã¢ãªã³ã°_ã§ç§»åå¯èœã§ãã",
+ "block.create.drill.tooltip.condition1": "å転ãããšã",
+ "block.create.drill.tooltip.behaviour1": "_éæ¢_ãããããã¯ãã¬ãŒã«ãŒãšããŠæ©èœããŸãã ãŸããæå¹é åã®_ãšã³ãã£ãã£ãå·ã€ããŸã_ã",
+ "block.create.drill.tooltip.condition2": "åããããšã",
+ "block.create.drill.tooltip.behaviour2": "ããªã«ãè¡çªãããããã¯ãå£ããŸãã",
+
+ "block.create.harvester.tooltip": "ã¡ã«ãã«ã«ããŒãã¹ã¿ãŒ",
+ "block.create.harvester.tooltip.summary": "äžèŠæš¡ã®äœç©ã®èªååã«é©ããæ©æ¢°åŒæ€ç©ã«ãã¿ãŒã _ã¡ã«ãã«ã«ãã¹ãã³_ãŸãã¯_ãã¢ãªã³ã°_ã§ç§»åå¯èœã§ãã",
+ "block.create.harvester.tooltip.condition1": "åããããšã",
+ "block.create.harvester.tooltip.behaviour1": "ãã¬ãŒããè¡çªãã_ãã¹ãŠã®æçããäœç©ãåç©«_ããããããåæã®æé·ç¶æ
ã«ãªã»ããããŸãã",
+
+ "block.create.saw.tooltip": "ã¡ã«ãã«ã«éž",
+ "block.create.saw.tooltip.summary": "æšãå¹æçã«åæãããã倧工ãããã®ã«ãããã¯ãåæãããããã®ã«é©ããŠããŸãã ã¡ã«ãã«ã«ãã¹ãã³ãŸãã¯ãã¢ãªã³ã°ã䜿çšããŠç§»åå¯èœã§ãã",
+ "block.create.saw.tooltip.condition1": "äžåãã®ãšã",
+ "block.create.saw.tooltip.behaviour1": "ããã«ãããããŸãã¯æ¿å
¥ãããã¢ã€ãã ã«_補æ_ããã³ã¹ããŒã³ã«ããã£ã³ã°ã¬ã·ããé©çšããŸãã è€æ°ã®åºåãå¯èœãªå Žåããã£ã«ã¿ãŒãå²ãåœãŠãããŠããªãéããåºåã埪ç°ããŸãã",
+ "block.create.saw.tooltip.condition2": "暪åãã®å Žå",
+ "block.create.saw.tooltip.behaviour2": "ãã®åã§_åæšãåå²_ããŸãã åæšãããèªäœã§ããªãŒããµããŒãããŠããå Žåã_æšã¯ã®ãããããé¢ããŠåŽ©å£_ããŸãã",
+ "block.create.saw.tooltip.condition3": "åããããšã",
+ "block.create.saw.tooltip.behaviour3": "ã®ããããè¡çªãã_ãã¹ãŠã®æšãåãåããŸã_ã",
+
+ "block.create.stockswitch.tooltip": "åšåº«ã¹ã€ãã",
+ "block.create.stockswitch.tooltip.summary": "æ¥ç¶ãããã³ã³ããã®_空ã容é_ã«åºã¥ããŠã¬ããã¹ããŒã³ä¿¡å·ãåãæ¿ããŸãã",
+ "block.create.stockswitch.tooltip.condition1": "äžéãäžåã£ããšã",
+ "block.create.stockswitch.tooltip.behaviour1": "ã¬ããã¹ããŒã³ä¿¡å·ãåæ¢",
+ "block.create.stockswitch.tooltip.condition2": "äžéãè¶
ãããšãã",
+ "block.create.stockswitch.tooltip.behaviour2": "åã³äžéã«éãããŸã§ãã¬ããã¹ããŒã³ä¿¡å·ã®æäŸãéå§ããŸãã",
+ "block.create.stockswitch.tooltip.control1": "å³ã¯ãªãã¯ãããšã",
+ "block.create.stockswitch.tooltip.action1": "_èšå®ã€ã³ã¿ãŒãã§ãŒã¹_ãéããŸã",
+
+ "block.create.redstone_bridge.tooltip": "ã¬ããã¹ããŒã³ãªã³ã¯",
+ "block.create.redstone_bridge.tooltip.summary": "_ã¯ã€ã€ã¬ã¹ã¬ããã¹ããŒã³_æ¥ç¶ã®ãšã³ããã€ã³ãã ä»»æã®ã¢ã€ãã ã䜿çšããŠ_åšæ³¢æ°_ãå²ãåœãŠãããšãã§ããŸãã ä¿¡å·ç¯å²ã¯éãããŠããŸãããããªãé¢ããŠããŸãã",
+ "block.create.redstone_bridge.tooltip.condition1": "å
¥åããããšã",
+ "block.create.redstone_bridge.tooltip.behaviour1": "åãåšæ³¢æ°ã®ãªã³ã¯ãåä¿¡ãããšãã¬ããã¹ããŒã³ä¿¡å·ãçæãããŸãã",
+ "block.create.redstone_bridge.tooltip.control1": "ã¢ã€ãã ã§å³ã¯ãªãã¯ãããšã",
+ "block.create.redstone_bridge.tooltip.action1": "_åšæ³¢æ°_ããã®ã¢ã€ãã ã«èšå®ããŸãã åšæ³¢æ°ãå®çŸ©ããããã«ã_åèš2ã€ã®ç°ãªãã¢ã€ãã _ãçµã¿åãããŠäœ¿çšã§ããŸãã",
+ "block.create.redstone_bridge.tooltip.control2": "ã¹ããŒã¯ããªããå³ã¯ãªãã¯ãããšã",
+ "block.create.redstone_bridge.tooltip.action2": "_åä¿¡æ©_ã¢ãŒããš_éä¿¡æ©_ã¢ãŒããåãæ¿ããŸãã",
+
+ "block.create.contact.tooltip": "ã¬ããã¹ããŒã³ã³ã³ã¿ã¯ã",
+ "block.create.contact.tooltip.summary": "ã¬ããã¹ããŒã³ãã¯ãŒã®ã¿ããã¢ã§æŸåºããŸãã _ã¡ã«ãã«ã«ãã¹ãã³_ãŸãã¯_ãã¢ãªã³ã°_ã§ç§»åå¯èœã§ãã",
+ "block.create.contact.tooltip.condition1": "ä»ã®ã³ã³ã¿ã¯ãã«çŽé¢ãããšã",
+ "block.create.contact.tooltip.behaviour1": "ã¬ããã¹ããŒã³ä¿¡å·ãæäŸããŸãã",
+ "block.create.contact.tooltip.condition2": "åããããšã",
+ "block.create.contact.tooltip.behaviour2": "ééãããã¹ãŠã®åºå®æ¥ç¹ãããªã¬ãŒããŸãã",
+
+ "block.create.flexcrate.tooltip": "調æŽå¯èœãªã¯ã¬ãŒã",
+ "block.create.flexcrate.tooltip.summary": "ãã®_ã¹ãã¬ãŒãžã³ã³ãã_ã§ã¯ã容éãæåã§å¶åŸ¡ã§ããŸãã ä»»æã®ã¢ã€ãã ã®æ倧_16ã¹ã¿ãã¯_ãä¿æã§ããŸãã _ã¬ããã¹ããŒã³ã³ã³ãã¬ãŒã¿_ããµããŒãããŸãã",
+ "block.create.flexcrate.tooltip.control1": "å³ã¯ãªãã¯ãããšã",
+ "block.create.flexcrate.tooltip.action1": "_ã€ã³ã¿ãŒãã§ãŒã¹_ãéããŸã",
+
+ "block.create.extractor.tooltip": "æœåºåš",
+ "block.create.extractor.tooltip.summary": "ä»å±ã®ã€ã³ãã³ããªãã_ã¢ã€ãã ãåã_ãå°é¢ã«ããããããŸãã ã¹ããŒã¹ã空ããŠããªãéããã¢ã€ãã ã¯ãããããããŸããã _ãã£ã«ã¿ãŒ_ãšããŠã¢ã€ãã ã¹ã¿ãã¯ãå²ãåœãŠãããšãã§ããŸãã",
+ "block.create.extractor.tooltip.condition1": "ã¬ããã¹ããŒã³ä¿¡å·ããããšã",
+ "block.create.extractor.tooltip.behaviour1": "ãšã¯ã¹ãã©ã¯ã¿ã_äžæåæ¢_ããŸãã",
+ "block.create.extractor.tooltip.condition2": "ã¢ã¯ãã£ããã«ãçœåŒããããšã",
+ "block.create.extractor.tooltip.behaviour2": "ãšã¯ã¹ãã©ã¯ã¿ã¯ã_çã¡ã
ã補ã®ã±ãŒã·ã³ã°_ã§è£åŒ·ããã_ãã«ããã_ã¢ã€ãã ãåŒãåºãããšãã§ããŸãã ãšã¯ã¹ãã©ã¯ã¿ãè©°ãŸããšã_ãã«ããåæ¢_ããŸãã",
+ "block.create.extractor.tooltip.control1": "ãã£ã«ã¿ãŒã¹ããŒã¹ãå³ã¯ãªãã¯",
+ "block.create.extractor.tooltip.action1": "çŸåš_ä¿æãããŠããã¹ã¿ãã¯_ã_ãã£ã«ã¿ãŒ_ãšããŠå²ãåœãŠãŸãã ãšã¯ã¹ãã©ã¯ã¿ãŒã¯ãã¢ã€ãã _ã¿ã€ã_ãšãã£ã«ã¿ãŒã¹ã¿ãã¯ã®_æ°_ãæä»çã«ååŸããŸãã",
+
+ "block.create.transposer.tooltip": "ãã©ã³ã¹ããŒã¶ãŒ",
+ "block.create.transposer.tooltip.summary": "åãä»ããããã€ã³ãã³ããªãã_ã¢ã€ãã ãååŸ_ããããã«ã¿ãŒã²ãã_ã€ã³ãã³ããª_ã«å
¥ããŸãã _ãã£ã«ã¿ãŒ_ãšããŠã¢ã€ãã ã¹ã¿ãã¯ãå²ãåœãŠãããšãã§ããŸãã",
+ "block.create.transposer.tooltip.condition1": "ã¬ããã¹ããŒã³ä¿¡å·ããããšã",
+ "block.create.transposer.tooltip.behaviour1": "ãã©ã³ã¹ããŒã¶ã_äžæåæ¢_ããŸãã",
+ "block.create.transposer.tooltip.condition2": "ã¢ã¯ãã£ããã«ãçœåŒããããšã",
+ "block.create.transposer.tooltip.behaviour2": "ãã©ã³ã¹ããŒã¶ãŒã¯ã_çé®ã®ã±ãŒã·ã³ã°ã§è£åŒ·_ããã_ãã«ãããã¢ã€ãã _ãåŒã£åŒµãããšãã§ããŸãã ãã©ã³ã¹ããŒã¶ãããã¯ã¢ããããããšã_ãã«ããåæ¢_ããŸãã",
+ "block.create.transposer.tooltip.control1": "ãã£ã«ã¿ãŒã¹ããŒã¹ãå³ã¯ãªãã¯",
+ "block.create.transposer.tooltip.action1": "çŸåš_ä¿æãããŠããã¹ã¿ãã¯_ã_ãã£ã«ã¿ãŒ_ãšããŠå²ãåœãŠãŸãããã©ã³ã¹ããŒã¶ãŒã¯ããã£ã«ã¿ãŒã¹ã¿ãã¯ã®ã¢ã€ãã ã¿ã€ããš_ã«ãŠã³ã_ãæä»çã«ãã«ããŸãã",
+
+ "block.create.deployer.tooltip": "ãããã€ã€",
+ "block.create.deployer.tooltip.summary": "_ãã³ã_ã_䜿çš_ã_æå¹å_ã ãã®ãã·ã³ã¯ã_ãã¬ã€ã€ãŒ_ãã§ããã ã_ç䌌_ããããšããŸãã é£æ¥ããã€ã³ãã³ããªã®_ã¢ã€ãã ãåãåã_ã_é ãã_ããšãã§ããŸãã _ãã£ã«ã¿ãŒ_ãšããŠã¢ã€ãã ã¹ã¿ãã¯ãå²ãåœãŠãããšãã§ããŸãã",
+ "block.create.deployer.tooltip.condition1": "å転ãããšã",
+ "block.create.deployer.tooltip.behaviour1": "è
ã䌞ã°ãã_2må
_ã®ãããã¯ã¹ããŒã¹ã§_çºå_ã",
+ "block.create.deployer.tooltip.condition2": "ã¬ã³ãã§å³ã¯ãªãã¯ãããšã",
+ "block.create.deployer.tooltip.behaviour2": "ãã³ãã¢ãŒããåãæ¿ããŸãã _ãã³ãã¢ãŒã_ã§ã¯ããããã€ã€ã¯ãã®ã¢ã€ãã ã䜿çšããŠ_ãããã¯ãå£ããããšã³ãã£ãã£ãå·ã€ã_ããããããšããŸãã",
+
+ "block.create.linked_extractor.tooltip": "ãªã³ã¯ãšã¯ã¹ãã©ã¯ã¿ãŒ",
+ "block.create.linked_extractor.tooltip.summary": "åãä»ããŠã_ã€ã³ãã³ããª_ãã_ã¢ã€ãã ãåã_ãããããå°é¢ã«èœãšããŸãã ã¹ããŒã¹ã空ããŠããªãéããã¢ã€ãã ã¯ãããããããŸããã _ãã£ã«ã¿ãŒ_ãšããŠã¢ã€ãã ã¹ã¿ãã¯ãå²ãåœãŠãããšãã§ããŸãã _ã¬ããã¹ããŒã³ãªã³ã¯_ãä»ããŠãªã¢ãŒãã§å¶åŸ¡ã§ããŸãã",
+ "block.create.linked_extractor.tooltip.condition1": "ã¬ããã¹ããŒã³ãªã³ã¯ãã¢ã¯ãã£ããªå Žå",
+ "block.create.linked_extractor.tooltip.behaviour1": "ãšã¯ã¹ãã©ã¯ã¿ã_äžæåæ¢_ããŸãã",
+ "block.create.linked_extractor.tooltip.control1": "ãã£ã«ã¿ãŒã¹ããŒã¹ãå³ã¯ãªãã¯ãããšã",
+ "block.create.linked_extractor.tooltip.action1": "çŸåš_ä¿æãããŠããã¹ã¿ãã¯_ã_ãã£ã«ã¿ãŒ_ãšããŠå²ãåœãŠãŸãã ãšã¯ã¹ãã©ã¯ã¿ãŒã¯ã_ã¢ã€ãã ã¿ã€ã_ãšãã£ã«ã¿ãŒã¹ã¿ãã¯ã®_æ°_ãæä»çã«ååŸããŸãã",
+ "block.create.linked_extractor.tooltip.control2": "åšæ³¢æ°ã¹ããŒã¹ãå³ã¯ãªãã¯ãããšã",
+ "block.create.linked_extractor.tooltip.action2": "ãªãã¹ã³ãããŠããåšæ³¢æ°ã®äžéšãšããŠ_çŸåšä¿æ_ãããŠããã¢ã€ãã ãå²ãåœãŠãŸãã åãåšæ³¢æ°ã®éä¿¡_ã¬ããã¹ããŒã³ãªã³ã¯_ã«ååãäŸçµŠããããšããã®ãšã¯ã¹ãã©ã¯ã¿ãŒã¯äžæåæ¢ããŸãã",
+
+ "block.create.linked_transposer.tooltip": "ãªã³ã¯ããããã©ã³ã¹ããŒã¶ãŒ",
+ "block.create.linked_transposer.tooltip.summary": "åãä»ããŠã_ã€ã³ãã³ããª_ãã_ã¢ã€ãã ãååŸ_ããããã«ã¿ãŒã²ãã_ã€ã³ãã³ããª_ã«å
¥ããŸãã ãã£ã«ã¿ãŒãšããŠã¢ã€ãã ã¹ã¿ãã¯ãå²ãåœãŠãããšãã§ããŸãã _ã¬ããã¹ããŒã³ãªã³ã¯_ãä»ããŠãªã¢ãŒãã§å¶åŸ¡ã§ããŸãã",
+ "block.create.linked_transposer.tooltip.condition1": "ã¬ããã¹ããŒã³ãªã³ã¯ãã¢ã¯ãã£ãã®ãšã",
+ "block.create.linked_transposer.tooltip.behaviour1": "ãã©ã³ã¹ããŒã¶ã_äžæåæ¢_ããŸãã",
+ "block.create.linked_transposer.tooltip.control1": "ãã£ã«ã¿ãŒã¹ããŒã¹ãå³ã¯ãªãã¯ãããšã",
+ "block.create.linked_transposer.tooltip.action1": "çŸåš_ä¿æãããŠããã¹ã¿ãã¯_ã_ãã£ã«ã¿ãŒ_ãšããŠå²ãåœãŠãŸãã ãã©ã³ã¹ããŒã¶ãŒã¯ãã¢ã€ãã _ã¿ã€ã_ãšãã£ã«ã¿ãŒ_ã¹ã¿ãã¯_ã®æ°ã«äžèŽããã¢ã€ãã ã®ã¿ããã«ããŸãã",
+ "block.create.linked_transposer.tooltip.control2": "åšæ³¢æ°ã¹ããŒã¹ãå³ã¯ãªãã¯ãããšã",
+ "block.create.linked_transposer.tooltip.action2": "èŽããŠãåšæ³¢æ°ã®äžéšãšããŠçŸåš_ä¿æãããŠããã¢ã€ãã _ãå²ãåœãŠãŸãã åãåšæ³¢æ°ã®éä¿¡ã¬ããã¹ããŒã³ãªã³ã¯ã«ååãäŸçµŠããããšããã®ãã©ã³ã¹ããŒã¶ãŒã¯äžæåæ¢ããŸãã",
+
+ "block.create.belt_funnel.tooltip": "æŒæ",
+ "block.create.belt_funnel.tooltip.summary": "_å
¥åã¢ã€ãã ãåé_ããå¯èœãªå Žåã¯ããããåãä»ãã_ã€ã³ãã³ããª_ã«æ¿å
¥ããŸãã _äžç_ã®ã¢ã€ãã ã_ãã«ã_ã®ã¢ã€ãã ãéããããšãã§ããŸãã",
+ "block.create.belt_funnel.tooltip.condition1": "ããã·ããã«ãåŒã£åŒµã",
+ "block.create.belt_funnel.tooltip.behaviour1": "æŒæã¯ã_ãã«ãã®äž_ãã暪ãŸãã¯ç«¯ã«é
眮ãããšããã«ãããã¢ã€ãã ãåŒãåºãããšãã§ããŸãã 暪åãã®ãã¡ã³ãã«ãããã¯ã¢ãããããšã_ãã«ãäžã®ã¢ã€ãã ãåæ¢ããããšã¯ãããŸãã_ã",
+
+ "block.create.belt_tunnel.tooltip": "ãã«ããã³ãã«",
+ "block.create.belt_tunnel.tooltip.summary": "_ã¡ã«ãã«ã«ãã«ã_ãå£ã«éãããã®çŸçãªãªãã·ã§ã³ã ãã«ãã¯çé®ã®_ã±ãŒã·ã³ã°_ã§_è£åŒ·_ããå¿
èŠããããŸãã ãã³ãã«ã¯_é£æ¥_ã°ã«ãŒããšåæã§ããã°ã«ãŒãå
ã®ãã¹ãŠã®ãã³ãã«ã«1ã€ã®åŸ
æ©ãããå Žåã«ã®ã¿ã¢ã€ãã ãééãããŸãã [Ctrl]",
+ "block.create.belt_tunnel.tooltip.control1": "åé¢ãã¬ã³ãã§å³ã¯ãªãã¯",
+ "block.create.belt_tunnel.tooltip.action1": "_åæåäœ_ãåãæ¿ããŸãã åæããããã³ãã«ã¯ããã€ããŒãã¢ã€ãã ãååŸãããŸã§ã¢ã€ãã ãä¿æããŸãã",
+ "block.create.belt_tunnel.tooltip.control2": "暪é¢ãã¬ã³ãã§å³ã¯ãªãã¯",
+ "block.create.belt_tunnel.tooltip.action2": "ãã³ãã«ã«ãã®é¢ã«çªãããå Žåã_çªã·ã£ãã¿ãŒã調æŽ_ããŸãã",
+
+ "block.create.brass_casing.tooltip": "çã¡ã
ãã®ã±ãŒã·ã³ã°",
+ "block.create.brass_casing.tooltip.summary": "ããŸããŸãªçšéã«äœ¿çšã§ããé äžãªæ©æ¢°ã±ãŒã·ã³ã°ã è£
食çšã«ãå®å
šã§ãã",
+ "block.create.brass_casing.tooltip.condition1": "ã¡ã«ãã«ã«ãã«ãã«äœ¿çšãããšã",
+ "block.create.brass_casing.tooltip.behaviour1": "çé®è£œã®ãã¡ã³ããŒã·ã§ã³ã§ãã«ããè£åŒ·ããŸãã 匷åãã«ãã¯ããã«ããã³ãã«ããšã¯ã¹ãã©ã¯ã¿ããã¡ã³ãã«ãããã³ãã©ã³ã¹ããŒã¶ããã«ãã®åŽé¢ããã³äžããçžäºäœçšããããšããµããŒãã§ããŸãã",
+
+ "block.create.entity_detector.tooltip": "ãã«ããªãã¶ãŒããŒ",
+ "block.create.entity_detector.tooltip.summary": "ãã®åã®ã¡ã«ãã«ã«ãã«ãäžãéãéããã¢ã€ãã ãšãšã³ãã£ãã£ãæ€åºããŸãã ã¬ã³ãã䜿çšããŠããã®åäœã埪ç°ãããŸãã éã¢ã€ãã ã¯ãèšå®ã«é¢ä¿ãªãåžžã«æ€åºã¢ãŒãã§åŠçãããŸãã",
+ "block.create.entity_detector.tooltip.condition1": "æ€åºã¢ãŒã",
+ "block.create.entity_detector.tooltip.behaviour1": "_äžèŽããã¢ã€ãã ã芳枬_ããããã«ãã»ã°ã¡ã³ãã«ããéãã¬ããã¹ããŒã³ãåºåããŸãã",
+ "block.create.entity_detector.tooltip.condition2": "ãã«ã¹ã¢ãŒã",
+ "block.create.entity_detector.tooltip.behaviour2": "äžèŽããã¢ã€ãã ã芳枬_ããããã«ãã»ã°ã¡ã³ãã®äžå¿ãééãããšãã«_ãã«ã¹_ãçºããŸãã",
+ "block.create.entity_detector.tooltip.condition3": "ã€ãžã§ã¯ãã¢ãŒã",
+ "block.create.entity_detector.tooltip.behaviour3": "_äžèŽããã¢ã€ãã _ãåŽé¢ããæåºããŸãã 察象ã®ãã«ããã¹ããŒã¹ãå æãããŠããå Žåãã¢ã€ãã ã¯_æå®ã®äœçœ®ã«ä¿æ_ãããŸãã",
+ "block.create.entity_detector.tooltip.condition4": "åå²ã¢ãŒã",
+ "block.create.entity_detector.tooltip.behaviour4": "_äžèŽããã¢ã€ãã ã¹ã¿ãã¯_ãåå²ãããã®_åå_ãåŽé¢ãã_æåº_ããŸãã",
+
+ "block.create.pulse_repeater.tooltip": "ãã«ã¹ãªããŒã¿ãŒ",
+ "block.create.pulse_repeater.tooltip.summary": "ééããã¬ããã¹ããŒã³ä¿¡å·ã_1ãã£ãã¯_ã®é·ãã«ã«ããããç°¡åãªåè·¯ã",
+
+ "block.create.flexpeater.tooltip": "ãã¬ãã¯ã¹ãªããŒã¿ãŒ",
+ "block.create.flexpeater.tooltip.summary": "æ倧_30å_ã®é
延ã_èšå®å¯èœ_ãªé«åºŠãª_ã¬ããã¹ããŒã³ãªããŒã¿ãŒ_ã",
+
+ "block.create.flexpulsepeater.tooltip": "ãã¬ãã¯ã¹ãã«ã¹ãªããŒã¿ãŒ",
+ "block.create.flexpulsepeater.tooltip.summary": "æ倧_30å_ã®é
延ã_èšå®å¯èœ_ãª_ãã«ã¹ãªããŒã¿ãŒ_ã",
+
+ "block.create.analog_lever.tooltip": "ã¢ããã°ã¬ããŒ",
+ "block.create.analog_lever.tooltip.summary": "_çºä¿¡ä¿¡å·åŒ·åºŠ_ããã_æ£ç¢ºã«å¶åŸ¡_ããã¬ããŒã",
+
+ "block.create.toggle_latch.tooltip": "ãã¯ãŒããã°ã«ã©ãã",
+ "block.create.toggle_latch.tooltip.summary": "ã¬ããã¹ããŒã³ãã«ã¹ã«ãã£ãŠãã°ã«ã§ããã¬ããŒã",
+
+ "block.create.redstone_latch.tooltip": "ãã¯ãŒãã©ãã",
+ "block.create.redstone_latch.tooltip.summary": "_ã¬ããã¹ããŒã³ä¿¡å·_ã§å¶åŸ¡ã§ããã¬ããŒã _èé¢ã®ä¿¡å·_ã¯ãããå¯èœã«ãã_åŽé¢ããã®ä¿¡å·_ã¯ããããªã»ããããŸãã",
+
+ "block.create.speed_gauge.tooltip": "ã¹ããŒãã¡ãŒã¿ãŒ",
+ "block.create.speed_gauge.tooltip.summary": "æ¥ç¶ãããååã³ã³ããŒãã³ãã®_å転é床_ã枬å®ããŠè¡šç€ºããŸãã _ã¬ããã¹ããŒã³ã³ã³ãã¬ãŒã¿_ããµããŒãããŸãã",
+ "block.create.speed_gauge.tooltip.condition1": "å転ãããšã",
+ "block.create.speed_gauge.tooltip.behaviour1": "é床ã®ã¬ãã«ã«å¯Ÿå¿ããè²ã瀺ããŸãã _ç·_ã¯äœéã_é_ã¯äžçšåºŠã_玫_ã¯é«éå転ã瀺ããŸãã äžéšã®æ©æ¢°ã³ã³ããŒãã³ãã¯ãé©åã«æ©èœããããã«ååãªã¬ãã«ã®é床ãå¿
èŠãšããŸãã",
+
+ "block.create.stress_gauge.tooltip": "ã¹ãã¬ã¹ã¡ãŒã¿ãŒ",
+ "block.create.stress_gauge.tooltip.summary": "æ¥ç¶ãããååãããã¯ãŒã¯ã®å
šäœçãªå¿åã枬å®ããŠè¡šç€ºããŸãã ã¬ããã¹ããŒã³ã³ã³ãã¬ãŒã¿ããµããŒãããŸãã",
+ "block.create.stress_gauge.tooltip.condition1": "å転ãããšã",
+ "block.create.stress_gauge.tooltip.behaviour1": "å¿åã®ã¬ãã«ã«å¯Ÿå¿ããè²ã瀺ããŸãã _é床ã«å¿åãããã£ããããã¯ãŒã¯_ã¯åããæ¢ããŸãã ãããã¯ãŒã¯ã«_å転æº_ãè¿œå ããããšã§ãå¿åã軜æžã§ããŸãã",
+
+ "tool.create.sand_paper.tooltip": "ãµã³ãããŒããŒ",
+ "tool.create.sand_paper.tooltip.summary": "_çŽ æã磚ããã_ã_éå
·_ãç ãããã«äœ¿çšã§ããç²ãçŽã",
+ "tool.create.sand_paper.tooltip.condition1": "䜿çšãããšã",
+ "tool.create.sand_paper.tooltip.behaviour1": "ãªããã³ãã§æã£ãŠããã¢ã€ãã ãå°é¢ã«èœã¡ãŠããã¢ã€ãã ãèŠããšç 磚ããŸã",
+
+ "item.create.refined_radiance.tooltip": "æŽç·ŽãããæŸå°",
+ "item.create.refined_radiance.tooltip.summary": "_åžåãããå
_ããéé ãããã¯ããããã¯ãããªã¢ã«ã",
+
+ "item.create.shadow_steel.tooltip": "ã·ã£ããŠã¹ããŒã«",
+ "item.create.shadow_steel.tooltip.summary": "_èç¡_ããéé ãããã¯ãããã£ãã¯ãããªã¢ã«ã",
+
+ "item.create.slot_cover.tooltip": "ã¹ãããã«ããŒ",
+ "item.create.slot_cover.tooltip.summary": "_ã¡ã«ãã«ã«ã¯ã©ãã¿ãŒ_ã§ã¬ã·ãã®ç©ºã®ã¹ããããšããŠããŒã¯ããããã«äœ¿çšãããŸãã ã¯ã©ãã¿ãŒã¯å¿
ãããå®å
šãªæ£æ¹æ Œåã圢æããå¿
èŠã¯ãããŸããã ããã¯ã_æåãäºãã«å¯Ÿè§ç·_ã§ããã¬ã·ããããå Žåã«åœ¹ç«ã¡ãŸãã",
+
+ "tool.create.shadow_steel.tooltip": "ã·ã£ããŠã¹ããŒã«ããŒã«",
+ "tool.create.shadow_steel.tooltip.summary": "ç¹å®ã®ãããã¯ãŸãã¯ãšã³ãã£ãã£ããã®_ãããããç Žå£_ããé«éã§åŒ·åãªããŒã«ã 殺ãããã¢ãã¯ããã®ããŒã«ã®_ããããå¢å _ã¢ãã£ãã¡ã€ã¢ãŒã«åºã¥ããŠ_ããå€ãã®çµéšå€_ãèœãšããŸãã",
+
+ "tool.create.blazing.tooltip": "ãã¬ãŒãžã³ã°ããŒã«",
+ "tool.create.blazing.tooltip.summary": "ãã®ããŒã«ã¯_ç Žå£ãããããã¯ã溶ãã_ã_æ»æãããã¢ããçäž_ãããŸãã _ãã¶ãŒ_ã§äœ¿çšãããšèä¹
å°ã¯æžããŸããã",
+
+ "tool.create.rose_quartz.tooltip": "ããŒãºã¯ã©ãŒãããŒã«",
+ "tool.create.rose_quartz.tooltip.summary": "ãã®ããŒã«ã¯ã_ãããã¯ãå£ããã_ããªããã³ããã_ãããã¯ãèšçœ®_ããããããšãã_倧ããªãªãŒã_ã«ãªããŸãã",
+
+ "itemGroup.create": "Create"
+}