Omnidirectional Extractors

- Extractors and Linked Extractors have vertical variants
- Minor reworks to Extractor models
This commit is contained in:
simibubi 2019-12-22 01:31:40 +01:00
parent d8ccfd844c
commit 039edb5519
62 changed files with 728 additions and 194 deletions

View file

@ -20,7 +20,7 @@ archivesBaseName = 'create'
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
minecraft {
mappings channel: 'snapshot', version: '20191130-1.14.3'
mappings channel: 'snapshot', version: '20191221-1.14.3'
runs {
client {
@ -71,12 +71,12 @@ repositories {
}
dependencies {
minecraft 'net.minecraftforge:forge:1.14.4-28.1.106'
minecraft 'net.minecraftforge:forge:1.14.4-28.1.107'
// compile against the JEI API but do not include it at runtime
compileOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.10:api")
compileOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.26:api")
// at runtime, use the full JEI jar
runtimeOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.10")
runtimeOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.26")
}
jar {

View file

@ -1,7 +1,8 @@
package com.simibubi.create;
import com.simibubi.create.foundation.block.IBlockWithColorHandler;
import com.simibubi.create.foundation.block.IWithoutBlockItem;
import com.simibubi.create.foundation.block.IHaveColorHandler;
import com.simibubi.create.foundation.block.IHaveCustomBlockItem;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
import com.simibubi.create.foundation.block.ProperStairsBlock;
import com.simibubi.create.foundation.block.RenderUtilityAxisBlock;
import com.simibubi.create.foundation.block.RenderUtilityBlock;
@ -25,7 +26,6 @@ import com.simibubi.create.modules.contraptions.components.crusher.CrushingWheel
import com.simibubi.create.modules.contraptions.components.crusher.CrushingWheelControllerBlock;
import com.simibubi.create.modules.contraptions.components.fan.EncasedFanBlock;
import com.simibubi.create.modules.contraptions.components.mixer.MechanicalMixerBlock;
import com.simibubi.create.modules.contraptions.components.mixer.MechanicalMixerBlock.MechanicalMixerBlockItem;
import com.simibubi.create.modules.contraptions.components.motor.MotorBlock;
import com.simibubi.create.modules.contraptions.components.press.MechanicalPressBlock;
import com.simibubi.create.modules.contraptions.components.saw.SawBlock;
@ -55,6 +55,8 @@ import com.simibubi.create.modules.logistics.block.belts.BeltFunnelBlock;
import com.simibubi.create.modules.logistics.block.belts.EntityDetectorBlock;
import com.simibubi.create.modules.logistics.block.belts.ExtractorBlock;
import com.simibubi.create.modules.logistics.block.belts.LinkedExtractorBlock;
import com.simibubi.create.modules.logistics.block.belts.VerticalExtractorBlock;
import com.simibubi.create.modules.logistics.block.belts.VerticalLinkedExtractorBlock;
import com.simibubi.create.modules.logistics.block.diodes.FlexpeaterBlock;
import com.simibubi.create.modules.logistics.block.diodes.PulseRepeaterBlock;
import com.simibubi.create.modules.logistics.block.inventories.FlexcrateBlock;
@ -162,7 +164,9 @@ public enum AllBlocks {
STOCKSWITCH(new StockswitchBlock()),
FLEXCRATE(new FlexcrateBlock()),
EXTRACTOR(new ExtractorBlock()),
VERTICAL_EXTRACTOR(new VerticalExtractorBlock()),
LINKED_EXTRACTOR(new LinkedExtractorBlock()),
VERTICAL_LINKED_EXTRACTOR(new VerticalLinkedExtractorBlock()),
BELT_FUNNEL(new BeltFunnelBlock()),
BELT_TUNNEL(new BeltTunnelBlock()),
BELT_TUNNEL_FLAP(new RenderUtilityBlock()),
@ -208,7 +212,10 @@ public enum AllBlocks {
POLISHED_LIMESTONE(new Block(Properties.from(LIMESTONE.block)), ComesWith.SLAB),
LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(LIMESTONE.block))),
WEATHERED_LIMESTONE(new Block(Properties.from(Blocks.ANDESITE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL),
WEATHERED_LIMESTONE_BRICKS(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.STAIRS, ComesWith.SLAB,
WEATHERED_LIMESTONE_BRICKS(
new Block(Properties.from(WEATHERED_LIMESTONE.block)),
ComesWith.STAIRS,
ComesWith.SLAB,
ComesWith.WALL),
POLISHED_WEATHERED_LIMESTONE(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.SLAB),
WEATHERED_LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(WEATHERED_LIMESTONE.block))),
@ -269,7 +276,7 @@ public enum AllBlocks {
for (AllBlocks block : values()) {
if (block.get() == null)
continue;
if (block.get() instanceof IWithoutBlockItem)
if (block.get() instanceof IHaveNoBlockItem)
continue;
registerAsItem(registry, block.get());
@ -282,8 +289,8 @@ public enum AllBlocks {
BlockItem blockItem = null;
net.minecraft.item.Item.Properties standardItemProperties = AllItems.standardItemProperties();
if (blockIn == AllBlocks.MECHANICAL_MIXER.get())
blockItem = new MechanicalMixerBlockItem(standardItemProperties);
if (blockIn instanceof IHaveCustomBlockItem)
blockItem = ((IHaveCustomBlockItem) blockIn).getCustomItem(standardItemProperties);
else
blockItem = new BlockItem(blockIn, standardItemProperties);
@ -329,8 +336,8 @@ public enum AllBlocks {
public static void registerColorHandlers() {
BlockColors blockColors = Minecraft.getInstance().getBlockColors();
for (AllBlocks block : values()) {
if (block.block instanceof IBlockWithColorHandler) {
blockColors.register(((IBlockWithColorHandler) block.block).getColorHandler(), block.block);
if (block.block instanceof IHaveColorHandler) {
blockColors.register(((IHaveColorHandler) block.block).getColorHandler(), block.block);
}
}
}

View file

@ -107,7 +107,10 @@ public enum AllTileEntities {
BELT_TUNNEL(BeltTunnelTileEntity::new, AllBlocks.BELT_TUNNEL),
MECHANICAL_PISTON(MechanicalPistonTileEntity::new, AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON),
MECHANICAL_BEARING(MechanicalBearingTileEntity::new, AllBlocks.MECHANICAL_BEARING),
CHASSIS(ChassisTileEntity::new, AllBlocks.ROTATION_CHASSIS, AllBlocks.TRANSLATION_CHASSIS,
CHASSIS(
ChassisTileEntity::new,
AllBlocks.ROTATION_CHASSIS,
AllBlocks.TRANSLATION_CHASSIS,
AllBlocks.TRANSLATION_CHASSIS_SECONDARY),
DRILL(DrillTileEntity::new, AllBlocks.DRILL),
SAW(SawTileEntity::new, AllBlocks.SAW),
@ -126,8 +129,8 @@ public enum AllTileEntities {
REDSTONE_BRIDGE(RedstoneBridgeTileEntity::new, AllBlocks.REDSTONE_BRIDGE),
STOCKSWITCH(StockswitchTileEntity::new, AllBlocks.STOCKSWITCH),
FLEXCRATE(FlexcrateTileEntity::new, AllBlocks.FLEXCRATE),
EXTRACTOR(ExtractorTileEntity::new, AllBlocks.EXTRACTOR),
LINKED_EXTRACTOR(LinkedExtractorTileEntity::new, AllBlocks.LINKED_EXTRACTOR),
EXTRACTOR(ExtractorTileEntity::new, AllBlocks.EXTRACTOR, AllBlocks.VERTICAL_EXTRACTOR),
LINKED_EXTRACTOR(LinkedExtractorTileEntity::new, AllBlocks.LINKED_EXTRACTOR, AllBlocks.VERTICAL_LINKED_EXTRACTOR),
BELT_FUNNEL(BeltFunnelTileEntity::new, AllBlocks.BELT_FUNNEL),
ENTITY_DETECTOR(EntityDetectorTileEntity::new, AllBlocks.ENTITY_DETECTOR),
FLEXPEATER(FlexpeaterTileEntity::new, AllBlocks.FLEXPEATER),

View file

@ -3,7 +3,7 @@ package com.simibubi.create;
import java.util.ArrayList;
import java.util.List;
import com.simibubi.create.foundation.block.IBlockWithScrollableValue;
import com.simibubi.create.foundation.block.IHaveScrollableValue;
import com.simibubi.create.foundation.gui.ScreenOpener;
import com.simibubi.create.foundation.item.TooltipHelper;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
@ -100,7 +100,7 @@ public class ClientEvents {
boolean cancelled = CreateClient.schematicHandler.mouseScrolled(delta)
|| CreateClient.schematicAndQuillHandler.mouseScrolled(delta)
|| IBlockWithScrollableValue.onScroll(delta);
|| IHaveScrollableValue.onScroll(delta);
event.setCanceled(cancelled);
}

View file

@ -7,7 +7,7 @@ import java.util.function.Function;
import com.simibubi.create.foundation.block.CTModel;
import com.simibubi.create.foundation.block.ColoredVertexModel;
import com.simibubi.create.foundation.block.IBlockWithColoredVertices;
import com.simibubi.create.foundation.block.IHaveColoredVertices;
import com.simibubi.create.foundation.block.IHaveConnectedTextures;
import com.simibubi.create.foundation.block.SpriteShifter.SpriteShiftEntry;
import com.simibubi.create.foundation.utility.SuperByteBufferCache;
@ -126,9 +126,9 @@ public class CreateClient {
List<ModelResourceLocation> blockModelLocations = getAllBlockStateModelLocations(allBlocks);
if (block instanceof IHaveConnectedTextures)
swapModels(modelRegistry, blockModelLocations, t -> new CTModel(t, (IHaveConnectedTextures) block));
if (block instanceof IBlockWithColoredVertices)
if (block instanceof IHaveColoredVertices)
swapModels(modelRegistry, blockModelLocations,
t -> new ColoredVertexModel(t, (IBlockWithColoredVertices) block));
t -> new ColoredVertexModel(t, (IHaveColoredVertices) block));
}

View file

@ -1,6 +1,6 @@
package com.simibubi.create;
import com.simibubi.create.foundation.block.IWithoutBlockItem;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
import com.simibubi.create.foundation.item.IAddedByOther;
import net.minecraft.block.Block;
@ -32,7 +32,7 @@ public final class CreateItemGroup extends ItemGroup {
continue;
if (!block.module.isEnabled())
continue;
if (block.get() instanceof IWithoutBlockItem)
if (block.get() instanceof IHaveNoBlockItem)
continue;
if (block.get() instanceof IAddedByOther)
continue;

View file

@ -19,10 +19,10 @@ import net.minecraftforge.client.model.data.ModelProperty;
public class ColoredVertexModel extends BakedModelWrapper<IBakedModel> {
private IBlockWithColoredVertices colorer;
private IHaveColoredVertices colorer;
private static ModelProperty<BlockPos> POSITION_PROPERTY = new ModelProperty<>();
public ColoredVertexModel(IBakedModel originalModel, IBlockWithColoredVertices colorer) {
public ColoredVertexModel(IBakedModel originalModel, IHaveColoredVertices colorer) {
super(originalModel);
this.colorer = colorer;
}

View file

@ -2,7 +2,7 @@ package com.simibubi.create.foundation.block;
import net.minecraft.client.renderer.color.IBlockColor;
public interface IBlockWithColorHandler {
public interface IHaveColorHandler {
public IBlockColor getColorHandler();

View file

@ -1,6 +1,6 @@
package com.simibubi.create.foundation.block;
public interface IBlockWithColoredVertices {
public interface IHaveColoredVertices {
public int getColor(float x, float y, float z);

View file

@ -0,0 +1,10 @@
package com.simibubi.create.foundation.block;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item.Properties;
public interface IHaveCustomBlockItem {
public BlockItem getCustomItem(Properties properties);
}

View file

@ -3,6 +3,6 @@ package com.simibubi.create.foundation.block;
/**
* Blocks only registered for use outside of the inventory
*/
public interface IWithoutBlockItem {
public interface IHaveNoBlockItem {
}

View file

@ -29,7 +29,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
@EventBusSubscriber(value = Dist.CLIENT)
public interface IBlockWithScrollableValue {
public interface IHaveScrollableValue {
public static final AxisAlignedBB VALUE_BB = new AxisAlignedBB(0, 0, 0, 2 / 16f, 6 / 16f, 6 / 16f);
@ -71,12 +71,12 @@ public interface IBlockWithScrollableValue {
BlockPos blockPos = result.getPos();
BlockState state = world.getBlockState(blockPos);
if (!(state.getBlock() instanceof IBlockWithScrollableValue))
if (!(state.getBlock() instanceof IHaveScrollableValue))
return;
if (!mc.player.isAllowEdit())
return;
IBlockWithScrollableValue block = (IBlockWithScrollableValue) state.getBlock();
IHaveScrollableValue block = (IHaveScrollableValue) state.getBlock();
Vec3d pos = new Vec3d(blockPos);
if (block.requiresWrench() && !AllItems.WRENCH.typeOf(mc.player.getHeldItemMainhand()))
@ -193,12 +193,12 @@ public interface IBlockWithScrollableValue {
BlockPos blockPos = result.getPos();
BlockState state = world.getBlockState(blockPos);
if (!(state.getBlock() instanceof IBlockWithScrollableValue))
if (!(state.getBlock() instanceof IHaveScrollableValue))
return false;
if (!mc.player.isAllowEdit())
return false;
IBlockWithScrollableValue block = (IBlockWithScrollableValue) state.getBlock();
IHaveScrollableValue block = (IHaveScrollableValue) state.getBlock();
if (block.requiresWrench() && !AllItems.WRENCH.typeOf(mc.player.getHeldItemMainhand()))
return false;

View file

@ -3,6 +3,6 @@ package com.simibubi.create.foundation.block;
/**
* Blocks only registered for use in other blocks' renderers.
*/
public interface IRenderUtilityBlock extends IWithoutBlockItem {
public interface IRenderUtilityBlock extends IHaveNoBlockItem {
}

View file

@ -23,8 +23,9 @@ public class AllShapes {
MOTOR_BLOCK = VoxelShaper.forHorizontal(makeCuboidShape(0, 3, 3, 16, 13, 13), Direction.EAST),
FOUR_VOXEL_POLE = VoxelShaper.forDirectionalAxis(makeCuboidShape(6, 0, 6, 10, 16, 10), Direction.Axis.Y),
SIX_VOXEL_POLE = VoxelShaper.forDirectionalAxis(makeCuboidShape(5, 0, 5, 11, 16, 11), Direction.Axis.Y),
BELT_FUNNEL = VoxelShaper.forHorizontal(makeCuboidShape(3, -4, 11, 13, 8, 17), Direction.SOUTH),
BELT_EXTRACTOR = VoxelShaper.forHorizontal(makeCuboidShape(4, 2, 11, 12, 10, 17), Direction.SOUTH)
FUNNEL = VoxelShaper.forDirectional(makeCuboidShape(3, -4, 11, 13, 8, 17), Direction.SOUTH),
EXTRACTOR = VoxelShaper.forDirectional(makeCuboidShape(4, 2, 11, 12, 10, 17), Direction.SOUTH)
.withVerticalShapes(makeCuboidShape(4, 11, 4, 12, 17, 12))
;

View file

@ -0,0 +1,15 @@
package com.simibubi.create.foundation.utility;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
public class AngleHelper {
public static float horizontalAngle(Direction facing) {
float angle = facing.getHorizontalAngle();
if (facing.getAxis() == Axis.X)
angle = -angle;
return angle;
}
}

View file

@ -6,6 +6,7 @@ import net.minecraft.nbt.DoubleNBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.Vec3i;
@ -16,6 +17,11 @@ public class VecHelper {
return rotate(rotate(rotate(vec, xRot, Axis.X), yRot, Axis.Y), zRot, Axis.Z);
}
public static Vec3d rotateCentered(Vec3d vec, double deg, Axis axis) {
Vec3d shift = getCenterOf(BlockPos.ZERO);
return VecHelper.rotate(vec.subtract(shift), deg, axis).add(shift);
}
public static Vec3d rotate(Vec3d vec, double deg, Axis axis) {
if (deg == 0)
return vec;

View file

@ -2,7 +2,7 @@ package com.simibubi.create.modules.contraptions.components.contraptions.chassis
import java.util.List;
import com.simibubi.create.foundation.block.IBlockWithScrollableValue;
import com.simibubi.create.foundation.block.IHaveScrollableValue;
import com.simibubi.create.foundation.block.IWithTileEntity;
import com.simibubi.create.foundation.utility.Lang;
@ -28,7 +28,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.Tags;
public abstract class AbstractChassisBlock extends RotatedPillarBlock
implements IWithTileEntity<ChassisTileEntity>, IBlockWithScrollableValue {
implements IWithTileEntity<ChassisTileEntity>, IHaveScrollableValue {
private static final Vec3d valuePos = new Vec3d(15 / 16f, 9 / 16f, 9 / 16f);

View file

@ -2,7 +2,7 @@ package com.simibubi.create.modules.contraptions.components.contraptions.piston;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.CreateConfig;
import com.simibubi.create.foundation.block.IWithoutBlockItem;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
import com.simibubi.create.foundation.block.ProperDirectionalBlock;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.contraptions.components.contraptions.piston.MechanicalPistonBlock.PistonState;
@ -24,7 +24,7 @@ import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
public class MechanicalPistonHeadBlock extends ProperDirectionalBlock implements IWithoutBlockItem {
public class MechanicalPistonHeadBlock extends ProperDirectionalBlock implements IHaveNoBlockItem {
public static final EnumProperty<PistonType> TYPE = BlockStateProperties.PISTON_TYPE;

View file

@ -3,7 +3,7 @@ package com.simibubi.create.modules.contraptions.components.crusher;
import java.util.Random;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.block.IWithoutBlockItem;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import net.minecraft.block.Block;
@ -28,7 +28,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
public class CrushingWheelControllerBlock extends Block implements IWithoutBlockItem {
public class CrushingWheelControllerBlock extends Block implements IHaveNoBlockItem {
public static final BooleanProperty VALID = BooleanProperty.create("valid");

View file

@ -1,7 +1,8 @@
package com.simibubi.create.modules.contraptions.components.mixer;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.block.IBlockWithScrollableValue;
import com.simibubi.create.foundation.block.IHaveCustomBlockItem;
import com.simibubi.create.foundation.block.IHaveScrollableValue;
import com.simibubi.create.foundation.block.IWithTileEntity;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.foundation.utility.Lang;
@ -26,7 +27,7 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.World;
public class MechanicalMixerBlock extends KineticBlock
implements IWithTileEntity<MechanicalMixerTileEntity>, IBlockWithScrollableValue {
implements IWithTileEntity<MechanicalMixerTileEntity>, IHaveScrollableValue, IHaveCustomBlockItem {
private static final Vec3d valuePos = new Vec3d(15.8f / 16f, 6 / 16f, 5 / 16f);
@ -137,7 +138,7 @@ public class MechanicalMixerBlock extends KineticBlock
return 0;
return tileEntity.currentValue;
}
@Override
public float getParticleTargetRadius() {
return .85f;
@ -147,10 +148,15 @@ public class MechanicalMixerBlock extends KineticBlock
public float getParticleInitialRadius() {
return .75f;
}
@Override
public SpeedLevel getMinimumRequiredSpeedLevel() {
return SpeedLevel.MEDIUM;
}
@Override
public BlockItem getCustomItem(net.minecraft.item.Item.Properties properties) {
return new MechanicalMixerBlockItem(properties);
}
}

View file

@ -1,6 +1,6 @@
package com.simibubi.create.modules.contraptions.components.motor;
import com.simibubi.create.foundation.block.IBlockWithScrollableValue;
import com.simibubi.create.foundation.block.IHaveScrollableValue;
import com.simibubi.create.foundation.block.IWithTileEntity;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.foundation.utility.Lang;
@ -20,7 +20,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
public class MotorBlock extends HorizontalKineticBlock implements IWithTileEntity<MotorTileEntity>, IBlockWithScrollableValue {
public class MotorBlock extends HorizontalKineticBlock implements IWithTileEntity<MotorTileEntity>, IHaveScrollableValue {
private static final Vec3d valuePos = new Vec3d(15 / 16f, 5 / 16f, 5 / 16f);

View file

@ -4,7 +4,7 @@ import com.simibubi.create.foundation.block.IWithTileEntity;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.contraptions.base.DirectionalAxisKineticBlock;
import com.simibubi.create.modules.contraptions.components.contraptions.IHaveMovementBehavior;
import com.simibubi.create.modules.logistics.block.IBlockWithFilter;
import com.simibubi.create.modules.logistics.block.IHaveFilterSlot;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@ -34,7 +34,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
public class SawBlock extends DirectionalAxisKineticBlock
implements IWithTileEntity<SawTileEntity>, IHaveMovementBehavior, IBlockWithFilter {
implements IWithTileEntity<SawTileEntity>, IHaveMovementBehavior, IHaveFilterSlot {
public static final BooleanProperty RUNNING = BooleanProperty.create("running");
public static DamageSource damageSourceSaw = new DamageSource("create.saw").setDamageBypassesArmor();

View file

@ -7,7 +7,7 @@ import java.util.List;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems;
import com.simibubi.create.foundation.block.IWithTileEntity;
import com.simibubi.create.foundation.block.IWithoutBlockItem;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock;
@ -51,7 +51,7 @@ import net.minecraftforge.common.Tags;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
public class BeltBlock extends HorizontalKineticBlock implements IWithoutBlockItem, IWithTileEntity<BeltTileEntity> {
public class BeltBlock extends HorizontalKineticBlock implements IHaveNoBlockItem, IWithTileEntity<BeltTileEntity> {
public static final IProperty<Slope> SLOPE = EnumProperty.create("slope", Slope.class);
public static final IProperty<Part> PART = EnumProperty.create("part", Part.class);

View file

@ -1,11 +1,11 @@
package com.simibubi.create.modules.contraptions.relays.elementary;
import com.simibubi.create.foundation.block.IWithoutBlockItem;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
import com.simibubi.create.foundation.block.ProperDirectionalBlock;
import net.minecraft.block.Blocks;
public class ShaftHalfBlock extends ProperDirectionalBlock implements IWithoutBlockItem {
public class ShaftHalfBlock extends ProperDirectionalBlock implements IHaveNoBlockItem {
public ShaftHalfBlock() {
super(Properties.from(Blocks.AIR));

View file

@ -5,7 +5,7 @@ import java.util.Collections;
import java.util.List;
import com.simibubi.create.foundation.block.IWithTileEntity;
import com.simibubi.create.foundation.block.IWithoutBlockItem;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@ -44,7 +44,7 @@ import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class WindowInABlockBlock extends PaneBlock
implements IWithTileEntity<WindowInABlockTileEntity>, IWithoutBlockItem {
implements IWithTileEntity<WindowInABlockTileEntity>, IHaveNoBlockItem {
public WindowInABlockBlock() {
super(Properties.create(Material.ROCK));

View file

@ -21,7 +21,7 @@ public class FilteredTileEntityRenderer {
public static <T extends TileEntity & IHaveFilter> void render(T tileEntityIn, double x, double y, double z,
float partialTicks, int destroyStage) {
BlockState state = tileEntityIn.getBlockState();
IBlockWithFilter block = (IBlockWithFilter) state.getBlock();
IHaveFilterSlot block = (IHaveFilterSlot) state.getBlock();
if (!block.isFilterVisible(state))
return;

View file

@ -1,6 +1,7 @@
package com.simibubi.create.modules.logistics.block;
import com.mojang.blaze3d.platform.GlStateManager;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.TessellatorHelper;
@ -16,7 +17,6 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.Hand;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
@ -31,7 +31,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
@EventBusSubscriber(value = Dist.CLIENT)
public interface IBlockWithFilter {
public interface IHaveFilterSlot {
public Vec3d getFilterPosition(BlockState state);
@ -88,14 +88,14 @@ public interface IBlockWithFilter {
BlockPos pos = result.getPos();
BlockState state = world.getBlockState(pos);
if (!(state.getBlock() instanceof IBlockWithFilter))
if (!(state.getBlock() instanceof IHaveFilterSlot))
return;
TileEntity te = world.getTileEntity(pos);
if (te == null || !(te instanceof IHaveFilter))
return;
IHaveFilter actor = (IHaveFilter) te;
IBlockWithFilter filterBlock = (IBlockWithFilter) state.getBlock();
IHaveFilterSlot filterBlock = (IHaveFilterSlot) state.getBlock();
if (!filterBlock.isFilterVisible(state))
return;
@ -142,17 +142,17 @@ public interface IBlockWithFilter {
tessellator.draw();
GlStateManager.popMatrix();
GlStateManager.enableTexture();
GlStateManager.depthMask(true);
if (contains) {
float textScale = 1 / 128f;
GlStateManager.translated(position.x, position.y, position.z);
GlStateManager.rotated(facing.getHorizontalAngle() * (facing.getAxis() == Axis.X ? -1 : 1), 0, 1, 0);
GlStateManager.translated(center.x, center.y, center.z);
GlStateManager.scaled(textScale, -textScale, textScale);
GlStateManager.rotated(AngleHelper.horizontalAngle(facing), 0, 1, 0);
GlStateManager.translated(17.5f, -5f, -5f);
GlStateManager.rotated(90 - filterAngle, 1, 0, 0);
GlStateManager.rotated(90, 1, 0, 0);
String text = Lang.translate("logistics.filter");
FontRenderer font = Minecraft.getInstance().fontRenderer;
@ -169,7 +169,9 @@ public interface IBlockWithFilter {
font.drawString(count, 1, 1, 0x4F4F4F);
}
}
GlStateManager.disableBlend();
GlStateManager.popMatrix();
GlStateManager.lineWidth(1);
TessellatorHelper.cleanUpAfterDrawing();

View file

@ -13,7 +13,7 @@ import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.I
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
import com.simibubi.create.modules.contraptions.relays.belt.TransportedItemStack;
import com.simibubi.create.modules.logistics.block.IBlockWithFilter;
import com.simibubi.create.modules.logistics.block.IHaveFilterSlot;
import com.simibubi.create.modules.logistics.block.IInventoryManipulator;
import net.minecraft.block.Block;
@ -39,7 +39,7 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
public class BeltFunnelBlock extends HorizontalBlock implements IBeltAttachment, IWithTileEntity<BeltFunnelTileEntity>, IBlockWithFilter {
public class BeltFunnelBlock extends HorizontalBlock implements IBeltAttachment, IWithTileEntity<BeltFunnelTileEntity>, IHaveFilterSlot {
public BeltFunnelBlock() {
super(Properties.from(Blocks.ANDESITE));
@ -101,7 +101,7 @@ public class BeltFunnelBlock extends HorizontalBlock implements IBeltAttachment,
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return AllShapes.BELT_FUNNEL.get(state.get(HORIZONTAL_FACING));
return AllShapes.FUNNEL.get(state.get(HORIZONTAL_FACING));
}
@Override

View file

@ -15,7 +15,7 @@ import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Part;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Slope;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
import com.simibubi.create.modules.contraptions.relays.belt.TransportedItemStack;
import com.simibubi.create.modules.logistics.block.IBlockWithFilter;
import com.simibubi.create.modules.logistics.block.IHaveFilterSlot;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@ -41,7 +41,7 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.World;
public class EntityDetectorBlock extends HorizontalBlock
implements IWithTileEntity<EntityDetectorTileEntity>, IBeltAttachment, IBlockWithFilter {
implements IWithTileEntity<EntityDetectorTileEntity>, IBeltAttachment, IHaveFilterSlot {
public static BooleanProperty POWERED = BlockStateProperties.POWERED;
public static BooleanProperty BELT = BooleanProperty.create("belt");

View file

@ -5,10 +5,11 @@ import java.util.List;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock;
import com.simibubi.create.modules.logistics.block.IBlockWithFilter;
import com.simibubi.create.modules.logistics.block.IExtractor;
import com.simibubi.create.modules.logistics.block.IHaveFilterSlot;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@ -33,15 +34,15 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter {
public class ExtractorBlock extends HorizontalBlock implements IHaveFilterSlot {
public static BooleanProperty POWERED = BlockStateProperties.POWERED;
private static final List<Vec3d> itemPositions = new ArrayList<>(Direction.values().length);
protected static final List<Vec3d> filterLocations = new ArrayList<>();
public ExtractorBlock() {
super(Properties.from(Blocks.ANDESITE));
setDefaultState(getDefaultState().with(POWERED, false));
cacheItemPositions();
cacheFilterLocations();
}
@Override
@ -78,6 +79,8 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
if (context.getFace().getAxis().isHorizontal()) {
state = state.with(HORIZONTAL_FACING, context.getFace().getOpposite());
} else {
state = AllBlocks.VERTICAL_EXTRACTOR.get().getDefaultState();
state = state.with(VerticalExtractorBlock.UPWARD, context.getFace() != Direction.UP);
state = state.with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing());
}
@ -91,7 +94,7 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
@Override
public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) {
Direction facing = state.get(HORIZONTAL_FACING);
Direction facing = getBlockFacing(state);
BlockPos neighbourPos = pos.offset(facing);
BlockState neighbour = worldIn.getBlockState(neighbourPos);
@ -119,7 +122,7 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
}
private boolean isObserving(BlockState state, BlockPos pos, BlockPos observing) {
return observing.equals(pos.offset(state.get(HORIZONTAL_FACING)));
return observing.equals(pos.offset(getBlockFacing(state)));
}
@Override
@ -128,7 +131,7 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
if (worldIn.isRemote)
return;
Direction blockFacing = state.get(HORIZONTAL_FACING);
Direction blockFacing = getBlockFacing(state);
if (fromPos.equals(pos.offset(blockFacing))) {
if (!isValidPosition(state, worldIn, pos)) {
worldIn.destroyBlock(pos, true);
@ -146,29 +149,28 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
}
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return AllShapes.BELT_EXTRACTOR.get(state.get(HORIZONTAL_FACING));
public Direction getBlockFacing(BlockState state) {
return state.get(HORIZONTAL_FACING);
}
private void cacheItemPositions() {
itemPositions.clear();
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return AllShapes.EXTRACTOR.get(getBlockFacing(state));
}
Vec3d position = Vec3d.ZERO;
Vec3d shift = VecHelper.getCenterOf(BlockPos.ZERO);
float zFightOffset = 1 / 128f;
private void cacheFilterLocations() {
filterLocations.clear();
float e = 1 / 128f;
Vec3d offsetForHorizontal = new Vec3d(8f / 16f, 10.5f / 16f + e, 2f / 16f);
Vec3d offsetForUpward = new Vec3d(8f / 16f, 14.15f / 16f - e, 12.75f / 16f);
Vec3d offsetForDownward = new Vec3d(8f / 16f, 1.85f / 16f + e, 12.75f / 16f);
for (int i = 0; i < 4; i++) {
Direction facing = Direction.byHorizontalIndex(i);
position = new Vec3d(8f / 16f + zFightOffset, 10.5f / 16f, 2.25f / 16f);
float angle = facing.getHorizontalAngle();
if (facing.getAxis() == Axis.X)
angle = -angle;
position = VecHelper.rotate(position.subtract(shift), angle, Axis.Y).add(shift);
itemPositions.add(position);
for (Vec3d offset : new Vec3d[] { offsetForHorizontal, offsetForUpward, offsetForDownward }) {
for (int i = 0; i < 4; i++) {
Direction facing = Direction.byHorizontalIndex(i);
float angle = AngleHelper.horizontalAngle(facing);
filterLocations.add(VecHelper.rotateCentered(offset, angle, Axis.Y));
}
}
}
@ -180,7 +182,7 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
@Override
public Vec3d getFilterPosition(BlockState state) {
Direction facing = state.get(HORIZONTAL_FACING).getOpposite();
return itemPositions.get(facing.getHorizontalIndex());
return filterLocations.get(facing.getHorizontalIndex());
}
@Override
@ -193,4 +195,8 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter
return PushReaction.BLOCK;
}
public float getFilterAngle(BlockState state) {
return getBlockFacing(state).getAxis().isHorizontal() ? 0 : 90;
}
}

View file

@ -6,9 +6,10 @@ import com.simibubi.create.foundation.block.SyncedTileEntity;
import com.simibubi.create.modules.logistics.block.IExtractor;
import com.simibubi.create.modules.logistics.block.IHaveFilter;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.common.util.LazyOptional;
@ -82,7 +83,11 @@ public class ExtractorTileEntity extends SyncedTileEntity implements IExtractor,
@Override
public BlockPos getInventoryPos() {
return getPos().offset(getBlockState().get(BlockStateProperties.HORIZONTAL_FACING));
BlockState blockState = getBlockState();
Block block = blockState.getBlock();
if (!(block instanceof ExtractorBlock))
return null;
return getPos().offset(((ExtractorBlock) block).getBlockFacing(blockState));
}
@Override

View file

@ -5,6 +5,8 @@ import java.util.List;
import org.apache.commons.lang3.tuple.Pair;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.modules.logistics.block.IBlockWithFrequency;
@ -25,11 +27,11 @@ import net.minecraft.world.World;
public class LinkedExtractorBlock extends ExtractorBlock implements IBlockWithFrequency {
private static final List<Pair<Vec3d, Vec3d>> itemPositions = new ArrayList<>(Direction.values().length);
private static final List<Pair<Vec3d, Vec3d>> linkItemLocations = new ArrayList<>();
public LinkedExtractorBlock() {
super();
cacheItemPositions();
cacheLinkItemLocations();
}
@Override
@ -41,7 +43,7 @@ public class LinkedExtractorBlock extends ExtractorBlock implements IBlockWithFr
public boolean hasTileEntity(BlockState state) {
return true;
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new LinkedExtractorTileEntity();
@ -49,12 +51,32 @@ public class LinkedExtractorBlock extends ExtractorBlock implements IBlockWithFr
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
return super.getStateForPlacement(context).with(POWERED, false);
BlockState state = getDefaultState();
if (context.getFace().getAxis().isHorizontal()) {
state = state.with(HORIZONTAL_FACING, context.getFace().getOpposite());
} else {
state = AllBlocks.VERTICAL_LINKED_EXTRACTOR.get().getDefaultState();
state = state.with(VerticalExtractorBlock.UPWARD, context.getFace() != Direction.UP);
state = state.with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing());
}
return state.with(POWERED, Boolean.valueOf(false));
}
@Override
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
boolean isMoving) {
if (worldIn.isRemote)
return;
Direction blockFacing = getBlockFacing(state);
if (fromPos.equals(pos.offset(blockFacing))) {
if (!isValidPosition(state, worldIn, pos)) {
worldIn.destroyBlock(pos, true);
return;
}
}
}
@Override
@ -64,30 +86,30 @@ public class LinkedExtractorBlock extends ExtractorBlock implements IBlockWithFr
|| handleActivatedFrequencySlots(state, worldIn, pos, player, handIn, hit);
}
private void cacheItemPositions() {
if (!itemPositions.isEmpty())
return;
private void cacheLinkItemLocations() {
linkItemLocations.clear();
Vec3d first = Vec3d.ZERO;
Vec3d second = Vec3d.ZERO;
Vec3d shift = VecHelper.getCenterOf(BlockPos.ZERO);
float zFightOffset = 1 / 128f;
Vec3d first = new Vec3d(11.5f / 16f + zFightOffset, 4f / 16f, 14f / 16f);
Vec3d second = new Vec3d(11.5f / 16f + zFightOffset, 8f / 16f, 14f / 16f);
Vec3d firstUpward = new Vec3d(10f / 16f + zFightOffset, 14f / 16f, 11.5f / 16f);
Vec3d secondUpward = new Vec3d(6f / 16f + zFightOffset, 14f / 16f, 11.5f / 16f);
Vec3d firstDownward = new Vec3d(10f / 16f + zFightOffset, 2f / 16f, 11.5f / 16f);
Vec3d secondDownward = new Vec3d(6f / 16f + zFightOffset, 2f / 16f, 11.5f / 16f);
cacheForAllSides(first, second);
cacheForAllSides(firstUpward, secondUpward);
cacheForAllSides(firstDownward, secondDownward);
}
private void cacheForAllSides(Vec3d first, Vec3d second) {
for (int i = 0; i < 4; i++) {
Direction facing = Direction.byHorizontalIndex(i);
first = new Vec3d(11.5f / 16f + zFightOffset, 4f / 16f, 14f / 16f);
second = new Vec3d(11.5f / 16f + zFightOffset, 8f / 16f, 14f / 16f);
float angle = facing.getHorizontalAngle();
if (facing.getAxis() == Axis.X)
angle = -angle;
first = VecHelper.rotate(first.subtract(shift), angle, Axis.Y).add(shift);
second = VecHelper.rotate(second.subtract(shift), angle, Axis.Y).add(shift);
itemPositions.add(Pair.of(first, second));
float angle = AngleHelper.horizontalAngle(facing);
linkItemLocations.add(Pair.of(VecHelper.rotateCentered(first, angle, Axis.Y),
VecHelper.rotateCentered(second, angle, Axis.Y)));
}
}
@Override
@ -98,12 +120,16 @@ public class LinkedExtractorBlock extends ExtractorBlock implements IBlockWithFr
@Override
public Pair<Vec3d, Vec3d> getFrequencyItemPositions(BlockState state) {
Direction facing = state.get(HORIZONTAL_FACING);
return itemPositions.get(facing.getHorizontalIndex());
Direction extractorFacing = getBlockFacing(state);
int groupOffset = extractorFacing == Direction.UP ? 4 : extractorFacing == Direction.DOWN ? 8 : 0;
return linkItemLocations.get(groupOffset + facing.getHorizontalIndex());
}
@Override
public Direction getFrequencyItemFacing(BlockState state) {
return state.get(HORIZONTAL_FACING).rotateYCCW();
if (getBlockFacing(state).getAxis().isHorizontal())
return state.get(HORIZONTAL_FACING).rotateYCCW();
return state.get(HORIZONTAL_FACING);
}
}

View file

@ -9,9 +9,10 @@ import com.simibubi.create.modules.logistics.block.IExtractor;
import com.simibubi.create.modules.logistics.block.IHaveFilter;
import com.simibubi.create.modules.logistics.block.LinkedTileEntity;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@ -35,13 +36,13 @@ public class LinkedExtractorTileEntity extends LinkedTileEntity
inventory = LazyOptional.empty();
filter = ItemStack.EMPTY;
}
@Override
public void onLoad() {
super.onLoad();
initialize = true;
}
@Override
public World getWirelessWorld() {
return super.getWorld();
@ -51,7 +52,7 @@ public class LinkedExtractorTileEntity extends LinkedTileEntity
public void setSignal(boolean powered) {
receivedSignal = powered;
}
@Override
public void read(CompoundNBT compound) {
filter = ItemStack.read(compound.getCompound("Filter"));
@ -59,14 +60,14 @@ public class LinkedExtractorTileEntity extends LinkedTileEntity
setState(State.LOCKED);
super.read(compound);
}
@Override
public CompoundNBT write(CompoundNBT compound) {
compound.put("Filter", filter.serializeNBT());
compound.putBoolean("Locked", getState() == State.LOCKED);
return super.write(compound);
}
@Override
public void tick() {
if (initialize && hasWorld()) {
@ -75,9 +76,9 @@ public class LinkedExtractorTileEntity extends LinkedTileEntity
neighborChanged();
initialize = false;
}
IExtractor.super.tick();
if (world.isRemote)
return;
if (receivedSignal != getBlockState().get(POWERED)) {
@ -108,7 +109,11 @@ public class LinkedExtractorTileEntity extends LinkedTileEntity
@Override
public BlockPos getInventoryPos() {
return getPos().offset(getBlockState().get(BlockStateProperties.HORIZONTAL_FACING));
BlockState blockState = getBlockState();
Block block = blockState.getBlock();
if (!(block instanceof ExtractorBlock))
return null;
return getPos().offset(((ExtractorBlock) block).getBlockFacing(blockState));
}
@Override

View file

@ -0,0 +1,44 @@
package com.simibubi.create.modules.logistics.block.belts;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.Vec3d;
public class VerticalExtractorBlock extends ExtractorBlock implements IHaveNoBlockItem {
public static BooleanProperty UPWARD = BooleanProperty.create("upward");
public VerticalExtractorBlock() {
super();
setDefaultState(getDefaultState().with(UPWARD, true));
}
@Override
protected void fillStateContainer(Builder<Block, BlockState> builder) {
super.fillStateContainer(builder.add(UPWARD));
}
@Override
public Direction getBlockFacing(BlockState state) {
return state.get(UPWARD) ? Direction.UP : Direction.DOWN;
}
@Override
public ResourceLocation getLootTable() {
return AllBlocks.EXTRACTOR.get().getLootTable();
}
@Override
public Vec3d getFilterPosition(BlockState state) {
Direction facing = state.get(HORIZONTAL_FACING).getOpposite();
return filterLocations.get((state.get(UPWARD) ? 4 : 8) + facing.getHorizontalIndex());
}
}

View file

@ -0,0 +1,44 @@
package com.simibubi.create.modules.logistics.block.belts;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.Vec3d;
public class VerticalLinkedExtractorBlock extends LinkedExtractorBlock implements IHaveNoBlockItem {
public static BooleanProperty UPWARD = BooleanProperty.create("upward");
public VerticalLinkedExtractorBlock() {
super();
setDefaultState(getDefaultState().with(UPWARD, true));
}
@Override
protected void fillStateContainer(Builder<Block, BlockState> builder) {
super.fillStateContainer(builder.add(UPWARD));
}
@Override
public Direction getBlockFacing(BlockState state) {
return state.get(UPWARD) ? Direction.UP : Direction.DOWN;
}
@Override
public ResourceLocation getLootTable() {
return AllBlocks.LINKED_EXTRACTOR.get().getLootTable();
}
@Override
public Vec3d getFilterPosition(BlockState state) {
Direction facing = state.get(HORIZONTAL_FACING).getOpposite();
return filterLocations.get((state.get(UPWARD) ? 4 : 8) + facing.getHorizontalIndex());
}
}

View file

@ -1,6 +1,6 @@
package com.simibubi.create.modules.logistics.block.diodes;
import com.simibubi.create.foundation.block.IBlockWithScrollableValue;
import com.simibubi.create.foundation.block.IHaveScrollableValue;
import com.simibubi.create.foundation.block.IWithTileEntity;
import com.simibubi.create.foundation.utility.Lang;
@ -18,7 +18,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
public class FlexpeaterBlock extends RedstoneDiodeBlock
implements IWithTileEntity<FlexpeaterTileEntity>, IBlockWithScrollableValue {
implements IWithTileEntity<FlexpeaterTileEntity>, IHaveScrollableValue {
public static BooleanProperty POWERING = BooleanProperty.create("powering");
private static Vec3d VALUE_POS = new Vec3d(2 / 16f, 5 / 16f, 5 / 16f);

View file

@ -20,7 +20,7 @@ import com.simibubi.create.AllItems;
import com.simibubi.create.Create;
import com.simibubi.create.foundation.block.IWithContainer;
import com.simibubi.create.foundation.block.IWithTileEntity;
import com.simibubi.create.foundation.block.IWithoutBlockItem;
import com.simibubi.create.foundation.block.IHaveNoBlockItem;
import com.simibubi.create.foundation.block.RenderUtilityBlock;
import com.simibubi.create.foundation.utility.AllShapes;
import com.simibubi.create.modules.logistics.management.base.LogisticalCasingBlock.Part;
@ -59,7 +59,7 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.network.NetworkHooks;
public class LogisticalControllerBlock extends DirectionalBlock
implements IWithoutBlockItem, IWithTileEntity<LogisticalActorTileEntity> {
implements IHaveNoBlockItem, IWithTileEntity<LogisticalActorTileEntity> {
public static final IProperty<Type> TYPE = EnumProperty.create("type", Type.class);

View file

@ -1,7 +1,7 @@
package com.simibubi.create.modules.logistics.management.index;
import com.simibubi.create.AllItems;
import com.simibubi.create.foundation.block.IBlockWithColorHandler;
import com.simibubi.create.foundation.block.IHaveColorHandler;
import com.simibubi.create.foundation.block.IWithTileEntity;
import com.simibubi.create.foundation.utility.AllShapes;
@ -32,7 +32,7 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.network.NetworkHooks;
public class LogisticalIndexBlock extends HorizontalBlock
implements IBlockWithColorHandler, IWithTileEntity<LogisticalIndexTileEntity> {
implements IHaveColorHandler, IWithTileEntity<LogisticalIndexTileEntity> {
public LogisticalIndexBlock() {
super(Properties.from(Blocks.GRANITE));

View file

@ -1,6 +1,6 @@
package com.simibubi.create.modules.palettes;
import com.simibubi.create.foundation.block.IBlockWithColoredVertices;
import com.simibubi.create.foundation.block.IHaveColoredVertices;
import com.simibubi.create.foundation.utility.ColorHelper;
import net.minecraft.block.Block;
@ -10,7 +10,7 @@ import net.minecraft.block.material.MaterialColor;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
public class VolcanicRockBlock extends Block implements IBlockWithColoredVertices {
public class VolcanicRockBlock extends Block implements IHaveColoredVertices {
public VolcanicRockBlock() {
super(Properties.from(Blocks.ANDESITE));

View file

@ -1,12 +1,9 @@
{
"forge_marker": 1,
"defaults": {
"model": "create:block/extractor"
},
"variants": {
"powered": {
"true": { "model": "create:block/extractor_powered" },
"false": { "model": "create:block/extractor" }
"true": { "model": "create:block/extractor/horizontal_powered" },
"false": { "model": "create:block/extractor/horizontal" }
},
"facing": {
"south": { "y": 180 },

View file

@ -1,12 +1,9 @@
{
"forge_marker": 1,
"defaults": {
"model": "create:block/extractor_wireless"
},
"variants": {
"powered": {
"true": { "model": "create:block/extractor_wireless_powered" },
"false": { "model": "create:block/extractor_wireless" }
"true": { "model": "create:block/extractor/horizontal_wireless_powered" },
"false": { "model": "create:block/extractor/horizontal_wireless" }
},
"facing": {
"south": { "y": 180 },

View file

@ -0,0 +1,27 @@
{
"forge_marker": 1,
"defaults": {
"model": "create:block/extractor/vertical"
},
"variants": {
"powered=true,upward=false,facing=south": { "model": "create:block/extractor/vertical_powered", "y": 180 },
"powered=true,upward=false,facing=east": { "model": "create:block/extractor/vertical_powered", "y": 90 },
"powered=true,upward=false,facing=north": { "model": "create:block/extractor/vertical_powered", "y": 0 },
"powered=true,upward=false,facing=west": { "model": "create:block/extractor/vertical_powered", "y": 270 },
"powered=true,upward=true,facing=south": { "model": "create:block/extractor/vertical_powered", "y": 0, "x": 180 },
"powered=true,upward=true,facing=east": { "model": "create:block/extractor/vertical_powered", "y": 270, "x": 180 },
"powered=true,upward=true,facing=north": { "model": "create:block/extractor/vertical_powered", "y": 180, "x": 180 },
"powered=true,upward=true,facing=west": { "model": "create:block/extractor/vertical_powered", "y": 90, "x": 180 },
"powered=false,upward=false,facing=south": { "y": 180 },
"powered=false,upward=false,facing=east": { "y": 90 },
"powered=false,upward=false,facing=north": { "y": 0 },
"powered=false,upward=false,facing=west": { "y": 270 },
"powered=false,upward=true,facing=south": { "y": 0, "x": 180 },
"powered=false,upward=true,facing=east": { "y": 270, "x": 180 },
"powered=false,upward=true,facing=north": { "y": 180, "x": 180 },
"powered=false,upward=true,facing=west": { "y": 90, "x": 180 }
}
}

View file

@ -0,0 +1,27 @@
{
"forge_marker": 1,
"defaults": {
"model": "create:block/extractor/vertical_wireless"
},
"variants": {
"powered=true,upward=false,facing=south": { "model": "create:block/extractor/vertical_wireless_powered", "y": 180 },
"powered=true,upward=false,facing=east": { "model": "create:block/extractor/vertical_wireless_powered", "y": 90 },
"powered=true,upward=false,facing=north": { "model": "create:block/extractor/vertical_wireless_powered", "y": 0 },
"powered=true,upward=false,facing=west": { "model": "create:block/extractor/vertical_wireless_powered", "y": 270 },
"powered=true,upward=true,facing=south": { "model": "create:block/extractor/vertical_wireless_powered", "y": 0, "x": 180 },
"powered=true,upward=true,facing=east": { "model": "create:block/extractor/vertical_wireless_powered", "y": 270, "x": 180 },
"powered=true,upward=true,facing=north": { "model": "create:block/extractor/vertical_wireless_powered", "y": 180, "x": 180 },
"powered=true,upward=true,facing=west": { "model": "create:block/extractor/vertical_wireless_powered", "y": 90, "x": 180 },
"powered=false,upward=false,facing=south": { "y": 180 },
"powered=false,upward=false,facing=east": { "y": 90 },
"powered=false,upward=false,facing=north": { "y": 0 },
"powered=false,upward=false,facing=west": { "y": 270 },
"powered=false,upward=true,facing=south": { "y": 0, "x": 180 },
"powered=false,upward=true,facing=east": { "y": 270, "x": 180 },
"powered=false,upward=true,facing=north": { "y": 180, "x": 180 },
"powered=false,upward=true,facing=west": { "y": 90, "x": 180 }
}
}

View file

@ -3,8 +3,8 @@
"parent": "block/block",
"textures": {
"1": "create:block/brass_casing",
"extractor": "create:block/extractor",
"particle": "create:block/extractor"
"particle": "create:block/extractor",
"extractor": "create:block/extractor"
},
"elements": [
{
@ -66,15 +66,16 @@
},
{
"name": "FilterSpot",
"from": [5, 10, -0.6],
"to": [11, 12, 4],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 11, -1]},
"from": [5, 10, -1],
"to": [11, 11, 4],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 11, -1]},
"faces": {
"north": {"uv": [13, 1, 15, 7], "rotation": 90, "texture": "#extractor"},
"east": {"uv": [0.1, 0, 4.7, 2], "rotation": 180, "texture": "#extractor"},
"south": {"uv": [4, 1, 5, 7], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0.1, 0, 4.7, 2], "texture": "#extractor"},
"up": {"uv": [0, 9, 5, 15], "rotation": 90, "texture": "#extractor"}
"north": {"uv": [0, 9, 1, 15], "rotation": 90, "texture": "#extractor"},
"east": {"uv": [0, 9, 5, 10], "rotation": 180, "texture": "#extractor"},
"south": {"uv": [4, 9, 5, 15], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0, 9, 5, 10], "texture": "#extractor"},
"up": {"uv": [0, 9, 5, 15], "rotation": 90, "texture": "#extractor"},
"down": {"uv": [0, 0, 0, 0], "texture": "#extractor"}
}
}
],

View file

@ -0,0 +1,7 @@
{
"parent": "create:block/extractor/horizontal",
"textures": {
"extractor": "create:block/extractor_powered",
"particle": "create:block/extractor_powered"
}
}

View file

@ -1,48 +1,50 @@
{
"credit": "Made with Blockbench",
"parent": "create:block/extractor",
"parent": "create:block/extractor/horizontal",
"textures": {
"2": "create:block/brass_casing",
"redstone_antenna": "create:block/redstone_antenna",
"extractor": "create:block/extractor",
"particle": "create:block/extractor"
"particle": "create:block/extractor",
"extractor": "create:block/extractor"
},
"elements": [
{
"name": "Bottom",
"from": [4, 2, -1],
"from": [5, 2, -1],
"to": [12, 3, 5],
"faces": {
"north": {"uv": [6, 7, 14, 8], "texture": "#extractor"},
"north": {"uv": [6, 7, 13, 8], "texture": "#extractor"},
"east": {"uv": [0, 0, 6, 1], "rotation": 180, "texture": "#extractor"},
"south": {"uv": [6, 7, 14, 8], "texture": "#extractor"},
"west": {"uv": [0, 0, 6, 1], "texture": "#extractor"},
"up": {"uv": [0, 0, 6, 8], "rotation": 90, "texture": "#extractor"},
"down": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"}
"south": {"uv": [6, 7, 13, 8], "texture": "#extractor"},
"west": {"uv": [6, 15, 12, 16], "texture": "#extractor"},
"up": {"uv": [0, 0, 6, 7], "rotation": 90, "texture": "#extractor"},
"down": {"uv": [0, 0, 6, 7], "rotation": 270, "texture": "#extractor"}
}
},
{
"name": "Top",
"from": [4, 9, -1],
"from": [5, 9, -1],
"to": [12, 10, 5],
"faces": {
"north": {"uv": [6, 0, 14, 1], "texture": "#extractor"},
"north": {"uv": [6, 0, 13, 1], "texture": "#extractor"},
"east": {"uv": [0, 0, 6, 1], "rotation": 180, "texture": "#extractor"},
"south": {"uv": [6, 0, 14, 1], "texture": "#extractor"},
"west": {"uv": [0, 0, 6, 1], "texture": "#extractor"},
"up": {"uv": [0, 0, 6, 8], "rotation": 90, "texture": "#extractor"},
"down": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"}
"south": {"uv": [6, 0, 13, 1], "texture": "#extractor"},
"west": {"uv": [6, 8, 12, 9], "texture": "#extractor"},
"up": {"uv": [0, 0, 6, 7], "rotation": 90, "texture": "#extractor"},
"down": {"uv": [0, 0, 6, 7], "rotation": 270, "texture": "#extractor"}
}
},
{
"name": "Side",
"from": [4, 3, -1],
"to": [5, 9, 5],
"from": [4, 2, -1],
"to": [5, 10, 5],
"faces": {
"north": {"uv": [13, 1, 14, 7], "texture": "#extractor"},
"east": {"uv": [0, 1, 6, 7], "rotation": 180, "texture": "#extractor"},
"south": {"uv": [6, 1, 7, 7], "texture": "#extractor"},
"west": {"uv": [0, 1, 6, 7], "texture": "#extractor"}
"north": {"uv": [13, 0, 14, 8], "texture": "#extractor"},
"east": {"uv": [0, 1, 6, 9], "rotation": 180, "texture": "#extractor"},
"south": {"uv": [6, 1, 7, 9], "texture": "#extractor"},
"west": {"uv": [6, 8, 12, 16], "texture": "#extractor"},
"up": {"uv": [6, 8, 12, 9], "rotation": 90, "texture": "#extractor"},
"down": {"uv": [6, 15, 12, 16], "rotation": 90, "texture": "#extractor"}
}
},
{
@ -67,14 +69,14 @@
},
{
"name": "FilterSpot",
"from": [5, 10, -0.6],
"to": [11, 12, 4],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 11, -1]},
"from": [5, 10, -1],
"to": [11, 11, 4],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 11, -1]},
"faces": {
"north": {"uv": [13, 1, 15, 7], "rotation": 90, "texture": "#extractor"},
"east": {"uv": [0.1, 0, 4.7, 2], "rotation": 180, "texture": "#extractor"},
"south": {"uv": [4, 1, 5, 7], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0.1, 0, 4.7, 2], "texture": "#extractor"},
"north": {"uv": [0, 9, 1, 15], "rotation": 90, "texture": "#extractor"},
"east": {"uv": [0, 14, 5, 15], "rotation": 180, "texture": "#extractor"},
"south": {"uv": [4, 9, 5, 15], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0, 9, 5, 10], "texture": "#extractor"},
"up": {"uv": [0, 9, 5, 15], "rotation": 90, "texture": "#extractor"}
}
},

View file

@ -0,0 +1,8 @@
{
"parent": "create:block/extractor/horizontal_wireless",
"textures": {
"redstone_antenna": "create:block/redstone_antenna_powered",
"extractor": "create:block/extractor_powered",
"particle": "create:block/extractor_powered"
}
}

View file

@ -0,0 +1,121 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"1": "create:block/brass_casing",
"particle": "create:block/extractor",
"extractor": "create:block/extractor"
},
"elements": [
{
"name": "Bottom",
"from": [4, -1, 4],
"to": [12, 5, 5],
"faces": {
"north": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"},
"east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"},
"south": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"},
"up": {"uv": [6, 7, 14, 8], "rotation": 180, "texture": "#extractor"},
"down": {"uv": [6, 7, 14, 8], "texture": "#extractor"}
}
},
{
"name": "Top",
"from": [4, -1, 11],
"to": [12, 5, 12],
"faces": {
"north": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"},
"east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"},
"south": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"},
"up": {"uv": [6, 0, 14, 1], "rotation": 180, "texture": "#extractor"},
"down": {"uv": [6, 0, 14, 1], "texture": "#extractor"}
}
},
{
"name": "Side",
"from": [11, -1, 5],
"to": [12, 5, 11],
"faces": {
"east": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"},
"up": {"uv": [6, 1, 7, 7], "rotation": 180, "texture": "#extractor"},
"down": {"uv": [13, 1, 14, 7], "texture": "#extractor"}
}
},
{
"name": "Side",
"from": [4, -1, 5],
"to": [5, 5, 11],
"faces": {
"east": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"},
"up": {"uv": [13, 1, 14, 7], "rotation": 180, "texture": "#extractor"},
"down": {"uv": [6, 1, 7, 7], "texture": "#extractor"}
}
},
{
"name": "Center",
"from": [5, 0, 5],
"to": [11, 4, 11],
"faces": {
"up": {"uv": [7, 1, 13, 7], "rotation": 180, "texture": "#extractor"},
"down": {"uv": [5, 5, 11, 11], "texture": "#1"}
}
},
{
"name": "FilterSpot",
"from": [5, -1, 12],
"to": [11, 4, 13],
"faces": {
"east": {"uv": [0, 14, 5, 15], "rotation": 270, "texture": "#extractor"},
"south": {"uv": [0, 9, 5, 15], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0, 9, 5, 10], "rotation": 270, "texture": "#extractor"},
"up": {"uv": [4, 9, 5, 15], "rotation": 270, "texture": "#extractor"},
"down": {"uv": [0, 9, 1, 15], "rotation": 90, "texture": "#extractor"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 1, 1.25],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 45, 0],
"translation": [2.5, -0.5, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [0, 180, 0],
"translation": [0, 1.75, -4.5],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "vertical",
"origin": [8, 8, 8],
"children": [0, 1, 2, 3, 4, 5]
}
]
}

View file

@ -1,5 +1,5 @@
{
"parent": "create:block/extractor",
"parent": "create:block/extractor/vertical",
"textures": {
"extractor": "create:block/extractor_powered",
"particle": "create:block/extractor_powered"

View file

@ -0,0 +1,162 @@
{
"credit": "Made with Blockbench",
"parent": "create:block/extractor/horizontal",
"textures": {
"1": "create:block/brass_casing",
"particle": "create:block/extractor",
"extractor": "create:block/extractor",
"redstone_antenna": "create:block/redstone_antenna"
},
"elements": [
{
"name": "Bottom",
"from": [4, -1, 4],
"to": [12, 5, 5],
"faces": {
"north": {"uv": [6, 8, 12, 16], "rotation": 270, "texture": "#extractor"},
"east": {"uv": [6, 15, 12, 16], "rotation": 270, "texture": "#extractor"},
"south": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [6, 8, 12, 9], "rotation": 270, "texture": "#extractor"},
"up": {"uv": [6, 7, 14, 8], "rotation": 180, "texture": "#extractor"},
"down": {"uv": [6, 7, 14, 8], "texture": "#extractor"}
}
},
{
"name": "Top",
"from": [4, -1, 11],
"to": [12, 5, 12],
"faces": {
"north": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"},
"east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"},
"south": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"},
"up": {"uv": [6, 0, 14, 1], "rotation": 180, "texture": "#extractor"},
"down": {"uv": [6, 0, 14, 1], "texture": "#extractor"}
}
},
{
"name": "Side",
"from": [11, -1, 5],
"to": [12, 5, 11],
"faces": {
"east": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"},
"up": {"uv": [6, 1, 7, 7], "rotation": 180, "texture": "#extractor"},
"down": {"uv": [13, 1, 14, 7], "texture": "#extractor"}
}
},
{
"name": "Side",
"from": [4, -1, 5],
"to": [5, 5, 11],
"faces": {
"east": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"},
"up": {"uv": [13, 1, 14, 7], "rotation": 180, "texture": "#extractor"},
"down": {"uv": [6, 1, 7, 7], "texture": "#extractor"}
}
},
{
"name": "Center",
"from": [5, 0, 5],
"to": [11, 4, 11],
"faces": {
"up": {"uv": [7, 1, 13, 7], "rotation": 180, "texture": "#extractor"},
"down": {"uv": [5, 5, 11, 11], "texture": "#1"}
}
},
{
"name": "FilterSpot",
"from": [5, -1, 12],
"to": [11, 4, 13],
"faces": {
"east": {"uv": [0, 14, 5, 15], "rotation": 270, "texture": "#extractor"},
"south": {"uv": [0, 9, 5, 15], "rotation": 270, "texture": "#extractor"},
"west": {"uv": [0, 9, 5, 10], "rotation": 270, "texture": "#extractor"},
"up": {"uv": [4, 9, 5, 15], "rotation": 270, "texture": "#extractor"},
"down": {"uv": [0, 9, 1, 15], "rotation": 90, "texture": "#extractor"}
}
},
{
"name": "AntennaX",
"from": [11, 3, 9],
"to": [14, 13, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 15]},
"faces": {
"north": {"uv": [0, 0, 3, 10], "texture": "#redstone_antenna"},
"south": {"uv": [0, 0, 3, 10], "texture": "#redstone_antenna"},
"down": {"uv": [0, 9, 3, 10], "texture": "#redstone_antenna"}
}
},
{
"name": "AntennaZ",
"from": [12, 3, 8],
"to": [13, 13, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 15]},
"faces": {
"east": {"uv": [0, 0, 3, 10], "texture": "#redstone_antenna"},
"west": {"uv": [0, 0, 3, 10], "texture": "#redstone_antenna"}
}
},
{
"name": "AntennaTop",
"from": [12, 11, 9],
"to": [13, 12, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 15]},
"faces": {
"up": {"uv": [1, 1, 2, 2], "texture": "#redstone_antenna"}
}
},
{
"name": "AntennaDish",
"from": [10, 9, 7],
"to": [15, 9, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 15]},
"faces": {
"up": {"uv": [4, 0, 9, 5], "texture": "#redstone_antenna"},
"down": {"uv": [4, 0, 9, 5], "texture": "#redstone_antenna"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 1, 1.25],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 45, 0],
"translation": [2.5, -0.5, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [0, 180, 0],
"translation": [0, 1.75, -4.5],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "vertical",
"origin": [8, 8, 8],
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
}
]
}

View file

@ -1,5 +1,5 @@
{
"parent": "create:block/extractor_wireless",
"parent": "create:block/extractor/vertical_wireless",
"textures": {
"redstone_antenna": "create:block/redstone_antenna_powered",
"extractor": "create:block/extractor_powered",

View file

@ -2,6 +2,7 @@
"parent": "create:block/translation_chassis",
"textures": {
"bottom": "create:block/translation_chassis_top_sticky",
"top": "create:block/translation_chassis_top_sticky"
"top": "create:block/translation_chassis_top_sticky",
"side": "create:block/translation_chassis_side"
}
}

View file

@ -1,6 +1,8 @@
{
"parent": "create:block/translation_chassis",
"textures": {
"bottom": "create:block/translation_chassis_top_sticky"
"bottom": "create:block/translation_chassis_top_sticky",
"top": "create:block/translation_chassis_top",
"side": "create:block/translation_chassis_side"
}
}

View file

@ -1,6 +1,8 @@
{
"parent": "create:block/translation_chassis",
"textures": {
"top": "create:block/translation_chassis_top_sticky"
"top": "create:block/translation_chassis_top_sticky",
"bottom": "create:block/translation_chassis_top",
"side": "create:block/translation_chassis_side"
}
}

View file

@ -1,3 +1,3 @@
{
"parent": "create:block/extractor"
"parent": "create:block/extractor/horizontal"
}

View file

@ -1,3 +1,3 @@
{
"parent": "create:block/extractor_wireless"
"parent": "create:block/extractor/horizontal_wireless"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 B

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 491 B

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 772 B

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 B

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 365 B