Mixing it up

- Added the Mechanical Mixer for automated shapeless recipes
- Added the Basin holding multiple items for processing
- Added a Wrench for manipulating Scrollvalues, picking up and rotating kinetic blocks
- Extractors and Funnels now require a block to attach to
- Fixed Animation ticks being synced with the server world time
- Fixed "Magical Soaryn Gears"
- Gearboxes can now connect to each other directly
- Fixed Belt items not stacking even after finishing a link
This commit is contained in:
simibubi 2019-10-29 19:02:20 +01:00
parent 44dc7e054b
commit f2eba6b8fb
64 changed files with 2450 additions and 89 deletions

View file

@ -9,11 +9,14 @@ import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.modules.IModule;
import com.simibubi.create.modules.contraptions.generators.MotorBlock;
import com.simibubi.create.modules.contraptions.generators.WaterWheelBlock;
import com.simibubi.create.modules.contraptions.receivers.BasinBlock;
import com.simibubi.create.modules.contraptions.receivers.CrushingWheelBlock;
import com.simibubi.create.modules.contraptions.receivers.CrushingWheelControllerBlock;
import com.simibubi.create.modules.contraptions.receivers.DrillBlock;
import com.simibubi.create.modules.contraptions.receivers.EncasedFanBlock;
import com.simibubi.create.modules.contraptions.receivers.HarvesterBlock;
import com.simibubi.create.modules.contraptions.receivers.MechanicalMixerBlock;
import com.simibubi.create.modules.contraptions.receivers.MechanicalMixerBlock.MechanicalMixerBlockItem;
import com.simibubi.create.modules.contraptions.receivers.MechanicalPressBlock;
import com.simibubi.create.modules.contraptions.receivers.TurntableBlock;
import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalBearingBlock;
@ -84,6 +87,7 @@ public enum AllBlocks {
SHAFT(new ShaftBlock(Properties.from(Blocks.ANDESITE))),
COGWHEEL(new CogWheelBlock(false)),
LARGE_COGWHEEL(new CogWheelBlock(true)),
SHAFTLESS_COGWHEEL(new RenderUtilityAxisBlock()),
ENCASED_SHAFT(new EncasedShaftBlock()),
ENCASED_BELT(new EncasedBeltBlock()),
CLUTCH(new ClutchBlock()),
@ -99,10 +103,16 @@ public enum AllBlocks {
ENCASED_FAN_INNER(new RenderUtilityAxisBlock()),
TURNTABLE(new TurntableBlock()),
SHAFT_HALF(new ShaftHalfBlock()),
CRUSHING_WHEEL(new CrushingWheelBlock()),
CRUSHING_WHEEL_CONTROLLER(new CrushingWheelControllerBlock()),
MECHANICAL_PRESS(new MechanicalPressBlock()),
MECHANICAL_PRESS_HEAD(new MechanicalPressBlock.Head()),
MECHANICAL_MIXER(new MechanicalMixerBlock()),
MECHANICAL_MIXER_POLE(new RenderUtilityBlock()),
MECHANICAL_MIXER_HEAD(new RenderUtilityBlock()),
BASIN(new BasinBlock()),
MECHANICAL_PISTON(new MechanicalPistonBlock(false)),
STICKY_MECHANICAL_PISTON(new MechanicalPistonBlock(true)),
MECHANICAL_PISTON_HEAD(new MechanicalPistonHeadBlock()),
@ -139,7 +149,7 @@ public enum AllBlocks {
__PALETTES__(),
TILED_GLASS(new GlassBlock(Properties.from(Blocks.GLASS))),
TILED_GLASS_PANE(new GlassPaneBlock(Properties.from(Blocks.GLASS))),
ANDESITE_BRICKS(new Block(Properties.from(Blocks.ANDESITE))),
DIORITE_BRICKS(new Block(Properties.from(Blocks.DIORITE))),
GRANITE_BRICKS(new Block(Properties.from(Blocks.GRANITE))),
@ -223,8 +233,15 @@ public enum AllBlocks {
}
private static void registerAsItem(IForgeRegistry<Item> registry, Block blockIn) {
registry.register(
new BlockItem(blockIn, AllItems.standardItemProperties()).setRegistryName(blockIn.getRegistryName()));
BlockItem blockItem = null;
net.minecraft.item.Item.Properties standardItemProperties = AllItems.standardItemProperties();
if (blockIn == AllBlocks.MECHANICAL_MIXER.get())
blockItem = new MechanicalMixerBlockItem(standardItemProperties);
else
blockItem = new BlockItem(blockIn, standardItemProperties);
registry.register(blockItem.setRegistryName(blockIn.getRegistryName()));
}
public Block get() {
@ -259,8 +276,7 @@ public enum AllBlocks {
return null;
}
return featured.setRegistryName(Create.ID,
block.getRegistryName().getPath() + "_" + Lang.asId(feature.name()));
return featured.setRegistryName(Create.ID, block.getRegistryName().getPath() + "_" + Lang.asId(feature.name()));
}
@OnlyIn(Dist.CLIENT)

View file

@ -3,6 +3,8 @@ package com.simibubi.create;
import com.simibubi.create.foundation.item.IItemWithColorHandler;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.modules.IModule;
import com.simibubi.create.modules.contraptions.WrenchItem;
import com.simibubi.create.modules.contraptions.WrenchItemRenderer;
import com.simibubi.create.modules.contraptions.relays.VerticalGearboxItem;
import com.simibubi.create.modules.contraptions.relays.belt.BeltItem;
import com.simibubi.create.modules.curiosities.ChromaticCompoundCubeItem;
@ -76,6 +78,7 @@ public enum AllItems {
FLOUR(ingredient()),
DOUGH(ingredient()),
PROPELLER(ingredient()),
WRENCH(new WrenchItem(standardItemProperties().setTEISR(() -> () -> renderUsing(AllItemRenderers.WRENCH)))),
;
@ -134,7 +137,7 @@ public enum AllItems {
// Client
private enum AllItemRenderers {
SYMMETRY_WAND, BUILDER_GUN,;
SYMMETRY_WAND, BUILDER_GUN, WRENCH;
}
@OnlyIn(Dist.CLIENT)
@ -155,6 +158,8 @@ public enum AllItems {
return new SymmetryWandItemRenderer();
case BUILDER_GUN:
return new BuilderGunItemRenderer();
case WRENCH:
return new WrenchItemRenderer();
default:
return null;
}

View file

@ -7,6 +7,7 @@ import java.util.function.Supplier;
import com.simibubi.create.foundation.packet.NbtPacket;
import com.simibubi.create.foundation.packet.SimplePacketBase;
import com.simibubi.create.modules.contraptions.generators.ConfigureMotorPacket;
import com.simibubi.create.modules.contraptions.receivers.ConfigureMixerPacket;
import com.simibubi.create.modules.contraptions.receivers.constructs.ConfigureChassisPacket;
import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunBeamPacket;
import com.simibubi.create.modules.curiosities.symmetry.SymmetryEffectPacket;
@ -33,6 +34,7 @@ public enum AllPackets {
CONFIGURE_CHASSIS(ConfigureChassisPacket.class, ConfigureChassisPacket::new),
CONFIGURE_MOTOR(ConfigureMotorPacket.class, ConfigureMotorPacket::new),
CONFIGURE_FLEXPEATER(ConfigureFlexpeaterPacket.class, ConfigureFlexpeaterPacket::new),
CONFIGURE_MIXER(ConfigureMixerPacket.class, ConfigureMixerPacket::new),
PLACE_SCHEMATIC(SchematicPlacePacket.class, SchematicPlacePacket::new),
UPLOAD_SCHEMATIC(SchematicUploadPacket.class, SchematicUploadPacket::new),

View file

@ -7,11 +7,15 @@ import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
import com.simibubi.create.modules.contraptions.generators.MotorTileEntity;
import com.simibubi.create.modules.contraptions.generators.MotorTileEntityRenderer;
import com.simibubi.create.modules.contraptions.generators.WaterWheelTileEntity;
import com.simibubi.create.modules.contraptions.receivers.BasinTileEntity;
import com.simibubi.create.modules.contraptions.receivers.BasinTileEntityRenderer;
import com.simibubi.create.modules.contraptions.receivers.CrushingWheelControllerTileEntity;
import com.simibubi.create.modules.contraptions.receivers.CrushingWheelTileEntity;
import com.simibubi.create.modules.contraptions.receivers.DrillTileEntity;
import com.simibubi.create.modules.contraptions.receivers.EncasedFanTileEntity;
import com.simibubi.create.modules.contraptions.receivers.EncasedFanTileEntityRenderer;
import com.simibubi.create.modules.contraptions.receivers.MechanicalMixerTileEntity;
import com.simibubi.create.modules.contraptions.receivers.MechanicalMixerTileEntityRenderer;
import com.simibubi.create.modules.contraptions.receivers.MechanicalPressTileEntity;
import com.simibubi.create.modules.contraptions.receivers.MechanicalPressTileEntityRenderer;
import com.simibubi.create.modules.contraptions.receivers.TurntableTileEntity;
@ -82,6 +86,8 @@ public enum AllTileEntities {
CRUSHING_WHEEL_CONTROLLER(CrushingWheelControllerTileEntity::new, AllBlocks.CRUSHING_WHEEL_CONTROLLER),
WATER_WHEEL(WaterWheelTileEntity::new, AllBlocks.WATER_WHEEL),
MECHANICAL_PRESS(MechanicalPressTileEntity::new, AllBlocks.MECHANICAL_PRESS),
MECHANICAL_MIXER(MechanicalMixerTileEntity::new, AllBlocks.MECHANICAL_MIXER),
BASIN(BasinTileEntity::new, AllBlocks.BASIN),
// Logistics
REDSTONE_BRIDGE(RedstoneBridgeTileEntity::new, AllBlocks.REDSTONE_BRIDGE),
@ -143,6 +149,8 @@ public enum AllTileEntities {
bind(EntityDetectorTileEntity.class, new EntityDetectorTileEntityRenderer());
bind(MechanicalPressTileEntity.class, new MechanicalPressTileEntityRenderer());
bind(FlexpeaterTileEntity.class, new FlexpeaterTileEntityRenderer());
bind(MechanicalMixerTileEntity.class, new MechanicalMixerTileEntityRenderer());
bind(BasinTileEntity.class, new BasinTileEntityRenderer());
}
@OnlyIn(Dist.CLIENT)

View file

@ -3,9 +3,9 @@ package com.simibubi.create;
import java.util.ArrayList;
import java.util.List;
import com.simibubi.create.compat.jei.AnimationTickHolder;
import com.simibubi.create.foundation.block.IBlockWithScrollableValue;
import com.simibubi.create.foundation.gui.ScreenOpener;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.TooltipHelper;
import com.simibubi.create.modules.contraptions.receivers.TurntableHandler;
import com.simibubi.create.modules.contraptions.relays.belt.BeltItemHandler;

View file

@ -4,6 +4,7 @@ import java.util.Map;
import java.util.function.Function;
import com.simibubi.create.modules.contraptions.CachedBufferReloader;
import com.simibubi.create.modules.contraptions.WrenchModel;
import com.simibubi.create.modules.contraptions.receivers.EncasedFanParticleHandler;
import com.simibubi.create.modules.curiosities.partialWindows.WindowInABlockModel;
import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunModel;
@ -38,7 +39,8 @@ public class CreateClient {
public static SchematicHologram schematicHologram;
public static SchematicAndQuillHandler schematicAndQuillHandler;
public static EncasedFanParticleHandler fanParticles;
public static int renderTicks;
public static ModConfig config;
public static void addListeners(IEventBus modEventBus) {
@ -90,6 +92,8 @@ public class CreateClient {
t -> new SymmetryWandModel(t).loadPartials(event));
swapModels(modelRegistry, getItemModelLocation(AllItems.PLACEMENT_HANDGUN),
t -> new BuilderGunModel(t).loadPartials(event));
swapModels(modelRegistry, getItemModelLocation(AllItems.WRENCH),
t -> new WrenchModel(t).loadPartials(event));
swapModels(modelRegistry,
getBlockModelLocation(AllBlocks.WINDOW_IN_A_BLOCK,
BlockModelShapes
@ -108,6 +112,8 @@ public class CreateClient {
ModelLoader.addSpecialModel(new ResourceLocation(Create.ID, "item/" + location));
for (String location : BuilderGunModel.getCustomModelLocations())
ModelLoader.addSpecialModel(new ResourceLocation(Create.ID, "item/" + location));
for (String location : WrenchModel.getCustomModelLocations())
ModelLoader.addSpecialModel(new ResourceLocation(Create.ID, "item/" + location));
}
protected static ModelResourceLocation getItemModelLocation(AllItems item) {

View file

@ -1,5 +1,7 @@
package com.simibubi.create.compat.jei;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import mezz.jei.api.gui.drawable.IDrawable;
import net.minecraft.client.Minecraft;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.compat.jei;
import static com.simibubi.create.compat.jei.AnimationTickHolder.ticks;
import static com.simibubi.create.foundation.utility.AnimationTickHolder.ticks;
import com.mojang.blaze3d.platform.GlStateManager;
import com.simibubi.create.AllBlocks;

View file

@ -1,11 +0,0 @@
package com.simibubi.create.compat.jei;
public class AnimationTickHolder {
protected static int ticks;
public static void tick() {
ticks++;
}
}

View file

@ -1,6 +1,7 @@
package com.simibubi.create.foundation.block;
import com.mojang.blaze3d.platform.GlStateManager;
import com.simibubi.create.AllItems;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.TessellatorHelper;
import com.simibubi.create.foundation.utility.VecHelper;
@ -42,10 +43,18 @@ public interface IBlockWithScrollableValue {
public Direction getValueBoxDirection(BlockState state, IWorld world, BlockPos pos);
public default boolean isValueOnAllSides() {
public default boolean isValueOnMultipleFaces() {
return false;
}
public default boolean requiresWrench() {
return false;
}
public default boolean isValueOnFace(Direction face) {
return true;
}
public default String getValueSuffix(BlockState state, IWorld world, BlockPos pos) {
return "";
}
@ -70,11 +79,16 @@ public interface IBlockWithScrollableValue {
IBlockWithScrollableValue block = (IBlockWithScrollableValue) state.getBlock();
Vec3d pos = new Vec3d(blockPos);
if (block.requiresWrench() && !AllItems.WRENCH.typeOf(mc.player.getHeldItemMainhand()))
return;
Vec3d valueBoxPosition = block.getValueBoxPosition(state, world, blockPos);
AxisAlignedBB bb = VALUE_BB.offset(valueBoxPosition);
bb = bb.grow(1 / 128f);
Direction facing = block.isValueOnAllSides() ? result.getFace()
Direction facing = block.isValueOnMultipleFaces() ? result.getFace()
: block.getValueBoxDirection(state, world, blockPos);
if (block.isValueOnMultipleFaces() && !block.isValueOnFace(result.getFace()))
return;
Vec3d cursor = result.getHitVec().subtract(VecHelper.getCenterOf(blockPos));
cursor = VecHelper.rotate(cursor, facing.getHorizontalAngle() + 90, Axis.Y);
@ -185,10 +199,14 @@ public interface IBlockWithScrollableValue {
return false;
IBlockWithScrollableValue block = (IBlockWithScrollableValue) state.getBlock();
if (block.requiresWrench() && !AllItems.WRENCH.typeOf(mc.player.getHeldItemMainhand()))
return false;
Vec3d valueBoxPosition = block.getValueBoxPosition(state, world, blockPos);
AxisAlignedBB bb = VALUE_BB.offset(valueBoxPosition);
bb = bb.grow(1 / 128f);
Direction facing = block.isValueOnAllSides() ? result.getFace()
Direction facing = block.isValueOnMultipleFaces() ? result.getFace()
: block.getValueBoxDirection(state, world, blockPos);
Vec3d cursor = result.getHitVec().subtract(VecHelper.getCenterOf(blockPos));

View file

@ -0,0 +1,17 @@
package com.simibubi.create.foundation.utility;
import net.minecraft.client.Minecraft;
public class AnimationTickHolder {
public static int ticks;
public static void tick() {
ticks++;
}
public static float getRenderTick() {
return (ticks + Minecraft.getInstance().getRenderPartialTicks()) / 20;
}
}

View file

@ -45,8 +45,16 @@ public class RotationPropagator {
final Direction direction = Direction.getFacingFromVector(diff.getX(), diff.getY(), diff.getZ());
final World world = from.getWorld();
boolean connectedByAxis = definitionFrom.hasShaftTowards(world, from.getPos(), stateFrom, direction)
boolean alignedAxes = true;
for (Axis axis : Axis.values())
if (axis != direction.getAxis())
if (axis.getCoordinate(diff.getX(), diff.getY(), diff.getZ()) != 0)
alignedAxes = false;
boolean connectedByAxis = alignedAxes
&& definitionFrom.hasShaftTowards(world, from.getPos(), stateFrom, direction)
&& definitionTo.hasShaftTowards(world, to.getPos(), stateTo, direction.getOpposite());
boolean connectedByGears = definitionFrom.hasCogsTowards(world, from.getPos(), stateFrom, direction)
&& definitionTo.hasCogsTowards(world, to.getPos(), stateTo, direction.getOpposite());
@ -55,10 +63,6 @@ public class RotationPropagator {
return ((BeltTileEntity) from).getController().equals(((BeltTileEntity) to).getController()) ? 1 : 0;
}
// Gearbox <-> Gearbox
if (from instanceof GearboxTileEntity && to instanceof GearboxTileEntity)
return 0;
// Axis <-> Axis
if (connectedByAxis) {
return getAxisModifier(from, direction) * getAxisModifier(to, direction.getOpposite());
@ -84,7 +88,7 @@ public class RotationPropagator {
Axis targetAxis = stateTo.get(AXIS);
int sourceAxisDiff = sourceAxis.getCoordinate(diff.getX(), diff.getY(), diff.getZ());
int targetAxisDiff = targetAxis.getCoordinate(diff.getX(), diff.getY(), diff.getZ());
return sourceAxisDiff > 0 ^ targetAxisDiff > 0 ? -1 : 1;
}
@ -100,7 +104,7 @@ public class RotationPropagator {
return 0;
if (LARGE_COGWHEEL.typeOf(stateTo))
return 0;
if (stateFrom.get(AXIS) == stateTo.get(AXIS))
if (definitionFrom.getRotationAxis(stateFrom) == definitionTo.getRotationAxis(stateTo))
return -1;
}

View file

@ -0,0 +1,48 @@
package com.simibubi.create.modules.contraptions;
import com.simibubi.create.modules.contraptions.base.IRotate;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemUseContext;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
public class WrenchItem extends Item {
public WrenchItem(Properties properties) {
super(properties);
}
@Override
public ActionResultType onItemUse(ItemUseContext context) {
PlayerEntity player = context.getPlayer();
if (!player.isAllowEdit())
return super.onItemUse(context);
World world = context.getWorld();
BlockPos pos = context.getPos();
BlockState state = world.getBlockState(pos);
if (!(state.getBlock() instanceof IRotate))
return super.onItemUse(context);
IRotate actor = (IRotate) state.getBlock();
if (player.isSneaking()) {
if (world instanceof ServerWorld) {
if (!player.isCreative())
Block.getDrops(state, (ServerWorld) world, pos, world.getTileEntity(pos)).forEach(itemStack -> {
player.inventory.placeItemBackInInventory(world, itemStack);
});
world.destroyBlock(pos, false);
}
return ActionResultType.SUCCESS;
}
return actor.onWrenched(state, context);
}
}

View file

@ -0,0 +1,37 @@
package com.simibubi.create.modules.contraptions;
import com.mojang.blaze3d.platform.GlStateManager;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
import net.minecraft.item.ItemStack;
public class WrenchItemRenderer extends ItemStackTileEntityRenderer {
@Override
public void renderByItem(ItemStack stack) {
ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer();
WrenchModel mainModel = (WrenchModel) itemRenderer.getModelWithOverrides(stack);
float worldTime = AnimationTickHolder.getRenderTick();
GlStateManager.pushMatrix();
GlStateManager.translatef(0.5F, 0.5F, 0.5F);
itemRenderer.renderItem(stack, mainModel.getBakedModel());
float angle = worldTime * -10 % 360;
float xOffset = -1/32f;
float zOffset = 0;
GlStateManager.translatef(-xOffset, 0, -zOffset);
GlStateManager.rotated(angle, 0, 1, 0);
GlStateManager.translatef(xOffset, 0, zOffset);
itemRenderer.renderItem(stack, mainModel.gear);
GlStateManager.popMatrix();
}
}

View file

@ -0,0 +1,29 @@
package com.simibubi.create.modules.contraptions;
import java.util.Arrays;
import java.util.List;
import com.simibubi.create.foundation.block.CustomRenderItemBakedModel;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraftforge.client.event.ModelBakeEvent;
public class WrenchModel extends CustomRenderItemBakedModel {
public IBakedModel gear;
public WrenchModel(IBakedModel template) {
super(template);
}
public static List<String> getCustomModelLocations() {
return Arrays.asList("gear");
}
@Override
public CustomRenderItemBakedModel loadPartials(ModelBakeEvent event) {
this.gear = loadCustomModel(event, "wrench/gear");
return this;
}
}

View file

@ -1,6 +1,8 @@
package com.simibubi.create.modules.contraptions.base;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemUseContext;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.BlockPos;
@ -9,8 +11,13 @@ import net.minecraft.world.World;
public interface IRotate {
public boolean hasShaftTowards(World world, BlockPos pos, BlockState state, Direction face);
public boolean hasCogsTowards(World world, BlockPos pos, BlockState state, Direction face);
public Axis getRotationAxis(BlockState state);
public default ActionResultType onWrenched(BlockState state, ItemUseContext context) {
return ActionResultType.PASS;
}
}

View file

@ -9,6 +9,7 @@ import java.util.function.Function;
import org.lwjgl.opengl.GL11;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.BufferManipulator;
import net.minecraft.block.BlockState;
@ -22,7 +23,6 @@ import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.model.animation.Animation;
import net.minecraftforge.client.model.animation.TileEntityRendererFast;
import net.minecraftforge.client.model.data.EmptyModelData;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
@ -73,7 +73,7 @@ public class KineticTileEntityRenderer extends TileEntityRendererFast<KineticTil
final BlockPos pos = te.getPos();
Axis axis = ((IRotate) te.getBlockState().getBlock()).getRotationAxis(te.getBlockState());
float time = Animation.getWorldTime(Minecraft.getInstance().world, partialTicks);
float time = AnimationTickHolder.getRenderTick();
float offset = getRotationOffsetForPosition(te, pos, axis);
float angle = (float) (((time * te.getSpeed() + offset) % 360) / 180 * (float) Math.PI);

View file

@ -3,12 +3,16 @@ 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.util.math.BlockPos;
import net.minecraft.world.World;
public abstract class RotatedPillarKineticBlock extends KineticBlock {
@ -36,7 +40,7 @@ public abstract class RotatedPillarKineticBlock extends KineticBlock {
return state;
}
}
public Axis getPreferredAxis(BlockItemUseContext context) {
Axis prefferedAxis = null;
for (Direction side : Direction.values()) {
@ -65,4 +69,20 @@ public abstract class RotatedPillarKineticBlock extends KineticBlock {
return this.getDefaultState().with(AXIS, context.getFace().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;
if (!world.isRemote) {
BlockPos pos = context.getPos();
world.removeTileEntity(pos);
world.setBlockState(pos, state.with(AXIS, axis), 3);
KineticTileEntity tileEntity = (KineticTileEntity) world.getTileEntity(pos);
tileEntity.attachKinetics();
}
return ActionResultType.SUCCESS;
}
}

View file

@ -0,0 +1,114 @@
package com.simibubi.create.modules.contraptions.receivers;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.block.IWithTileEntity;
import net.minecraft.block.Block;
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.PlayerEntity;
import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper;
import net.minecraftforge.items.ItemStackHandler;
public class BasinBlock extends Block implements IWithTileEntity<BasinTileEntity> {
public static final VoxelShape SHAPE = makeCuboidShape(0, 0, 0, 16, 13, 16);
public BasinBlock() {
super(Properties.from(Blocks.ANDESITE));
}
@Override
public boolean hasTileEntity(BlockState state) {
return true;
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new BasinTileEntity();
}
@Override
public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn,
BlockRayTraceResult hit) {
if (!player.getHeldItem(handIn).isEmpty())
return false;
if (worldIn.getTileEntity(pos) == null)
return false;
BasinTileEntity te = (BasinTileEntity) worldIn.getTileEntity(pos);
IItemHandlerModifiable inv = te.inventory.orElse(new ItemStackHandler(1));
for (int slot = 0; slot < inv.getSlots(); slot++) {
player.inventory.placeItemBackInInventory(worldIn, inv.getStackInSlot(slot));
inv.setStackInSlot(slot, ItemStack.EMPTY);
}
te.onEmptied();
return true;
}
@Override
public void onLanded(IBlockReader worldIn, Entity entityIn) {
super.onLanded(worldIn, entityIn);
if (!AllBlocks.BASIN.typeOf(worldIn.getBlockState(entityIn.getPosition())))
return;
if (!(entityIn instanceof ItemEntity))
return;
if (!entityIn.isAlive())
return;
BasinTileEntity te = (BasinTileEntity) worldIn.getTileEntity(entityIn.getPosition());
ItemEntity itemEntity = (ItemEntity) entityIn;
ItemStack insertItem = ItemHandlerHelper.insertItem(te.inputInventory, itemEntity.getItem().copy(), false);
if (insertItem.isEmpty()) {
itemEntity.remove();
return;
}
itemEntity.setItem(insertItem);
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return SHAPE;
}
@Override
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
if (worldIn.getTileEntity(pos) == null)
return;
BasinTileEntity te = (BasinTileEntity) worldIn.getTileEntity(pos);
IItemHandlerModifiable inv = te.inventory.orElse(new ItemStackHandler(1));
for (int slot = 0; slot < inv.getSlots(); slot++) {
InventoryHelper.spawnItemStack(worldIn, pos.getX(), pos.getY(), pos.getZ(),
inv.getStackInSlot(slot));
}
if (state.hasTileEntity() && state.getBlock() != newState.getBlock()) {
worldIn.removeTileEntity(pos);
}
}
@Override
public boolean isSolid(BlockState state) {
return false;
}
}

View file

@ -0,0 +1,129 @@
package com.simibubi.create.modules.contraptions.receivers;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.foundation.block.SyncedTileEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemStackHandler;
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
public class BasinTileEntity extends SyncedTileEntity implements ITickableTileEntity {
protected boolean updateProcessing;
protected ItemStackHandler outputInventory = new ItemStackHandler(9) {
protected void onContentsChanged(int slot) {
sendData();
markDirty();
}
};
protected ItemStackHandler inputInventory = new ItemStackHandler(9) {
protected void onContentsChanged(int slot) {
updateProcessing = true;
sendData();
markDirty();
};
};
public static class BasinInventory extends CombinedInvWrapper {
public BasinInventory(ItemStackHandler input, ItemStackHandler output) {
super(input, output);
}
@Override
public ItemStack extractItem(int slot, int amount, boolean simulate) {
if (isInput(slot))
return ItemStack.EMPTY;
return super.extractItem(slot, amount, simulate);
}
@Override
public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {
if (!isInput(slot))
return stack;
return super.insertItem(slot, stack, simulate);
}
public boolean isInput(int slot) {
return getIndexForSlot(slot) == 0;
}
public IItemHandlerModifiable getInputHandler() {
return itemHandler[0];
}
public IItemHandlerModifiable getOutputHandler() {
return itemHandler[1];
}
}
protected LazyOptional<IItemHandlerModifiable> inventory = LazyOptional
.of(() -> new BasinInventory(inputInventory, outputInventory));
public BasinTileEntity() {
super(AllTileEntities.BASIN.type);
updateProcessing = true;
}
@Override
public void read(CompoundNBT compound) {
super.read(compound);
inputInventory.deserializeNBT(compound.getCompound("InputItems"));
outputInventory.deserializeNBT(compound.getCompound("OutputItems"));
}
@Override
public CompoundNBT write(CompoundNBT compound) {
super.write(compound);
compound.put("InputItems", inputInventory.serializeNBT());
compound.put("OutputItems", outputInventory.serializeNBT());
return compound;
}
public void onEmptied() {
TileEntity te = world.getTileEntity(pos.up(2));
if (te == null)
return;
if (te instanceof MechanicalMixerTileEntity)
((MechanicalMixerTileEntity) te).basinRemoved = true;
}
@Override
public void remove() {
onEmptied();
inventory.invalidate();
super.remove();
}
@Override
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
return inventory.cast();
return super.getCapability(cap, side);
}
@Override
public void tick() {
if (!updateProcessing)
return;
updateProcessing = false;
TileEntity te = world.getTileEntity(pos.up(2));
if (te == null)
return;
if (te instanceof MechanicalMixerTileEntity)
((MechanicalMixerTileEntity) te).checkBasin = true;
}
}

View file

@ -0,0 +1,51 @@
package com.simibubi.create.modules.contraptions.receivers;
import java.util.Random;
import com.mojang.blaze3d.platform.GlStateManager;
import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemStackHandler;
@SuppressWarnings("deprecation")
public class BasinTileEntityRenderer extends TileEntityRenderer<BasinTileEntity> {
@Override
public void render(BasinTileEntity basin, double x, double y, double z, float partialTicks, int destroyStage) {
super.render(basin, x, y, z, partialTicks, destroyStage);
GlStateManager.pushMatrix();
BlockPos pos = basin.getPos();
GlStateManager.translated(x + .5, y + .2f, z + .5);
Random r = new Random(pos.hashCode());
IItemHandlerModifiable inv = basin.inventory.orElse(new ItemStackHandler());
for (int slot = 0; slot < inv.getSlots(); slot++) {
ItemStack stack = inv.getStackInSlot(slot);
if (stack.isEmpty())
continue;
for (int i = 0; i <= stack.getCount() / 8; i++) {
GlStateManager.pushMatrix();
Vec3d vec = VecHelper.offsetRandomly(Vec3d.ZERO, r, .25f);
Vec3d vec2 = VecHelper.offsetRandomly(Vec3d.ZERO, r, .5f);
GlStateManager.translated(vec.x, vec.y, vec.z);
GlStateManager.rotated(vec2.x * 180, vec2.z, vec2.y, 0);
Minecraft.getInstance().getItemRenderer().renderItem(stack, TransformType.GROUND);
GlStateManager.popMatrix();
}
GlStateManager.translated(0, 1 / 64f, 0);
}
GlStateManager.popMatrix();
}
}

View file

@ -0,0 +1,39 @@
package com.simibubi.create.modules.contraptions.receivers;
import com.simibubi.create.foundation.packet.TileEntityConfigurationPacket;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.math.BlockPos;
public class ConfigureMixerPacket extends TileEntityConfigurationPacket<MechanicalMixerTileEntity> {
private int value;
public ConfigureMixerPacket(BlockPos pos, int value) {
super(pos);
this.value = value;
}
public ConfigureMixerPacket(PacketBuffer buffer) {
super(buffer);
}
@Override
protected void writeSettings(PacketBuffer buffer) {
buffer.writeInt(value);
}
@Override
protected void readSettings(PacketBuffer buffer) {
value = buffer.readInt();
}
@Override
protected void applySettings(MechanicalMixerTileEntity te) {
te.minIngredients = value;
te.markDirty();
te.sendData();
te.checkBasin = true;
}
}

View file

@ -0,0 +1,136 @@
package com.simibubi.create.modules.contraptions.receivers;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.block.IBlockWithScrollableValue;
import com.simibubi.create.foundation.block.IWithTileEntity;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.modules.contraptions.base.KineticBlock;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.item.BlockItem;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
public class MechanicalMixerBlock extends KineticBlock
implements IWithTileEntity<MechanicalMixerTileEntity>, IBlockWithScrollableValue {
private static final Vec3d valuePos = new Vec3d(15.8f / 16f, 6 / 16f, 5 / 16f);
public MechanicalMixerBlock() {
super(Properties.from(Blocks.ANDESITE));
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new MechanicalMixerTileEntity();
}
@Override
protected boolean hasStaticPart() {
return true;
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return MechanicalPressBlock.SHAPE;
}
@Override
public BlockRenderLayer getRenderLayer() {
return BlockRenderLayer.CUTOUT_MIPPED;
}
@Override
public Axis getRotationAxis(BlockState state) {
return Axis.Y;
}
@Override
public boolean hasShaftTowards(World world, BlockPos pos, BlockState state, Direction face) {
return false;
}
@Override
public boolean hasCogsTowards(World world, BlockPos pos, BlockState state, Direction face) {
return face.getAxis().isHorizontal();
}
public static class MechanicalMixerBlockItem extends BlockItem {
public MechanicalMixerBlockItem(Properties builder) {
super(AllBlocks.MECHANICAL_MIXER.get(), builder);
}
@Override
public ActionResultType tryPlace(BlockItemUseContext context) {
BlockPos placedOnPos = context.getPos().offset(context.getFace().getOpposite());
BlockState placedOnState = context.getWorld().getBlockState(placedOnPos);
if (AllBlocks.BASIN.typeOf(placedOnState)) {
if (context.getWorld().getBlockState(placedOnPos.up(2)).getMaterial().isReplaceable())
context = BlockItemUseContext.func_221536_a(context, placedOnPos.up(2), Direction.UP);
else
return ActionResultType.FAIL;
}
return super.tryPlace(context);
}
}
@Override
public String getValueName(BlockState state, IWorld world, BlockPos pos) {
return Lang.translate("mechanical_mixer.min_ingredients");
}
@Override
public Vec3d getValueBoxPosition(BlockState state, IWorld world, BlockPos pos) {
return valuePos;
}
@Override
public Direction getValueBoxDirection(BlockState state, IWorld world, BlockPos pos) {
return null;
}
@Override
public boolean isValueOnMultipleFaces() {
return true;
}
@Override
public boolean requiresWrench() {
return true;
}
@Override
public boolean isValueOnFace(Direction face) {
return face.getAxis().isHorizontal();
}
@Override
public void onScroll(BlockState state, IWorld world, BlockPos pos, double value) {
withTileEntityDo(world, pos, te -> te.setMinIngredientsLazily((int) (te.currentValue + value)));
}
@Override
public int getCurrentValue(BlockState state, IWorld world, BlockPos pos) {
MechanicalMixerTileEntity tileEntity = (MechanicalMixerTileEntity) world.getTileEntity(pos);
if (tileEntity == null)
return 0;
return tileEntity.currentValue;
}
}

View file

@ -0,0 +1,322 @@
package com.simibubi.create.modules.contraptions.receivers;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
import com.simibubi.create.AllPackets;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.receivers.BasinTileEntity.BasinInventory;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.BucketItem;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.IRecipeSerializer;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.item.crafting.ShapelessRecipe;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.particles.ItemParticleData;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper;
public class MechanicalMixerTileEntity extends KineticTileEntity implements ITickableTileEntity {
public int runningTicks;
public int processingTicks;
public boolean running;
public boolean checkBasin;
public boolean basinRemoved;
public int minIngredients;
public int currentValue;
public int lastModified;
private ShapelessRecipe lastRecipe;
private LazyOptional<IItemHandler> basinInv = LazyOptional.empty();
private List<ItemStack> inputs;
public MechanicalMixerTileEntity() {
super(AllTileEntities.MECHANICAL_MIXER.type);
checkBasin = true;
minIngredients = currentValue = 1;
lastModified = -1;
processingTicks = -1;
}
@Override
public void onSpeedChanged() {
super.onSpeedChanged();
checkBasin = true;
}
public float getRenderedHeadOffset(float partialTicks) {
int localTick = 0;
if (running) {
if (runningTicks < 20) {
localTick = runningTicks;
float num = (localTick + partialTicks) / 20f;
num = ((2 - MathHelper.cos((float) (num * Math.PI))) / 2);
return num - .5f;
}
if (runningTicks <= 20) {
return 1;
}
if (runningTicks > 20) {
localTick = 40 - runningTicks;
float num = (localTick - partialTicks) / 20f;
num = ((2 - MathHelper.cos((float) (num * Math.PI))) / 2);
return num - .5f;
}
}
return 0;
}
public float getRenderedHeadRotationSpeed(float partialTicks) {
if (running) {
if (runningTicks < 15) {
return speed;
}
if (runningTicks <= 20) {
return speed * 2;
}
if (runningTicks > 20) {
return speed;
}
}
return speed / 2;
}
@Override
public AxisAlignedBB getRenderBoundingBox() {
return new AxisAlignedBB(pos).expand(0, -1.5, 0);
}
@Override
public void read(CompoundNBT compound) {
running = compound.getBoolean("Running");
runningTicks = compound.getInt("Ticks");
currentValue = minIngredients = compound.getInt("MinIngredients");
super.read(compound);
}
@Override
public CompoundNBT write(CompoundNBT compound) {
compound.putBoolean("Running", running);
compound.putInt("Ticks", runningTicks);
compound.putInt("MinIngredients", minIngredients);
return super.write(compound);
}
public void setMinIngredientsLazily(int minIngredients) {
this.currentValue = MathHelper.clamp(minIngredients, 1, 9);
if (currentValue == this.minIngredients)
return;
this.lastModified = 0;
}
@Override
public void tick() {
if (world.isRemote && lastModified != -1) {
if (lastModified++ > 10) {
lastModified = -1;
AllPackets.channel.sendToServer(new ConfigureMixerPacket(pos, currentValue));
}
}
if (runningTicks == 40) {
running = false;
runningTicks = 0;
return;
}
if (basinRemoved) {
basinRemoved = false;
if (running) {
runningTicks = 40;
return;
}
}
if (running) {
if (world.isRemote && runningTicks == 20)
renderParticles();
if (!world.isRemote && runningTicks == 20) {
if (processingTicks < 0) {
processingTicks = (MathHelper.log2((int) (8000 / Math.abs(speed)))) * 15 + 1;
return;
}
processingTicks--;
if (processingTicks == 0) {
runningTicks++;
processingTicks = -1;
applyRecipe();
sendData();
}
}
if (runningTicks != 20)
runningTicks++;
return;
}
if (Math.abs(speed) < 32)
return;
if (!checkBasin)
return;
checkBasin = false;
TileEntity basinTE = world.getTileEntity(pos.down(2));
if (basinTE == null || !(basinTE instanceof BasinTileEntity))
return;
if (!basinInv.isPresent())
basinInv = basinTE.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY);
if (!basinInv.isPresent())
return;
if (world.isRemote)
return;
gatherInputs();
if (matchRecipe(lastRecipe)) {
running = true;
runningTicks = 0;
sendData();
return;
}
List<IRecipe<?>> shapelessRecipe = world.getRecipeManager().getRecipes().parallelStream()
.filter(recipe -> recipe.getSerializer() == IRecipeSerializer.CRAFTING_SHAPELESS)
.filter(this::matchRecipe).sorted((r1, r2) -> r1.getIngredients().size() - r2.getIngredients().size())
.collect(Collectors.toList());
if (shapelessRecipe.isEmpty())
return;
running = true;
runningTicks = 0;
lastRecipe = (ShapelessRecipe) shapelessRecipe.get(0);
sendData();
}
public void renderParticles() {
IItemHandler itemHandler = basinInv.orElse(null);
if (itemHandler != null) {
BasinInventory inv = (BasinInventory) itemHandler;
for (int slot = 0; slot < inv.getInputHandler().getSlots(); slot++) {
ItemStack stackInSlot = itemHandler.getStackInSlot(slot);
if (stackInSlot.isEmpty())
continue;
ItemParticleData data = new ItemParticleData(ParticleTypes.ITEM, stackInSlot);
float angle = world.rand.nextFloat() * 360;
Vec3d offset = new Vec3d(0, 0, 0.25f);
offset = VecHelper.rotate(offset, angle, Axis.Y);
Vec3d target = VecHelper.rotate(offset, speed > 0 ? 25 : -25, Axis.Y).add(0, .25f, 0);
Vec3d center = offset.add(VecHelper.getCenterOf(pos));
target = VecHelper.offsetRandomly(target.subtract(offset), world.rand, 1 / 128f);
world.addParticle(data, center.x, center.y - 2, center.z, target.x, target.y, target.z);
}
}
}
public void gatherInputs() {
BasinInventory inv = (BasinInventory) basinInv.orElse(null);
inputs = new ArrayList<>();
IItemHandlerModifiable inputHandler = inv.getInputHandler();
for (int slot = 0; slot < inputHandler.getSlots(); ++slot) {
ItemStack itemstack = inputHandler.extractItem(slot, inputHandler.getSlotLimit(slot), true);
if (!itemstack.isEmpty()) {
inputs.add(itemstack);
}
}
}
public void applyRecipe() {
if (lastRecipe == null)
return;
if (!basinInv.isPresent())
return;
BasinInventory inv = (BasinInventory) basinInv.orElse(null);
if (inv == null)
return;
IItemHandlerModifiable inputs = inv.getInputHandler();
IItemHandlerModifiable outputs = inv.getOutputHandler();
int buckets = 0;
Ingredients: for (Ingredient ingredient : lastRecipe.getIngredients()) {
for (int slot = 0; slot < inputs.getSlots(); slot++) {
if (!ingredient.test(inputs.extractItem(slot, 1, true)))
continue;
ItemStack extracted = inputs.extractItem(slot, 1, false);
if (extracted.getItem() instanceof BucketItem)
buckets++;
continue Ingredients;
}
// something wasn't found
return;
}
ItemHandlerHelper.insertItemStacked(outputs, lastRecipe.getRecipeOutput().copy(), false);
if (buckets > 0)
ItemHandlerHelper.insertItemStacked(outputs, new ItemStack(Items.BUCKET, buckets), false);
// Continue mixing
gatherInputs();
if (matchRecipe(lastRecipe)) {
runningTicks = 20;
sendData();
}
}
public <C extends IInventory> boolean matchRecipe(IRecipe<C> recipe) {
if (!(recipe instanceof ShapelessRecipe))
return false;
if (recipe.getIngredients().size() < minIngredients)
return false;
ShapelessRecipe shapelessRecipe = (ShapelessRecipe) recipe;
NonNullList<Ingredient> ingredients = shapelessRecipe.getIngredients();
if (!ingredients.stream().allMatch(Ingredient::isSimple))
return false;
List<ItemStack> remaining = new ArrayList<>();
inputs.forEach(stack -> remaining.add(stack.copy()));
// sort by leniency
List<Ingredient> sortedIngredients = new LinkedList<>(ingredients);
sortedIngredients.sort((i1, i2) -> i1.getMatchingStacks().length - i2.getMatchingStacks().length);
Ingredients: for (Ingredient ingredient : sortedIngredients) {
for (ItemStack stack : remaining) {
if (stack.isEmpty())
continue;
if (ingredient.test(stack)) {
stack.shrink(1);
continue Ingredients;
}
}
return false;
}
return true;
}
}

View file

@ -0,0 +1,45 @@
package com.simibubi.create.modules.contraptions.receivers;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
import com.simibubi.create.modules.contraptions.receivers.MechanicalPressTileEntityRenderer.HeadTranslator;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.BlockPos;
public class MechanicalMixerTileEntityRenderer extends KineticTileEntityRenderer {
@Override
public void renderTileEntityFast(KineticTileEntity te, double x, double y, double z, float partialTicks,
int destroyStage, BufferBuilder buffer) {
super.renderTileEntityFast(te, x, y, z, partialTicks, destroyStage, buffer);
final BlockState poleState = AllBlocks.MECHANICAL_MIXER_POLE.get().getDefaultState();
final BlockState headState = AllBlocks.MECHANICAL_MIXER_HEAD.get().getDefaultState();
cacheIfMissing(poleState, HeadTranslator::new);
cacheIfMissing(headState, HeadTranslator::new);
final BlockPos pos = te.getPos();
int packedLightmapCoords = poleState.getPackedLightmapCoords(getWorld(), pos);
float speed = ((MechanicalMixerTileEntity) te).getRenderedHeadRotationSpeed(partialTicks);
float renderedHeadOffset = ((MechanicalMixerTileEntity) te).getRenderedHeadOffset(partialTicks) + 7 / 16f;
float time = AnimationTickHolder.getRenderTick();
float angle = (float) (((time * speed * 2) % 360) / 180 * (float) Math.PI);
buffer.putBulkData(((HeadTranslator) cachedBuffers.get(poleState)).getTransformed((float) x, (float) y,
(float) z, renderedHeadOffset, packedLightmapCoords));
buffer.putBulkData(((HeadTranslator) cachedBuffers.get(headState)).getTransformedRotated((float) x, (float) y,
(float) z, renderedHeadOffset, angle, packedLightmapCoords));
}
@Override
protected BlockState getRenderedBlockState(KineticTileEntity te) {
return AllBlocks.SHAFTLESS_COGWHEEL.get().getDefaultState().with(BlockStateProperties.AXIS, Axis.Y);
}
}

View file

@ -10,11 +10,13 @@ import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
public class MechanicalPressTileEntityRenderer extends KineticTileEntityRenderer {
protected class HeadTranslator extends BufferManipulator {
public static class HeadTranslator extends BufferManipulator {
public HeadTranslator(ByteBuffer original) {
super(original);
@ -32,6 +34,30 @@ public class MechanicalPressTileEntityRenderer extends KineticTileEntityRenderer
return mutable;
}
public ByteBuffer getTransformedRotated(float xIn, float yIn, float zIn, float pushDistance, float angle,
int packedLightCoords) {
original.rewind();
mutable.rewind();
float cos = MathHelper.cos(angle);
float sin = MathHelper.sin(angle);
for (int vertex = 0; vertex < vertexCount(original); vertex++) {
float x = getX(original, vertex) - .5f;
float y = getY(original, vertex) + yIn - pushDistance;
float z = getZ(original, vertex) - .5f;
float x2 = x;
x = rotateX(x, y, z, sin, cos, Axis.Y) + .5f + xIn;
z = rotateZ(x2, y, z, sin, cos, Axis.Y) + .5f + zIn;
putPos(mutable, vertex, x, y, z);
putLight(mutable, vertex, packedLightCoords);
}
return mutable;
}
}
@Override

View file

@ -65,7 +65,7 @@ public class TurntableBlock extends KineticBlock {
if (!world.isRemote && (e instanceof PlayerEntity))
return;
if (offset.length() > 1 / 16f) {
if (offset.length() > 1 / 4f) {
offset = VecHelper.rotate(offset, speed / 1f, Axis.Y);
Vec3d movement = origin.add(offset).subtract(e.getPositionVec());
e.setMotion(e.getMotion().add(movement));

View file

@ -92,6 +92,11 @@ public abstract class AbstractChassisBlock extends RotatedPillarBlock
return Lang.translate("generic.range");
}
@Override
public boolean requiresWrench() {
return true;
}
@Override
public Vec3d getValueBoxPosition(BlockState state, IWorld world, BlockPos pos) {
return valuePos;
@ -103,7 +108,7 @@ public abstract class AbstractChassisBlock extends RotatedPillarBlock
}
@Override
public boolean isValueOnAllSides() {
public boolean isValueOnMultipleFaces() {
return true;
}

View file

@ -31,6 +31,7 @@ public class ConfigureChassisPacket extends TileEntityConfigurationPacket<Chassi
@Override
protected void applySettings(ChassisTileEntity te) {
te.setRange(range);
te.markDirty();
te.sendData();
}

View file

@ -8,6 +8,7 @@ import org.lwjgl.opengl.GL11;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.PlacementSimulationWorld;
import com.simibubi.create.modules.contraptions.base.IRotate;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
@ -25,7 +26,6 @@ import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraft.world.gen.feature.template.Template.BlockInfo;
import net.minecraftforge.client.model.animation.Animation;
import net.minecraftforge.client.model.data.EmptyModelData;
public class MechanicalBearingTileEntityRenderer extends KineticTileEntityRenderer {
@ -39,7 +39,7 @@ public class MechanicalBearingTileEntityRenderer extends KineticTileEntityRender
MechanicalBearingTileEntity bearingTe = (MechanicalBearingTileEntity) te;
final Direction facing = te.getBlockState().get(BlockStateProperties.FACING);
final BlockPos pos = te.getPos();
float time = Animation.getWorldTime(Minecraft.getInstance().world, partialTicks);
float time = AnimationTickHolder.getRenderTick();
BlockState shaftState = AllBlocks.SHAFT_HALF.get().getDefaultState().with(BlockStateProperties.FACING,
facing.getOpposite());
BlockState capState = AllBlocks.MECHANICAL_BEARING_TOP.get().getDefaultState().with(BlockStateProperties.FACING,

View file

@ -1,9 +1,12 @@
package com.simibubi.create.modules.contraptions.relays;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.modules.contraptions.base.IRotate;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.BlockPos;
@ -27,7 +30,7 @@ public class CogWheelBlock extends ShaftBlock {
protected static final VoxelShape LARGE_GEAR_Z = makeCuboidShape(0, 0, 6, 16, 16, 10);
public CogWheelBlock(boolean large) {
super(Properties.from(Blocks.STRIPPED_SPRUCE_LOG));
super(Properties.from(Blocks.GRANITE));
isLarge = large;
}
@ -49,17 +52,30 @@ public class CogWheelBlock extends ShaftBlock {
return true;
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
BlockPos placedOnPos = context.getPos().offset(context.getFace().getOpposite());
BlockState placedAgainst = context.getWorld().getBlockState(placedOnPos);
Block block = placedAgainst.getBlock();
if (!(block instanceof IRotate) || !(((IRotate) block).hasCogsTowards(context.getWorld(), placedOnPos,
placedAgainst, context.getFace())))
return super.getStateForPlacement(context);
return getDefaultState().with(AXIS, ((IRotate) block).getRotationAxis(placedAgainst));
}
private VoxelShape getGearShape(BlockState state) {
if (state.get(AXIS) == Axis.X)
return isLarge ? LARGE_GEAR_X : GEAR_X;
if (state.get(AXIS) == Axis.Z)
return isLarge ? LARGE_GEAR_Z : GEAR_Z;
return isLarge ? LARGE_GEAR_Y : GEAR_Y;
}
// IRotate
@Override
public boolean hasCogsTowards(World world, BlockPos pos, BlockState state, Direction face) {
return !isLarge && face.getAxis() != state.get(AXIS);

View file

@ -1,17 +1,16 @@
package com.simibubi.create.modules.contraptions.relays;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.client.model.animation.Animation;
public class GearboxTileEntityRenderer extends KineticTileEntityRenderer {
@ -20,15 +19,13 @@ public class GearboxTileEntityRenderer extends KineticTileEntityRenderer {
int destroyStage, BufferBuilder buffer) {
final Axis boxAxis = te.getBlockState().get(BlockStateProperties.AXIS);
final BlockPos pos = te.getPos();
float time = Animation.getWorldTime(Minecraft.getInstance().world, partialTicks);
float time = AnimationTickHolder.getRenderTick();
final BlockState defaultState = AllBlocks.SHAFT_HALF.get().getDefaultState();
for (Direction direction : Direction.values()) {
final Axis axis = direction.getAxis();
if (boxAxis == axis)
continue;
if (AllBlocks.GEARBOX.typeOf(getWorld().getBlockState(pos.offset(direction))))
continue;
BlockState state = defaultState.with(BlockStateProperties.FACING, direction);
cacheIfMissing(state, BlockModelSpinner::new);

View file

@ -3,7 +3,6 @@ package com.simibubi.create.modules.contraptions.relays;
import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -38,17 +37,6 @@ public class ShaftBlock extends RotatedPillarKineticBlock {
return state.get(AXIS) == Axis.X ? AXIS_X : state.get(AXIS) == Axis.Z ? AXIS_Z : AXIS_Y;
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
BlockState placedAgainst = context.getWorld()
.getBlockState(context.getPos().offset(context.getFace().getOpposite()));
if (!(placedAgainst.getBlock() instanceof ShaftBlock))
return super.getStateForPlacement(context);
return getDefaultState().with(AXIS, placedAgainst.get(AXIS));
}
// IRotate:
@Override

View file

@ -1,17 +1,16 @@
package com.simibubi.create.modules.contraptions.relays;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.client.model.animation.Animation;
public class SplitShaftTileEntityRenderer extends KineticTileEntityRenderer {
@ -20,7 +19,7 @@ public class SplitShaftTileEntityRenderer extends KineticTileEntityRenderer {
int destroyStage, BufferBuilder buffer) {
final Axis boxAxis = te.getBlockState().get(BlockStateProperties.AXIS);
final BlockPos pos = te.getPos();
float time = Animation.getWorldTime(Minecraft.getInstance().world, partialTicks);
float time = AnimationTickHolder.getRenderTick();
final BlockState defaultState = AllBlocks.SHAFT_HALF.get().getDefaultState();
for (Direction direction : Direction.values()) {

View file

@ -69,9 +69,8 @@ public class BeltItem extends Item {
context.getItem().shrink(1);
}
tag.remove("FirstPulley");
if (!context.getItem().isEmpty()) {
context.getItem().setTag(tag);
context.getItem().setTag(null);
context.getPlayer().getCooldownTracker().setCooldown(this, 5);
}
return ActionResultType.SUCCESS;

View file

@ -4,6 +4,7 @@ import java.nio.ByteBuffer;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.Create;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.BufferManipulator;
import com.simibubi.create.modules.contraptions.base.IRotate;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
@ -17,7 +18,6 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.animation.Animation;
public class BeltTileEntityRenderer extends KineticTileEntityRenderer {
@ -45,8 +45,7 @@ public class BeltTileEntityRenderer extends KineticTileEntityRenderer {
float textureOffsetY = 0;
if (te.getSpeed() != 0) {
float time = Animation.getWorldTime(Minecraft.getInstance().world,
Minecraft.getInstance().getRenderPartialTicks());
float time = AnimationTickHolder.getRenderTick();
Direction direction = te.getBlockState().get(BlockStateProperties.HORIZONTAL_FACING);
if (direction == Direction.EAST || direction == Direction.NORTH)
time = -time;

View file

@ -1,6 +1,7 @@
package com.simibubi.create.modules.curiosities;
import com.simibubi.create.foundation.item.IItemWithColorHandler;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.ColorHelper;
import net.minecraft.client.Minecraft;
@ -10,7 +11,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.model.animation.Animation;
public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHandler {
@ -21,7 +21,7 @@ public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHan
Minecraft mc = Minecraft.getInstance();
float pt = mc.getRenderPartialTicks();
float progress = (float) ((mc.player.getYaw(pt)) / 180 * Math.PI)
+ (Animation.getWorldTime(mc.world, pt) * 1f);
+ (AnimationTickHolder.getRenderTick() * 1f);
if (layer == 0)
return ColorHelper.mixColors(0xDDDDDD, 0xDDDDDD, ((float) MathHelper.sin(progress) + 1) / 2);
if (layer == 1)

View file

@ -8,6 +8,7 @@ import static com.simibubi.create.modules.curiosities.placementHandgun.BuilderGu
import com.mojang.blaze3d.platform.GLX;
import com.mojang.blaze3d.platform.GlStateManager;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunItem.ComponentTier;
import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunItem.Components;
@ -22,7 +23,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTUtil;
import net.minecraft.util.HandSide;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.client.model.animation.Animation;
public class BuilderGunItemRenderer extends ItemStackTileEntityRenderer {
@ -31,7 +31,7 @@ public class BuilderGunItemRenderer extends ItemStackTileEntityRenderer {
ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer();
BuilderGunModel mainModel = (BuilderGunModel) itemRenderer.getModelWithOverrides(stack);
float pt = Minecraft.getInstance().getRenderPartialTicks();
float worldTime = Animation.getWorldTime(Minecraft.getInstance().world, pt);
float worldTime = AnimationTickHolder.getRenderTick();
GlStateManager.pushMatrix();
GlStateManager.translatef(0.5F, 0.5F, 0.5F);

View file

@ -2,13 +2,13 @@ package com.simibubi.create.modules.curiosities.symmetry.client;
import com.mojang.blaze3d.platform.GLX;
import com.mojang.blaze3d.platform.GlStateManager;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.client.model.animation.Animation;
public class SymmetryWandItemRenderer extends ItemStackTileEntityRenderer {
@ -17,8 +17,7 @@ public class SymmetryWandItemRenderer extends ItemStackTileEntityRenderer {
ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer();
SymmetryWandModel mainModel = (SymmetryWandModel) itemRenderer.getModelWithOverrides(stack);
float worldTime = Animation.getWorldTime(Minecraft.getInstance().world,
Minecraft.getInstance().getRenderPartialTicks());
float worldTime = AnimationTickHolder.getRenderTick();
GlStateManager.pushMatrix();
GlStateManager.translatef(0.5F, 0.5F, 0.5F);

View file

@ -49,6 +49,18 @@ public class BeltFunnelBlock extends HorizontalBlock implements IBeltAttachment,
public boolean hasTileEntity(BlockState state) {
return true;
}
@Override
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
boolean isMoving) {
Direction blockFacing = state.get(HORIZONTAL_FACING);
if (fromPos.equals(pos.offset(blockFacing))) {
if (!isValidPosition(state, worldIn, pos)) {
worldIn.destroyBlock(pos, true);
return;
}
}
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
@ -61,6 +73,13 @@ public class BeltFunnelBlock extends HorizontalBlock implements IBeltAttachment,
super.fillStateContainer(builder);
}
@Override
public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) {
BlockPos neighbourPos = pos.offset(state.get(HORIZONTAL_FACING));
BlockState neighbour = worldIn.getBlockState(neighbourPos);
return !neighbour.getShape(worldIn, pos).isEmpty();
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
BlockState state = getDefaultState();

View file

@ -35,7 +35,7 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
SHAPE_SOUTH = makeCuboidShape(4, 2, 11, 12, 10, 17), SHAPE_WEST = makeCuboidShape(-1, 2, 4, 5, 10, 12),
SHAPE_EAST = makeCuboidShape(11, 2, 4, 17, 10, 12);
private static final List<Vec3d> itemPositions = new ArrayList<>(Direction.values().length);
public ExtractorBlock() {
super(Properties.from(Blocks.ANDESITE));
setDefaultState(getDefaultState().with(POWERED, false));
@ -47,28 +47,28 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
builder.add(HORIZONTAL_FACING, POWERED);
super.fillStateContainer(builder);
}
@Override
public boolean showsCount() {
return true;
}
@Override
public boolean hasTileEntity(BlockState state) {
return true;
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new ExtractorTileEntity();
}
@Override
public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn,
BlockRayTraceResult hit) {
return handleActivatedFilterSlots(state, worldIn, pos, player, handIn, hit);
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
BlockState state = getDefaultState();
@ -86,6 +86,13 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
updateObservedInventory(state, worldIn, pos);
}
@Override
public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) {
BlockPos neighbourPos = pos.offset(state.get(HORIZONTAL_FACING));
BlockState neighbour = worldIn.getBlockState(neighbourPos);
return !neighbour.getShape(worldIn, pos).isEmpty();
}
@Override
public void onNeighborChange(BlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor) {
@ -95,23 +102,31 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
return;
updateObservedInventory(state, world, pos);
}
private void updateObservedInventory(BlockState state, IWorldReader world, BlockPos pos) {
IExtractor extractor = (IExtractor) world.getTileEntity(pos);
if (extractor == null)
return;
extractor.neighborChanged();
}
private boolean isObserving(BlockState state, BlockPos pos, BlockPos observing) {
return observing.equals(pos.offset(state.get(HORIZONTAL_FACING)));
}
@Override
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
boolean isMoving) {
if (worldIn.isRemote)
return;
Direction blockFacing = state.get(HORIZONTAL_FACING);
if (fromPos.equals(pos.offset(blockFacing))) {
if (!isValidPosition(state, worldIn, pos)) {
worldIn.destroyBlock(pos, true);
return;
}
}
boolean previouslyPowered = state.get(POWERED);
if (previouslyPowered != worldIn.isBlockPowered(pos)) {
@ -159,7 +174,7 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
itemPositions.add(position);
}
}
@Override
public float getItemHitboxScale() {
return 1.76f / 16f;

View file

@ -1,6 +1,5 @@
package com.simibubi.create.modules.schematics.block;
import static com.simibubi.create.ScreenResources.FLEXCRATE;
import static net.minecraft.util.text.TextFormatting.GRAY;
import java.util.ArrayList;

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/basin" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/mixer_base" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/mixer_head" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/mixer_pole" }
}
}

View file

@ -0,0 +1,13 @@
{
"forge_marker": 1,
"defaults": {
"model": "create:block/cogwheel_shaftless"
},
"variants": {
"axis" : {
"x": { "x": 90, "y": 90 },
"y": {},
"z": { "x": 90 }
}
}
}

View file

@ -23,6 +23,7 @@
"item.create.propeller": "Propeller",
"item.create.flour": "Wheat Flour",
"item.create.dough": "Dough",
"item.create.wrench": "Wrench",
"item.create.blazing_pickaxe": "Blazing Pickaxe",
"item.create.blazing_shovel": "Blazing Shovel",
@ -56,6 +57,8 @@
"block.create.water_wheel": "Water Wheel",
"block.create.belt_support": "Belt Support",
"block.create.mechanical_press": "Mechanical Press",
"block.create.mechanical_mixer": "Mechanical Mixer",
"block.create.basin": "Basin",
"block.create.sticky_mechanical_piston": "Sticky Mechanical Piston",
"block.create.mechanical_piston": "Mechanical Piston",
@ -345,6 +348,8 @@
"create.tooltip.holdKeyOrKey": "Hold [%1$s] or [%2$s]",
"create.tooltip.keyShift": "Shift",
"create.tooltip.keyCtrl": "Ctrl",
"create.mechanical_mixer.min_ingredients": "Min. Ingredients",
"_comment": "-------------------------] ITEM DESCRIPTIONS [------------------------------------------------",
@ -473,8 +478,8 @@
"block.create.encased_fan.tooltip": "ENCASED FAN",
"block.create.encased_fan.tooltip.summary": "Converts _Rotational_ _Force_ to _Air_ _Currents_ and back. Has a variety of uses.",
"block.create.encased_fan.tooltip.condition1": "When above Fire",
"block.create.encased_fan.tooltip.behaviour1": "Provides _Rotational_ _Force_ (has to be vertical)",
"block.create.encased_fan.tooltip.condition1": "When Powered by Redstone",
"block.create.encased_fan.tooltip.behaviour1": "Provides _Rotational_ _Force_ from any _heat_ _sources_ immediately below itself (fan has to be vertical)",
"block.create.encased_fan.tooltip.condition2": "When Rotated",
"block.create.encased_fan.tooltip.behaviour2": "_Pushes_ Entities on one side, _Pulls_ on the other. Force and Speed depend on incoming Rotations.",
"block.create.encased_fan.tooltip.condition3": "When air flows through special blocks",

View file

@ -0,0 +1,169 @@
{
"credit": "Made with Blockbench",
"parent": "block/cube",
"ambientocclusion": false,
"textures": {
"12": "create:block/basin",
"particle": "create:block/basin"
},
"elements": [
{
"name": "Side1",
"from": [0, 5, 0],
"to": [2, 13, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 24, 8]},
"faces": {
"north": {"uv": [7, 0, 8, 4], "texture": "#12"},
"east": {"uv": [0, 0, 8, 4.5], "texture": "#12"},
"south": {"uv": [0, 0, 1, 4], "texture": "#12"},
"west": {"uv": [0, 0, 8, 4], "texture": "#12"},
"up": {"uv": [8, 0, 9, 8], "texture": "#12"},
"down": {"uv": [8, 0, 9, 8], "texture": "#12"}
}
},
{
"name": "Leg1",
"from": [0, 0, 0],
"to": [2, 5, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 24, 8]},
"faces": {
"north": {"uv": [7, 4, 8, 6.5], "texture": "#12"},
"east": {"uv": [7, 4, 8, 6.5], "texture": "#12"},
"south": {"uv": [0, 4, 1, 6.5], "texture": "#12"},
"west": {"uv": [0, 4, 1, 6.5], "texture": "#12"},
"down": {"uv": [7, 5.5, 8, 6.5], "texture": "#12"}
}
},
{
"name": "Leg2",
"from": [0, 0, 14],
"to": [2, 5, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 24, 22]},
"faces": {
"north": {"uv": [7, 4, 8, 6.5], "texture": "#12"},
"east": {"uv": [0, 4, 1, 6.5], "texture": "#12"},
"south": {"uv": [0, 4, 1, 6.5], "texture": "#12"},
"west": {"uv": [7, 4.5, 8, 6.5], "texture": "#12"},
"down": {"uv": [1, 10, 2, 11], "texture": "#12"}
}
},
{
"name": "Leg3",
"from": [14, 0, 0],
"to": [16, 5, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 24, 8]},
"faces": {
"north": {"uv": [0, 4, 1, 6.5], "texture": "#12"},
"east": {"uv": [7, 4, 8, 6.5], "texture": "#12"},
"south": {"uv": [7, 4, 8, 6.5], "texture": "#12"},
"west": {"uv": [0, 4, 1, 6.5], "texture": "#12"},
"down": {"uv": [0, 5.5, 1, 6.5], "texture": "#12"}
}
},
{
"name": "Leg4",
"from": [14, 0, 14],
"to": [16, 5, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 24, 22]},
"faces": {
"north": {"uv": [0, 4, 1, 6.5], "texture": "#12"},
"east": {"uv": [0, 4, 1, 6.5], "texture": "#12"},
"south": {"uv": [7, 4, 8, 6.5], "texture": "#12"},
"west": {"uv": [7, 4, 8, 6.5], "texture": "#12"},
"down": {"uv": [1, 11, 2, 12], "texture": "#12"}
}
},
{
"name": "Bottom1",
"from": [2, 1, 2],
"to": [4, 6, 14],
"rotation": {"angle": 22.5, "axis": "z", "origin": [2, 1, 8]},
"faces": {
"east": {"uv": [1, 4.5, 7, 7], "texture": "#12"},
"west": {"uv": [1, 4.5, 7, 7], "texture": "#12"}
}
},
{
"name": "Bottom2",
"from": [2, 1, 12],
"to": [14, 6, 14],
"rotation": {"angle": 22.5, "axis": "x", "origin": [4, 1, 14]},
"faces": {
"north": {"uv": [1, 4.5, 7, 7], "texture": "#12"},
"south": {"uv": [1, 4.5, 7, 7], "texture": "#12"}
}
},
{
"name": "Bottom4",
"from": [2, 1, 2],
"to": [14, 6, 4],
"rotation": {"angle": -22.5, "axis": "x", "origin": [4, 1, 2]},
"faces": {
"north": {"uv": [1, 4.5, 7, 7], "texture": "#12"},
"south": {"uv": [1, 4.5, 7, 7], "texture": "#12"}
}
},
{
"name": "Bottom3",
"from": [12, 1, 2],
"to": [14, 6, 14],
"rotation": {"angle": -22.5, "axis": "z", "origin": [14, 1, 8]},
"faces": {
"east": {"uv": [1, 4.5, 7, 7], "texture": "#12"},
"west": {"uv": [1, 4.5, 7, 7], "texture": "#12"}
}
},
{
"name": "BasinBottom",
"from": [2, 0, 2],
"to": [14, 2, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 25, 8]},
"faces": {
"north": {"uv": [1, 6.5, 7, 7.5], "texture": "#12"},
"east": {"uv": [1, 6.5, 7, 7.5], "texture": "#12"},
"south": {"uv": [1, 6.5, 7, 7.5], "texture": "#12"},
"west": {"uv": [1, 6.5, 7, 7.5], "texture": "#12"},
"up": {"uv": [0, 10, 6, 16], "texture": "#12"},
"down": {"uv": [0, 10, 6, 16], "rotation": 90, "texture": "#12"}
}
},
{
"name": "Side4",
"from": [2, 5, 0],
"to": [14, 13, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 24, 8]},
"faces": {
"north": {"uv": [1, 0, 7, 4], "texture": "#12"},
"south": {"uv": [0, 0, 8, 4.5], "texture": "#12"},
"up": {"uv": [9, 0, 15, 1], "texture": "#12"},
"down": {"uv": [9, 7, 15, 8], "texture": "#12"}
}
},
{
"name": "Side2",
"from": [2, 5, 14],
"to": [14, 13, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 24, 8]},
"faces": {
"north": {"uv": [1, 0, 7, 4.5], "texture": "#12"},
"south": {"uv": [1, 0, 7, 4], "texture": "#12"},
"up": {"uv": [9, 7, 15, 8], "texture": "#12"},
"down": {"uv": [9, 0, 15, 1], "texture": "#12"}
}
},
{
"name": "Side3",
"from": [14, 5, 0],
"to": [16, 13, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 40, 8]},
"faces": {
"north": {"uv": [0, 0, 1, 4], "texture": "#12"},
"east": {"uv": [0, 0, 8, 4], "texture": "#12"},
"south": {"uv": [7, 0, 8, 4], "texture": "#12"},
"west": {"uv": [0, 0, 8, 4.5], "texture": "#12"},
"up": {"uv": [15, 0, 16, 8], "texture": "#12"},
"down": {"uv": [15, 0, 16, 8], "texture": "#12"}
}
}
]
}

View file

@ -0,0 +1,91 @@
{
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"parent": "block/cube",
"textures": {
"particle": "block/stripped_spruce_log",
"1": "block/stripped_spruce_log",
"2": "block/stripped_spruce_log_top"
},
"elements": [
{
"name": "Gear",
"from": [ -1.0, 6.5, 6.5 ],
"to": [ 17.0, 9.5, 9.5 ],
"faces": {
"north": { "texture": "#1", "uv": [ 6.0, 0.0, 9.0, 16.0 ], "rotation": 90 },
"east": { "texture": "#1", "uv": [ 1.0, 3.0, 4.0, 6.0 ] },
"south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] },
"west": { "texture": "#1", "uv": [ 5.0, 10.0, 8.0, 13.0 ] },
"up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] },
"down": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }
}
},
{
"name": "Gear2",
"from": [ -1.0, 6.5, 6.5 ],
"to": [ 17.0, 9.5, 9.5 ],
"rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 45.0 },
"faces": {
"north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] },
"east": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] },
"south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] },
"west": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] },
"up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] },
"down": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }
}
},
{
"name": "Gear3",
"from": [ -1.0, 6.5, 6.5 ],
"to": [ 17.0, 9.5, 9.5 ],
"rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": -45.0 },
"faces": {
"north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] },
"east": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] },
"south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] },
"west": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] },
"up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] },
"down": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }
}
},
{
"name": "Gear4",
"from": [ 6.5, 6.5, -1.0 ],
"to": [ 9.5, 9.5, 17.0 ],
"faces": {
"north": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] },
"east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] },
"south": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] },
"west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 3.0 ] },
"up": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 16.0 ] },
"down": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 16.0 ] }
}
},
{
"name": "GearCaseInner",
"from": [ 2.0, 7.0, 2.0 ],
"to": [ 14.0, 9.0, 14.0 ],
"faces": {
"north": { "texture": "#1", "uv": [ 0.0, 0.0, 12.0, 2.0 ] },
"east": { "texture": "#1", "uv": [ 0.0, 0.0, 12.0, 2.0 ] },
"south": { "texture": "#1", "uv": [ 0.0, 0.0, 12.0, 2.0 ] },
"west": { "texture": "#1", "uv": [ 0.0, 0.0, 12.0, 2.0 ] },
"up": { "texture": "#2", "uv": [ 2.0, 2.0, 14.0, 14.0 ] },
"down": { "texture": "#2", "uv": [ 2.0, 2.0, 14.0, 14.0 ] }
}
},
{
"name": "GearCaseOuter",
"from": [ 4.0, 6.0, 4.0 ],
"to": [ 12.0, 10.0, 12.0 ],
"faces": {
"north": { "texture": "#1", "uv": [ 0.0, 0.0, 8.0, 4.0 ] },
"east": { "texture": "#1", "uv": [ 0.0, 0.0, 8.0, 4.0 ] },
"south": { "texture": "#1", "uv": [ 0.0, 0.0, 8.0, 4.0 ] },
"west": { "texture": "#1", "uv": [ 0.0, 0.0, 8.0, 4.0 ] },
"up": { "texture": "#2", "uv": [ 4.0, 4.0, 12.0, 12.0 ] },
"down": { "texture": "#2", "uv": [ 4.0, 4.0, 12.0, 12.0 ] }
}
}
]
}

View file

@ -0,0 +1,76 @@
{
"credit": "Made with Blockbench",
"parent": "block/cube",
"ambientocclusion": false,
"textures": {
"1": "block/stripped_spruce_log",
"2": "block/spruce_log_top",
"4": "create:block/mixer_base_side",
"11": "create:block/mechanical_press_top",
"particle": "block/stripped_spruce_log"
},
"elements": [
{
"name": "Top",
"from": [0, 10, 0],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 16, 6], "texture": "#4"},
"east": {"uv": [0, 0, 16, 6], "texture": "#4"},
"south": {"uv": [0, 0, 16, 6], "texture": "#4"},
"west": {"uv": [0, 0, 16, 6], "texture": "#4"},
"up": {"uv": [0, 0, 16, 16], "texture": "#11"},
"down": {"uv": [0, 0, 16, 16], "texture": "#2"}
}
},
{
"name": "Bottom",
"from": [0, 2, 0],
"to": [16, 6, 16],
"faces": {
"north": {"uv": [0, 10, 16, 14], "texture": "#4"},
"east": {"uv": [0, 10, 16, 14], "texture": "#4"},
"south": {"uv": [0, 10, 16, 14], "texture": "#4"},
"west": {"uv": [0, 10, 16, 14], "texture": "#4"},
"up": {"uv": [0, 0, 16, 16], "texture": "#2"},
"down": {"uv": [0, 0, 16, 16], "texture": "#11"}
}
},
{
"name": "Side1",
"from": [0, 6, 0],
"to": [0, 10, 16],
"faces": {
"east": {"uv": [0, 6, 16, 10], "texture": "#4"},
"west": {"uv": [0, 6, 16, 10], "texture": "#4"}
}
},
{
"name": "Side2",
"from": [16, 6, 0],
"to": [16, 10, 16],
"faces": {
"east": {"uv": [0, 6, 16, 10], "texture": "#4"},
"west": {"uv": [0, 6, 16, 10], "texture": "#4"}
}
},
{
"name": "Side3",
"from": [0, 6, 16],
"to": [16, 10, 16],
"faces": {
"north": {"uv": [0, 6, 16, 10], "texture": "#4"},
"south": {"uv": [0, 6, 16, 10], "texture": "#4"}
}
},
{
"name": "Side4",
"from": [0, 6, 0],
"to": [16, 10, 0],
"faces": {
"north": {"uv": [0, 6, 16, 10], "texture": "#4"},
"south": {"uv": [0, 6, 16, 10], "texture": "#4"}
}
}
]
}

View file

@ -0,0 +1,129 @@
{
"credit": "Made with Blockbench",
"parent": "block/cube",
"ambientocclusion": false,
"textures": {
"6": "create:block/mixer_head",
"mechanical_press_pole": "create:block/mechanical_press_pole"
},
"elements": [
{
"name": "MixerCenter",
"from": [7, -4.5, 7],
"to": [9, 7.5, 9],
"shade": false,
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 12, 12, 14], "rotation": 90, "texture": "#6"},
"east": {"uv": [0, 12, 12, 14], "rotation": 90, "texture": "#6"},
"south": {"uv": [0, 12, 12, 14], "rotation": 90, "texture": "#6"},
"west": {"uv": [0, 12, 12, 14], "rotation": 90, "texture": "#6"},
"down": {"uv": [0, 12, 2, 14], "texture": "#6"}
}
},
{
"name": "mixerbottom1",
"from": [2.5, -4, 7],
"to": [13.5, -2, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 14, 11, 16], "texture": "#6"},
"east": {"uv": [2, 8, 4, 10], "texture": "#6"},
"south": {"uv": [0, 14, 11, 16], "texture": "#6"},
"west": {"uv": [2, 0, 4, 2], "texture": "#6"},
"up": {"uv": [0, 12, 11, 14], "texture": "#6"},
"down": {"uv": [0, 10, 11, 12], "texture": "#6"}
}
},
{
"name": "mixerbottom2",
"from": [7, -4, 2.5],
"to": [9, -2, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [2, 8, 4, 10], "texture": "#6"},
"east": {"uv": [0, 14, 11, 16], "texture": "#6"},
"south": {"uv": [2, 8, 4, 10], "texture": "#6"},
"west": {"uv": [0, 14, 11, 16], "texture": "#6"},
"up": {"uv": [0, 12, 11, 14], "rotation": 90, "texture": "#6"},
"down": {"uv": [0, 10, 11, 12], "rotation": 90, "texture": "#6"}
}
},
{
"name": "mixerside4",
"from": [11.5, -2, 7],
"to": [13.5, 4, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 2, 2, 8], "rotation": 180, "texture": "#6"},
"east": {"uv": [2, 2, 4, 8], "texture": "#6"},
"south": {"uv": [0, 2, 2, 8], "texture": "#6"},
"west": {"uv": [4, 0, 6, 6], "texture": "#6"}
}
},
{
"name": "mixerside3",
"from": [2.5, -2, 7],
"to": [4.5, 4, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 2, 2, 8], "texture": "#6"},
"east": {"uv": [4, 0, 6, 6], "texture": "#6"},
"south": {"uv": [0, 2, 2, 8], "rotation": 180, "texture": "#6"},
"west": {"uv": [2, 2, 4, 8], "texture": "#6"}
}
},
{
"name": "mixerside2",
"from": [7, -2, 2.5],
"to": [9, 4, 4.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [2, 2, 4, 8], "texture": "#6"},
"east": {"uv": [0, 2, 2, 8], "texture": "#6"},
"south": {"uv": [4, 0, 6, 6], "texture": "#6"},
"west": {"uv": [0, 2, 2, 8], "rotation": 180, "texture": "#6"}
}
},
{
"name": "mixerside1",
"from": [7, -2, 11.5],
"to": [9, 4, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [4, 0, 6, 6], "texture": "#6"},
"east": {"uv": [0, 2, 2, 8], "rotation": 180, "texture": "#6"},
"south": {"uv": [2, 2, 4, 8], "texture": "#6"},
"west": {"uv": [0, 2, 2, 8], "texture": "#6"}
}
},
{
"name": "mixertop1",
"from": [7, 4, 2.5],
"to": [9, 6, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [2, 0, 4, 2], "texture": "#6"},
"east": {"uv": [0, 14, 11, 16], "rotation": 180, "texture": "#6"},
"south": {"uv": [2, 0, 4, 2], "texture": "#6"},
"west": {"uv": [0, 14, 11, 16], "rotation": 180, "texture": "#6"},
"up": {"uv": [0, 10, 11, 12], "rotation": 90, "texture": "#6"},
"down": {"uv": [0, 12, 11, 14], "rotation": 90, "texture": "#6"}
}
},
{
"name": "mixertop2",
"from": [2.5, 4, 7],
"to": [13.5, 6, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 14, 11, 16], "rotation": 180, "texture": "#6"},
"east": {"uv": [2, 0, 4, 2], "texture": "#6"},
"south": {"uv": [0, 14, 11, 16], "rotation": 180, "texture": "#6"},
"west": {"uv": [2, 0, 4, 2], "texture": "#6"},
"up": {"uv": [0, 10, 11, 12], "texture": "#6"},
"down": {"uv": [0, 12, 11, 14], "texture": "#6"}
}
}
]
}

View file

@ -0,0 +1,100 @@
{
"credit": "Made with Blockbench",
"parent": "block/cube",
"ambientocclusion": false,
"textures": {
"6": "create:block/mixer_head",
"mechanical_press_pole": "create:block/mechanical_press_pole"
},
"elements": [
{
"name": "polebase",
"from": [5, 7, 5],
"to": [11, 9, 11],
"shade": false,
"rotation": {"angle": 0, "axis": "y", "origin": [8, 9, 8]},
"faces": {
"north": {"uv": [10, 6, 16, 8], "texture": "#6"},
"east": {"uv": [10, 6, 16, 8], "texture": "#6"},
"south": {"uv": [10, 6, 16, 8], "texture": "#6"},
"west": {"uv": [10, 6, 16, 8], "texture": "#6"},
"up": {"uv": [10, 0, 16, 6], "texture": "#6"},
"down": {"uv": [10, 0, 16, 6], "texture": "#6"}
}
},
{
"name": "Pole1Core",
"from": [6, 9, 6],
"to": [10, 19, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]},
"faces": {
"east": {"uv": [6, 6, 10, 16], "texture": "#mechanical_press_pole"},
"west": {"uv": [6, 6, 10, 16], "texture": "#mechanical_press_pole"},
"down": {"uv": [11, 1, 15, 5], "texture": "#mechanical_press_pole"}
}
},
{
"name": "Pole1Side",
"from": [5, 9, 5],
"to": [11, 19, 6],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]},
"faces": {
"north": {"uv": [0, 6, 6, 16], "texture": "#mechanical_press_pole"},
"east": {"uv": [0, 6, 1, 16], "texture": "#mechanical_press_pole"},
"south": {"uv": [0, 6, 6, 16], "texture": "#mechanical_press_pole"},
"west": {"uv": [5, 6, 6, 16], "texture": "#mechanical_press_pole"},
"down": {"uv": [10, 5, 16, 6], "texture": "#mechanical_press_pole"}
}
},
{
"name": "Pole1Side",
"from": [5, 9, 10],
"to": [11, 19, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]},
"faces": {
"north": {"uv": [0, 6, 6, 16], "texture": "#mechanical_press_pole"},
"east": {"uv": [0, 6, 1, 16], "texture": "#mechanical_press_pole"},
"south": {"uv": [0, 6, 6, 16], "texture": "#mechanical_press_pole"},
"west": {"uv": [5, 6, 6, 16], "texture": "#mechanical_press_pole"},
"down": {"uv": [10, 0, 16, 1], "texture": "#mechanical_press_pole"}
}
},
{
"name": "Pole2Core",
"from": [6, 19, 6],
"to": [10, 32, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]},
"faces": {
"east": {"uv": [6, 0, 10, 13], "texture": "#mechanical_press_pole"},
"west": {"uv": [6, 0, 10, 13], "texture": "#mechanical_press_pole"},
"up": {"uv": [11, 1, 15, 5], "rotation": 180, "texture": "#mechanical_press_pole"}
}
},
{
"name": "Pole2Side",
"from": [5, 19, 10],
"to": [11, 32, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]},
"faces": {
"north": {"uv": [0, 0, 6, 13], "texture": "#mechanical_press_pole"},
"east": {"uv": [0, 0, 1, 13], "texture": "#mechanical_press_pole"},
"south": {"uv": [0, 0, 6, 13], "texture": "#mechanical_press_pole"},
"west": {"uv": [5, 0, 6, 13], "texture": "#mechanical_press_pole"},
"up": {"uv": [10, 0, 16, 1], "rotation": 180, "texture": "#mechanical_press_pole"}
}
},
{
"name": "Pole2Side",
"from": [5, 19, 5],
"to": [11, 32, 6],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]},
"faces": {
"north": {"uv": [0, 0, 6, 13], "texture": "#mechanical_press_pole"},
"east": {"uv": [0, 0, 1, 13], "texture": "#mechanical_press_pole"},
"south": {"uv": [0, 0, 6, 13], "texture": "#mechanical_press_pole"},
"west": {"uv": [5, 0, 6, 13], "texture": "#mechanical_press_pole"},
"up": {"uv": [10, 5, 16, 6], "rotation": 180, "texture": "#mechanical_press_pole"}
}
}
]
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/basin"
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,415 @@
{
"credit": "Made with Blockbench",
"parent": "block/cube",
"ambientocclusion": false,
"textures": {
"1": "block/stripped_spruce_log",
"2": "block/spruce_log_top",
"4": "create:block/mixer_base_side",
"6": "create:block/mixer_head",
"11": "create:block/mechanical_press_top",
"mechanical_press_pole": "create:block/mechanical_press_pole",
"particle": "block/stripped_spruce_log"
},
"display": {
"gui": {
"rotation": [ 30, 225, 0 ],
"translation": [ 0, -2, 0],
"scale":[ 0.45, 0.45, 0.45 ]
},
"fixed": {
"rotation": [ 0, 0, 0 ],
"translation": [ 0, -2.75, -0.0625],
"scale":[ 0.5, 0.5, 0.5 ]
}
},
"elements": [
{
"name": "MixerCenter",
"from": [7, -4.5, 7],
"to": [9, 7.5, 9],
"shade": false,
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 12, 12, 14], "rotation": 90, "texture": "#6"},
"east": {"uv": [0, 12, 12, 14], "rotation": 90, "texture": "#6"},
"south": {"uv": [0, 12, 12, 14], "rotation": 90, "texture": "#6"},
"west": {"uv": [0, 12, 12, 14], "rotation": 90, "texture": "#6"},
"down": {"uv": [0, 12, 2, 14], "texture": "#6"}
}
},
{
"name": "mixerbottom1",
"from": [2.5, -4, 7],
"to": [13.5, -2, 9],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 14, 11, 16], "texture": "#6"},
"east": {"uv": [2, 8, 4, 10], "texture": "#6"},
"south": {"uv": [0, 14, 11, 16], "texture": "#6"},
"west": {"uv": [2, 0, 4, 2], "texture": "#6"},
"up": {"uv": [0, 12, 11, 14], "texture": "#6"},
"down": {"uv": [0, 10, 11, 12], "texture": "#6"}
}
},
{
"name": "mixerbottom2",
"from": [7, -4, 2.5],
"to": [9, -2, 13.5],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [2, 8, 4, 10], "texture": "#6"},
"east": {"uv": [0, 14, 11, 16], "texture": "#6"},
"south": {"uv": [2, 8, 4, 10], "texture": "#6"},
"west": {"uv": [0, 14, 11, 16], "texture": "#6"},
"up": {"uv": [0, 12, 11, 14], "rotation": 90, "texture": "#6"},
"down": {"uv": [0, 10, 11, 12], "rotation": 90, "texture": "#6"}
}
},
{
"name": "mixerside4",
"from": [11.5, -2, 7],
"to": [13.5, 4, 9],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 2, 2, 8], "rotation": 180, "texture": "#6"},
"east": {"uv": [2, 2, 4, 8], "texture": "#6"},
"south": {"uv": [0, 2, 2, 8], "texture": "#6"},
"west": {"uv": [4, 0, 6, 6], "texture": "#6"}
}
},
{
"name": "mixerside3",
"from": [2.5, -2, 7],
"to": [4.5, 4, 9],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 2, 2, 8], "texture": "#6"},
"east": {"uv": [4, 0, 6, 6], "texture": "#6"},
"south": {"uv": [0, 2, 2, 8], "rotation": 180, "texture": "#6"},
"west": {"uv": [2, 2, 4, 8], "texture": "#6"}
}
},
{
"name": "mixerside2",
"from": [7, -2, 2.5],
"to": [9, 4, 4.5],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [2, 2, 4, 8], "texture": "#6"},
"east": {"uv": [0, 2, 2, 8], "texture": "#6"},
"south": {"uv": [4, 0, 6, 6], "texture": "#6"},
"west": {"uv": [0, 2, 2, 8], "rotation": 180, "texture": "#6"}
}
},
{
"name": "mixerside1",
"from": [7, -2, 11.5],
"to": [9, 4, 13.5],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [4, 0, 6, 6], "texture": "#6"},
"east": {"uv": [0, 2, 2, 8], "rotation": 180, "texture": "#6"},
"south": {"uv": [2, 2, 4, 8], "texture": "#6"},
"west": {"uv": [0, 2, 2, 8], "texture": "#6"}
}
},
{
"name": "mixertop1",
"from": [7, 4, 2.5],
"to": [9, 6, 13.5],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [2, 0, 4, 2], "texture": "#6"},
"east": {"uv": [0, 14, 11, 16], "rotation": 180, "texture": "#6"},
"south": {"uv": [2, 0, 4, 2], "texture": "#6"},
"west": {"uv": [0, 14, 11, 16], "rotation": 180, "texture": "#6"},
"up": {"uv": [0, 10, 11, 12], "rotation": 90, "texture": "#6"},
"down": {"uv": [0, 12, 11, 14], "rotation": 90, "texture": "#6"}
}
},
{
"name": "mixertop2",
"from": [2.5, 4, 7],
"to": [13.5, 6, 9],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 7, 8]},
"faces": {
"north": {"uv": [0, 14, 11, 16], "rotation": 180, "texture": "#6"},
"east": {"uv": [2, 0, 4, 2], "texture": "#6"},
"south": {"uv": [0, 14, 11, 16], "rotation": 180, "texture": "#6"},
"west": {"uv": [2, 0, 4, 2], "texture": "#6"},
"up": {"uv": [0, 10, 11, 12], "texture": "#6"},
"down": {"uv": [0, 12, 11, 14], "texture": "#6"}
}
},
{
"name": "polebase",
"from": [5, 7, 5],
"to": [11, 9, 11],
"shade": false,
"rotation": {"angle": 0, "axis": "y", "origin": [8, 9, 8]},
"faces": {
"north": {"uv": [10, 6, 16, 8], "texture": "#6"},
"east": {"uv": [10, 6, 16, 8], "texture": "#6"},
"south": {"uv": [10, 6, 16, 8], "texture": "#6"},
"west": {"uv": [10, 6, 16, 8], "texture": "#6"},
"up": {"uv": [10, 0, 16, 6], "texture": "#6"},
"down": {"uv": [10, 0, 16, 6], "texture": "#6"}
}
},
{
"name": "Pole1Core",
"from": [6, 9, 6],
"to": [10, 19, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]},
"faces": {
"east": {"uv": [6, 6, 10, 16], "texture": "#mechanical_press_pole"},
"west": {"uv": [6, 6, 10, 16], "texture": "#mechanical_press_pole"},
"down": {"uv": [11, 1, 15, 5], "texture": "#mechanical_press_pole"}
}
},
{
"name": "Pole1Side",
"from": [5, 9, 5],
"to": [11, 19, 6],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]},
"faces": {
"north": {"uv": [0, 6, 6, 16], "texture": "#mechanical_press_pole"},
"east": {"uv": [0, 6, 1, 16], "texture": "#mechanical_press_pole"},
"south": {"uv": [0, 6, 6, 16], "texture": "#mechanical_press_pole"},
"west": {"uv": [5, 6, 6, 16], "texture": "#mechanical_press_pole"},
"down": {"uv": [10, 5, 16, 6], "texture": "#mechanical_press_pole"}
}
},
{
"name": "Pole1Side",
"from": [5, 9, 10],
"to": [11, 19, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]},
"faces": {
"north": {"uv": [0, 6, 6, 16], "texture": "#mechanical_press_pole"},
"east": {"uv": [0, 6, 1, 16], "texture": "#mechanical_press_pole"},
"south": {"uv": [0, 6, 6, 16], "texture": "#mechanical_press_pole"},
"west": {"uv": [5, 6, 6, 16], "texture": "#mechanical_press_pole"},
"down": {"uv": [10, 0, 16, 1], "texture": "#mechanical_press_pole"}
}
},
{
"name": "Pole2Core",
"from": [6, 19, 6],
"to": [10, 32, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]},
"faces": {
"east": {"uv": [6, 0, 10, 13], "texture": "#mechanical_press_pole"},
"west": {"uv": [6, 0, 10, 13], "texture": "#mechanical_press_pole"},
"up": {"uv": [11, 1, 15, 5], "rotation": 180, "texture": "#mechanical_press_pole"}
}
},
{
"name": "Pole2Side",
"from": [5, 19, 10],
"to": [11, 32, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]},
"faces": {
"north": {"uv": [0, 0, 6, 13], "texture": "#mechanical_press_pole"},
"east": {"uv": [0, 0, 1, 13], "texture": "#mechanical_press_pole"},
"south": {"uv": [0, 0, 6, 13], "texture": "#mechanical_press_pole"},
"west": {"uv": [5, 0, 6, 13], "texture": "#mechanical_press_pole"},
"up": {"uv": [10, 0, 16, 1], "rotation": 180, "texture": "#mechanical_press_pole"}
}
},
{
"name": "Pole2Side",
"from": [5, 19, 5],
"to": [11, 32, 6],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 8]},
"faces": {
"north": {"uv": [0, 0, 6, 13], "texture": "#mechanical_press_pole"},
"east": {"uv": [0, 0, 1, 13], "texture": "#mechanical_press_pole"},
"south": {"uv": [0, 0, 6, 13], "texture": "#mechanical_press_pole"},
"west": {"uv": [5, 0, 6, 13], "texture": "#mechanical_press_pole"},
"up": {"uv": [10, 5, 16, 6], "rotation": 180, "texture": "#mechanical_press_pole"}
}
},
{
"name": "Gear2",
"from": [-1, 13.5, 6.5],
"to": [17, 16.5, 9.5],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 0, 16, 3], "texture": "#1"},
"east": {"uv": [0, 0, 3, 3], "texture": "#1"},
"south": {"uv": [0, 0, 16, 3], "texture": "#1"},
"west": {"uv": [0, 0, 3, 3], "texture": "#1"},
"up": {"uv": [0, 0, 16, 3], "texture": "#1"},
"down": {"uv": [0, 0, 16, 3], "texture": "#1"}
}
},
{
"name": "Gear2",
"from": [-1, 13.5, 6.5],
"to": [17, 16.5, 9.5],
"rotation": {"angle": -22.5, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 0, 16, 3], "texture": "#1"},
"east": {"uv": [0, 0, 3, 3], "texture": "#1"},
"south": {"uv": [0, 0, 16, 3], "texture": "#1"},
"west": {"uv": [0, 0, 3, 3], "texture": "#1"},
"up": {"uv": [0, 0, 16, 3], "texture": "#1"},
"down": {"uv": [0, 0, 16, 3], "texture": "#1"}
}
},
{
"name": "Gear4",
"from": [6.5, 13.5, -1],
"to": [9.5, 16.5, 17],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 0, 3, 3], "texture": "#1"},
"east": {"uv": [0, 0, 16, 3], "texture": "#1"},
"south": {"uv": [0, 0, 3, 3], "texture": "#1"},
"west": {"uv": [0, 0, 16, 3], "texture": "#1"},
"up": {"uv": [0, 0, 3, 16], "texture": "#1"},
"down": {"uv": [0, 0, 3, 16], "texture": "#1"}
}
},
{
"name": "Gear4",
"from": [6.5, 13.5, -1],
"to": [9.5, 16.5, 17],
"rotation": {"angle": -22.5, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 0, 3, 3], "texture": "#1"},
"east": {"uv": [0, 0, 16, 3], "texture": "#1"},
"south": {"uv": [0, 0, 3, 3], "texture": "#1"},
"west": {"uv": [0, 0, 16, 3], "texture": "#1"},
"up": {"uv": [0, 0, 3, 16], "texture": "#1"},
"down": {"uv": [0, 0, 3, 16], "texture": "#1"}
}
},
{
"name": "GearCaseInner",
"from": [2, 14, 2],
"to": [14, 16, 14],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 0, 12, 2], "texture": "#1"},
"east": {"uv": [0, 0, 12, 2], "texture": "#1"},
"south": {"uv": [0, 0, 12, 2], "texture": "#1"},
"west": {"uv": [0, 0, 12, 2], "texture": "#1"},
"up": {"uv": [2, 2, 14, 14], "texture": "#2"},
"down": {"uv": [2, 2, 14, 14], "texture": "#2"}
}
},
{
"name": "GearCaseOuter",
"from": [4, 13, 4],
"to": [12, 17, 12],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 0, 8, 4], "texture": "#1"},
"east": {"uv": [0, 0, 8, 4], "texture": "#1"},
"south": {"uv": [0, 0, 8, 4], "texture": "#1"},
"west": {"uv": [0, 0, 8, 4], "texture": "#1"},
"up": {"uv": [4, 4, 12, 12], "texture": "#2"},
"down": {"uv": [4, 4, 12, 12], "texture": "#2"}
}
},
{
"name": "Top",
"from": [0, 17, 0],
"to": [16, 23, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 0, 16, 6], "texture": "#4"},
"east": {"uv": [0, 0, 16, 6], "texture": "#4"},
"south": {"uv": [0, 0, 16, 6], "texture": "#4"},
"west": {"uv": [0, 0, 16, 6], "texture": "#4"},
"up": {"uv": [0, 0, 16, 16], "texture": "#11"},
"down": {"uv": [0, 0, 16, 16], "texture": "#2"}
}
},
{
"name": "Bottom",
"from": [0, 9, 0],
"to": [16, 13, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 10, 16, 14], "texture": "#4"},
"east": {"uv": [0, 10, 16, 14], "texture": "#4"},
"south": {"uv": [0, 10, 16, 14], "texture": "#4"},
"west": {"uv": [0, 10, 16, 14], "texture": "#4"},
"up": {"uv": [0, 0, 16, 16], "texture": "#2"},
"down": {"uv": [0, 0, 16, 16], "texture": "#11"}
}
},
{
"name": "Side1",
"from": [0, 13, 0],
"to": [0, 17, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"east": {"uv": [0, 6, 16, 10], "texture": "#4"},
"west": {"uv": [0, 6, 16, 10], "texture": "#4"}
}
},
{
"name": "Side2",
"from": [16, 13, 0],
"to": [16, 17, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"east": {"uv": [0, 6, 16, 10], "texture": "#4"},
"west": {"uv": [0, 6, 16, 10], "texture": "#4"}
}
},
{
"name": "Side3",
"from": [0, 13, 16],
"to": [16, 17, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 6, 16, 10], "texture": "#4"},
"south": {"uv": [0, 6, 16, 10], "texture": "#4"}
}
},
{
"name": "Side4",
"from": [0, 13, 0],
"to": [16, 17, 0],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [0, 6, 16, 10], "texture": "#4"},
"south": {"uv": [0, 6, 16, 10], "texture": "#4"}
}
}
],
"groups": [
{
"name": "mixerhead",
"origin": [8, 8, 8],
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8]
},
{
"name": "mechanical_press_head",
"origin": [8, 8, 8],
"children": [9, 10, 11, 12, 13, 14, 15]
},
{
"name": "mixer_base",
"origin": [8, 8, 8],
"children": [
{
"name": "cogwheel",
"origin": [8, 8, 8],
"children": [16, 17, 18, 19]
},
{
"name": "mixerbase",
"origin": [8, 8, 8],
"children": [20, 21, 22, 23, 24, 25]
}
]
}
]
}

View file

@ -0,0 +1,129 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"ambientocclusion": false,
"textures": {
"0": "block/stripped_spruce_log",
"1": "block/spruce_log",
"2": "create:block/brass_casing",
"3": "block/andesite",
"particle": "block/stripped_spruce_log"
},
"display": {
"thirdperson_righthand": {
"rotation": [0, -180, 0],
"translation": [0, 3.75, 0]
},
"thirdperson_lefthand": {
"translation": [0, 3.75, 0]
},
"firstperson_righthand": {
"rotation": [-4.5, 100.25, 10],
"translation": [1, 4, 1]
},
"firstperson_lefthand": {
"rotation": [17.25, 267, 10],
"translation": [1, 4, 1]
},
"ground": {
"rotation": [-90, 0, 0],
"translation": [0, -2.3, 0],
"scale": [0.76914, 0.76914, 0.76914]
},
"gui": {
"rotation": [28, -163, 43],
"translation": [0.5, 0, 0],
"scale": [1.09453, 1.09453, 1.09453]
},
"fixed": {
"rotation": [0, 160.5, 0],
"translation": [0.5, 0.5, 0]
}
},
"elements": [
{
"name": "handle",
"from": [7.5, 0, 7.5],
"to": [8.5, 14, 8.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 11, 8]},
"faces": {
"north": {"uv": [1, 0, 2, 14], "texture": "#1"},
"east": {"uv": [1, 0, 2, 14], "texture": "#1"},
"south": {"uv": [1, 0, 2, 14], "texture": "#1"},
"west": {"uv": [1, 0, 2, 14], "texture": "#1"},
"up": {"uv": [0, 0, 1, 1], "texture": "#1"},
"down": {"uv": [0, 0, 1, 1], "texture": "#1"}
}
},
{
"name": "axle",
"from": [8.35355, 5, 7.14645],
"to": [9.35355, 12, 8.14645],
"rotation": {"angle": -45, "axis": "y", "origin": [8.5, 11, 8]},
"faces": {
"north": {"uv": [5, 2, 6, 9], "texture": "#3"},
"east": {"uv": [5, 2, 6, 9], "texture": "#3"},
"south": {"uv": [0, 0, 1, 7], "texture": "#3"},
"west": {"uv": [4, 3, 5, 10], "texture": "#3"},
"up": {"uv": [0, 0, 1, 1], "texture": "#3"},
"down": {"uv": [0, 0, 1, 1], "texture": "#3"}
}
},
{
"name": "top thing",
"from": [7, 14, 7],
"to": [11, 15, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 11, 7]},
"faces": {
"north": {"uv": [6, 1, 10, 2], "texture": "#2"},
"east": {"uv": [6, 1, 8, 2], "texture": "#2"},
"south": {"uv": [6, 1, 10, 2], "texture": "#2"},
"west": {"uv": [6, 1, 8, 2], "texture": "#2"},
"up": {"uv": [5, 0, 9, 2], "texture": "#2"},
"down": {"uv": [6, 0, 10, 2], "texture": "#2"}
}
},
{
"name": "bottom thing",
"from": [8, 12, 7],
"to": [11, 13, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 11, 7]},
"faces": {
"north": {"uv": [6, 1, 9, 2], "texture": "#2"},
"east": {"uv": [6, 1, 8, 2], "texture": "#2"},
"south": {"uv": [5, 1, 8, 2], "texture": "#2"},
"west": {"uv": [7, 1, 9, 2], "texture": "#2"},
"up": {"uv": [6, 0, 9, 2], "texture": "#2"},
"down": {"uv": [7, 0, 10, 2], "texture": "#2"}
}
},
{
"name": "gear case top",
"from": [7, 8, 7],
"to": [10, 9, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [9, 11, 8]},
"faces": {
"north": {"uv": [10, 0, 13, 1], "texture": "#2"},
"east": {"uv": [7, 0, 9, 1], "texture": "#2"},
"south": {"uv": [7, 0, 10, 1], "texture": "#2"},
"west": {"uv": [9, 0, 11, 1], "texture": "#2"},
"up": {"uv": [7, 0, 10, 2], "texture": "#2"},
"down": {"uv": [6, 0, 9, 2], "texture": "#2"}
}
},
{
"name": "gear case",
"from": [7.5, 6.5, 7],
"to": [9.5, 7.5, 9],
"rotation": {"angle": 45, "axis": "y", "origin": [8.5, 11, 8]},
"faces": {
"north": {"uv": [0, 0, 2, 1], "texture": "#1"},
"east": {"uv": [0, 0, 2, 1], "texture": "#1"},
"south": {"uv": [0, 0, 2, 1], "texture": "#1"},
"west": {"uv": [0, 0, 2, 1], "texture": "#1"},
"up": {"uv": [0, 0, 2, 2], "texture": "#1"},
"down": {"uv": [0, 0, 2, 2], "texture": "#1"}
}
}
]
}

View file

@ -0,0 +1,65 @@
{
"credit": "Made with Blockbench",
"parent": "create:item/wrench",
"textures": {
"0": "block/stripped_spruce_log"
},
"elements": [
{
"name": "Cog",
"from": [8, 7, 6],
"to": [9, 8, 10],
"rotation": {"angle": -45, "axis": "y", "origin": [8.5, 7, 8]},
"faces": {
"north": {"uv": [3, 6, 4, 7], "rotation": 180, "texture": "#0"},
"east": {"uv": [5, 6, 9, 7], "rotation": 180, "texture": "#0"},
"south": {"uv": [3, 6, 4, 7], "rotation": 180, "texture": "#0"},
"west": {"uv": [5, 6, 9, 7], "rotation": 180, "texture": "#0"},
"up": {"uv": [5, 6, 6, 10], "rotation": 180, "texture": "#0"},
"down": {"uv": [5, 6, 6, 10], "rotation": 180, "texture": "#0"}
}
},
{
"name": "Cog",
"from": [8, 7, 6],
"to": [9, 8, 10],
"rotation": {"angle": 45, "axis": "y", "origin": [8.5, 7, 8]},
"faces": {
"north": {"uv": [3, 6, 4, 7], "rotation": 180, "texture": "#0"},
"east": {"uv": [5, 6, 9, 7], "rotation": 180, "texture": "#0"},
"south": {"uv": [3, 6, 4, 7], "rotation": 180, "texture": "#0"},
"west": {"uv": [5, 6, 9, 7], "rotation": 180, "texture": "#0"},
"up": {"uv": [5, 6, 6, 10], "rotation": 180, "texture": "#0"},
"down": {"uv": [5, 6, 6, 10], "rotation": 180, "texture": "#0"}
}
},
{
"name": "Cog",
"from": [8, 7, 6],
"to": [9, 8, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 7, 8]},
"faces": {
"north": {"uv": [3, 6, 4, 7], "rotation": 180, "texture": "#0"},
"east": {"uv": [5, 6, 9, 7], "rotation": 180, "texture": "#0"},
"south": {"uv": [3, 6, 4, 7], "rotation": 180, "texture": "#0"},
"west": {"uv": [5, 6, 9, 7], "rotation": 180, "texture": "#0"},
"up": {"uv": [5, 6, 6, 10], "rotation": 180, "texture": "#0"},
"down": {"uv": [5, 6, 6, 10], "rotation": 180, "texture": "#0"}
}
},
{
"name": "Cog",
"from": [6.5, 7, 7.5],
"to": [10.5, 8, 8.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 7, 8]},
"faces": {
"north": {"uv": [3, 6, 7, 7], "rotation": 180, "texture": "#0"},
"east": {"uv": [3, 6, 4, 7], "rotation": 180, "texture": "#0"},
"south": {"uv": [3, 6, 7, 7], "rotation": 180, "texture": "#0"},
"west": {"uv": [7, 4, 8, 5], "rotation": 180, "texture": "#0"},
"up": {"uv": [5, 6, 9, 7], "rotation": 180, "texture": "#0"},
"down": {"uv": [5, 6, 9, 7], "rotation": 180, "texture": "#0"}
}
}
]
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:basin"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:mechanical_mixer"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}