Filtered Basin Processing
- Basins can now be assigned a filter to narrow down the range of recipes that can be applied to its ingredients - Some random asset updates
|
@ -361,16 +361,16 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
|
|||
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
||||
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
||||
1fe3d6fb515b8951750daf6ff274006e14c96b32 assets/create/lang/en_ud.json
|
||||
ba81a0874d90e126eb6b5e6edf22d69176888ae3 assets/create/lang/en_us.json
|
||||
69ebd4797f76f54483912b0c57fd061b73c732b2 assets/create/lang/unfinished/de_de.json
|
||||
fb1b725ce25e90e95615e6829f3a570c35e84f2d assets/create/lang/unfinished/fr_fr.json
|
||||
3cf685c54663480dc3208b3d9ba8cc1638ebbe62 assets/create/lang/unfinished/it_it.json
|
||||
8c844b9777baad14984784ff957cff2e241f4d07 assets/create/lang/unfinished/ja_jp.json
|
||||
f351bafc438dcde67979a51753da16f75a9e1a34 assets/create/lang/unfinished/ko_kr.json
|
||||
3c143d2b067e5443b1724d1ddb478f3abbf1f9a1 assets/create/lang/unfinished/nl_nl.json
|
||||
e8dff25d88cdbabe91ae784d05e0a5c87fd9b948 assets/create/lang/unfinished/pt_br.json
|
||||
411119247ce1bcc941bd3f49fb3a18eac687d65d assets/create/lang/unfinished/ru_ru.json
|
||||
a94df56a2bc8f04661f0b3616963b84046ea4cbb assets/create/lang/unfinished/zh_cn.json
|
||||
e4c4fa83b8549dec363bbda95fa9fda7b285de5c assets/create/lang/en_us.json
|
||||
e1a6b606458028f5c3b4afdc0a9e0cbd22d9e779 assets/create/lang/unfinished/de_de.json
|
||||
46c139da98fdee00d70a5fd893fc3eb4f03b8a0d assets/create/lang/unfinished/fr_fr.json
|
||||
ac0103512dff6e125cfa0df5c9a55cceef33a1f9 assets/create/lang/unfinished/it_it.json
|
||||
b22f04831c88799fcb69857ba16dbfa9df74aded assets/create/lang/unfinished/ja_jp.json
|
||||
8f72c330dbb5eb2b4631ffdb169e2b4a5bd98695 assets/create/lang/unfinished/ko_kr.json
|
||||
f7a3b075daf79ae600435c779a91c91a182771cd assets/create/lang/unfinished/nl_nl.json
|
||||
e65a45f531b6ae7a0818503c335366abb7a9ce20 assets/create/lang/unfinished/pt_br.json
|
||||
4251b8d5c5c45a162148776ccada3d7abeeb5bf1 assets/create/lang/unfinished/ru_ru.json
|
||||
c8c10a94bca76ee411246e29dbebba530a7f995c assets/create/lang/unfinished/zh_cn.json
|
||||
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json
|
||||
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json
|
||||
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json
|
||||
|
|
|
@ -652,6 +652,7 @@
|
|||
"create.contraptions.cart_movement_mode.rotation_locked": "Lock rotation",
|
||||
|
||||
"create.logistics.filter": "Filter",
|
||||
"create.logistics.recipe_filter": "Recipe Filter",
|
||||
"create.logistics.firstFrequency": "Freq. #1",
|
||||
"create.logistics.secondFrequency": "Freq. #2",
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 820",
|
||||
"_": "Missing Localizations: 821",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -653,6 +653,7 @@
|
|||
"create.contraptions.cart_movement_mode.rotation_locked": "UNLOCALIZED: Lock rotation",
|
||||
|
||||
"create.logistics.filter": "Filter",
|
||||
"create.logistics.recipe_filter": "UNLOCALIZED: Recipe Filter",
|
||||
"create.logistics.firstFrequency": "Freq. #1",
|
||||
"create.logistics.secondFrequency": "Freq. #2",
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 424",
|
||||
"_": "Missing Localizations: 425",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -653,6 +653,7 @@
|
|||
"create.contraptions.cart_movement_mode.rotation_locked": "UNLOCALIZED: Lock rotation",
|
||||
|
||||
"create.logistics.filter": "Filtre",
|
||||
"create.logistics.recipe_filter": "UNLOCALIZED: Recipe Filter",
|
||||
"create.logistics.firstFrequency": "Freq. #1",
|
||||
"create.logistics.secondFrequency": "Freq. #2",
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 408",
|
||||
"_": "Missing Localizations: 409",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -653,6 +653,7 @@
|
|||
"create.contraptions.cart_movement_mode.rotation_locked": "UNLOCALIZED: Lock rotation",
|
||||
|
||||
"create.logistics.filter": "Filtro",
|
||||
"create.logistics.recipe_filter": "UNLOCALIZED: Recipe Filter",
|
||||
"create.logistics.firstFrequency": "Freq. #1",
|
||||
"create.logistics.secondFrequency": "Freq. #2",
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 403",
|
||||
"_": "Missing Localizations: 404",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -653,6 +653,7 @@
|
|||
"create.contraptions.cart_movement_mode.rotation_locked": "UNLOCALIZED: Lock rotation",
|
||||
|
||||
"create.logistics.filter": "フィルタ",
|
||||
"create.logistics.recipe_filter": "UNLOCALIZED: Recipe Filter",
|
||||
"create.logistics.firstFrequency": "Freq. #1",
|
||||
"create.logistics.secondFrequency": "Freq. #2",
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 408",
|
||||
"_": "Missing Localizations: 409",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -653,6 +653,7 @@
|
|||
"create.contraptions.cart_movement_mode.rotation_locked": "UNLOCALIZED: Lock rotation",
|
||||
|
||||
"create.logistics.filter": "필터",
|
||||
"create.logistics.recipe_filter": "UNLOCALIZED: Recipe Filter",
|
||||
"create.logistics.firstFrequency": "주파수. #1",
|
||||
"create.logistics.secondFrequency": "주파수. #2",
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 758",
|
||||
"_": "Missing Localizations: 759",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -653,6 +653,7 @@
|
|||
"create.contraptions.cart_movement_mode.rotation_locked": "UNLOCALIZED: Lock rotation",
|
||||
|
||||
"create.logistics.filter": "Filter",
|
||||
"create.logistics.recipe_filter": "UNLOCALIZED: Recipe Filter",
|
||||
"create.logistics.firstFrequency": "Freq. #1",
|
||||
"create.logistics.secondFrequency": "Freq. #2",
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 827",
|
||||
"_": "Missing Localizations: 828",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -653,6 +653,7 @@
|
|||
"create.contraptions.cart_movement_mode.rotation_locked": "UNLOCALIZED: Lock rotation",
|
||||
|
||||
"create.logistics.filter": "Filtros",
|
||||
"create.logistics.recipe_filter": "UNLOCALIZED: Recipe Filter",
|
||||
"create.logistics.firstFrequency": "UNLOCALIZED: Freq. #1",
|
||||
"create.logistics.secondFrequency": "UNLOCALIZED: Freq. #2",
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 821",
|
||||
"_": "Missing Localizations: 822",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -653,6 +653,7 @@
|
|||
"create.contraptions.cart_movement_mode.rotation_locked": "UNLOCALIZED: Lock rotation",
|
||||
|
||||
"create.logistics.filter": "Фильтр",
|
||||
"create.logistics.recipe_filter": "UNLOCALIZED: Recipe Filter",
|
||||
"create.logistics.firstFrequency": "Част. #1",
|
||||
"create.logistics.secondFrequency": "Част. #2",
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 84",
|
||||
"_": "Missing Localizations: 85",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -653,6 +653,7 @@
|
|||
"create.contraptions.cart_movement_mode.rotation_locked": "结构方向保持不变",
|
||||
|
||||
"create.logistics.filter": "过滤器",
|
||||
"create.logistics.recipe_filter": "UNLOCALIZED: Recipe Filter",
|
||||
"create.logistics.firstFrequency": "频道. #1",
|
||||
"create.logistics.secondFrequency": "频道. #2",
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ public class AllShapes {
|
|||
BASIN_BLOCK_SHAPE = shape(0, 2, 0, 16, 16, 16).erase(2, 2, 2, 14, 16, 14)
|
||||
.add(2, 0, 2, 14, 2, 14)
|
||||
.build(), BASIN_COLLISION_SHAPE =
|
||||
shape(0, 2, 0, 16, 16, 16).erase(2, 5, 2, 14, 16, 14)
|
||||
shape(0, 2, 0, 16, 13, 16).erase(2, 5, 2, 14, 16, 14)
|
||||
.add(2, 0, 2, 14, 2, 14)
|
||||
.build(),
|
||||
HEATER_BLOCK_SHAPE = shape(2, 0, 2, 14, 14, 14).add(0, 0, 0, 16, 4, 16)
|
||||
|
|
|
@ -173,13 +173,10 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
|||
|
||||
@Override
|
||||
protected <C extends IInventory> boolean matchBasinRecipe(IRecipe<C> recipe) {
|
||||
if (recipe == null)
|
||||
return false;
|
||||
NonNullList<Ingredient> ingredients = recipe.getIngredients();
|
||||
if (!ingredients.stream()
|
||||
.allMatch(ingredient -> (ingredient.isSimple() || ingredient.getMatchingStacks().length == 1)))
|
||||
if (!super.matchBasinRecipe(recipe))
|
||||
return false;
|
||||
|
||||
NonNullList<Ingredient> ingredients = recipe.getIngredients();
|
||||
List<ItemStack> remainingItems = new ArrayList<>();
|
||||
itemInputs.forEach(stack -> remainingItems.add(stack.copy()));
|
||||
List<FluidStack> remainingFluids = new ArrayList<>();
|
||||
|
|
|
@ -282,14 +282,10 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
|||
|
||||
@Override
|
||||
protected <C extends IInventory> boolean matchBasinRecipe(IRecipe<C> recipe) {
|
||||
if (recipe == null)
|
||||
if (!super.matchBasinRecipe(recipe))
|
||||
return false;
|
||||
|
||||
NonNullList<Ingredient> ingredients = recipe.getIngredients();
|
||||
if (!ingredients.stream()
|
||||
.allMatch(Ingredient::isSimple))
|
||||
return false;
|
||||
|
||||
List<ItemStack> remainingItems = new ArrayList<>();
|
||||
itemInputs.forEach(stack -> remainingItems.add(stack.copy()));
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity {
|
|||
@Override
|
||||
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
|
||||
super.addBehaviours(behaviours);
|
||||
filtering = new FilteringBehaviour(this, new SawFilterSlot());
|
||||
filtering = new FilteringBehaviour(this, new SawFilterSlot()).forRecipes();
|
||||
behaviours.add(filtering);
|
||||
behaviours.add(new DirectBeltInputBehaviour(this));
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ import com.simibubi.create.content.contraptions.wrench.IWrenchable;
|
|||
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||
import com.simibubi.create.foundation.block.ITE;
|
||||
import com.simibubi.create.foundation.item.ItemHelper;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
|
@ -101,15 +103,17 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
|
|||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getCollisionShape(BlockState p_220071_1_, IBlockReader p_220071_2_, BlockPos p_220071_3_,
|
||||
ISelectionContext p_220071_4_) {
|
||||
return AllShapes.BASIN_COLLISION_SHAPE;
|
||||
public VoxelShape getCollisionShape(BlockState state, IBlockReader reader, BlockPos pos, ISelectionContext ctx) {
|
||||
if (ctx.getEntity() instanceof ItemEntity)
|
||||
return AllShapes.BASIN_COLLISION_SHAPE;
|
||||
return getShape(state, reader, pos, ctx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
if (!state.hasTileEntity() || state.getBlock() == newState.getBlock())
|
||||
return;
|
||||
TileEntityBehaviour.destroy(worldIn, pos, FilteringBehaviour.TYPE);
|
||||
withTileEntityDo(worldIn, pos, te -> {
|
||||
ItemHelper.dropContents(worldIn, pos, te.inputItemInventory);
|
||||
ItemHelper.dropContents(worldIn, pos, te.outputItemInventory);
|
||||
|
|
|
@ -210,7 +210,24 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
|
|||
|
||||
protected abstract <C extends IInventory> boolean matchStaticFilters(IRecipe<C> recipe);
|
||||
|
||||
protected abstract <C extends IInventory> boolean matchBasinRecipe(IRecipe<C> recipe);
|
||||
protected <C extends IInventory> boolean matchBasinRecipe(IRecipe<C> recipe) {
|
||||
if (recipe == null)
|
||||
return false;
|
||||
|
||||
Optional<BasinTileEntity> basin = getBasin();
|
||||
if (!basin.isPresent())
|
||||
return false;
|
||||
BasinTileEntity basinTileEntity = basin.get();
|
||||
if (!basinTileEntity.getFilter()
|
||||
.test(recipe.getRecipeOutput()))
|
||||
return false;
|
||||
|
||||
NonNullList<Ingredient> ingredients = recipe.getIngredients();
|
||||
if (!ingredients.stream()
|
||||
.allMatch(ingredient -> (ingredient.isSimple() || ingredient.getMatchingStacks().length == 1)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected abstract Object getRecipeCacheKey();
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.processing;
|
|||
import java.util.Random;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -17,7 +17,7 @@ import net.minecraft.util.math.Vec3d;
|
|||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
import net.minecraftforge.items.ItemStackHandler;
|
||||
|
||||
public class BasinRenderer extends SafeTileEntityRenderer<BasinTileEntity> {
|
||||
public class BasinRenderer extends SmartTileEntityRenderer<BasinTileEntity> {
|
||||
|
||||
public BasinRenderer(TileEntityRendererDispatcher dispatcher) {
|
||||
super(dispatcher);
|
||||
|
@ -25,7 +25,9 @@ public class BasinRenderer extends SafeTileEntityRenderer<BasinTileEntity> {
|
|||
|
||||
@Override
|
||||
protected void renderSafe(BasinTileEntity basin, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||
int light, int overlay) {
|
||||
int light, int overlay) {
|
||||
super.renderSafe(basin, partialTicks, ms, buffer, light, overlay);
|
||||
|
||||
ms.push();
|
||||
BlockPos pos = basin.getPos();
|
||||
ms.translate(.5, .2f, .5);
|
||||
|
@ -44,7 +46,9 @@ public class BasinRenderer extends SafeTileEntityRenderer<BasinTileEntity> {
|
|||
ms.translate(vec.x, vec.y, vec.z);
|
||||
ms.multiply(new Vector3f((float) vec2.z, (float) vec2.y, 0).getDegreesQuaternion((float) vec2.x * 180));
|
||||
|
||||
Minecraft.getInstance().getItemRenderer().renderItem(stack, TransformType.GROUND, light, overlay, ms, buffer);
|
||||
Minecraft.getInstance()
|
||||
.getItemRenderer()
|
||||
.renderItem(stack, TransformType.GROUND, light, overlay, ms, buffer);
|
||||
ms.pop();
|
||||
}
|
||||
ms.translate(0, 1 / 64f, 0);
|
||||
|
|
|
@ -8,8 +8,12 @@ import javax.annotation.Nonnull;
|
|||
import com.simibubi.create.content.contraptions.fluids.CombinedFluidHandler;
|
||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
|
@ -17,6 +21,9 @@ import net.minecraft.tileentity.ITickableTileEntity;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
|
@ -30,6 +37,7 @@ import net.minecraftforge.items.wrapper.RecipeWrapper;
|
|||
public class BasinTileEntity extends SmartTileEntity implements ITickableTileEntity {
|
||||
|
||||
public boolean contentsChanged;
|
||||
private FilteringBehaviour filtering;
|
||||
|
||||
protected ItemStackHandler outputItemInventory = new ItemStackHandler(9) {
|
||||
protected void onContentsChanged(int slot) {
|
||||
|
@ -98,6 +106,12 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 256;
|
||||
}
|
||||
|
||||
protected LazyOptional<IItemHandlerModifiable> inventory =
|
||||
LazyOptional.of(() -> new BasinInventory(inputItemInventory, outputItemInventory));
|
||||
|
||||
|
@ -115,6 +129,10 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
|||
@Override
|
||||
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
|
||||
behaviours.add(new DirectBeltInputBehaviour(this));
|
||||
filtering = new FilteringBehaviour(this, new BasinValueBox()).moveText(new Vec3d(2, -8, 0))
|
||||
.withCallback(newFilter -> contentsChanged = true)
|
||||
.forRecipes();
|
||||
behaviours.add(filtering);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -177,4 +195,23 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt
|
|||
return Optional.empty();
|
||||
}
|
||||
|
||||
public FilteringBehaviour getFilter() {
|
||||
return filtering;
|
||||
}
|
||||
|
||||
class BasinValueBox extends ValueBoxTransform.Sided {
|
||||
|
||||
@Override
|
||||
protected Vec3d getSouthLocation() {
|
||||
return VecHelper.voxelSpace(8, 12, 16);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isSideActive(BlockState state, Direction direction) {
|
||||
return direction.getAxis()
|
||||
.isHorizontal();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ public class FilteringBehaviour extends TileEntityBehaviour {
|
|||
int scrollableValue;
|
||||
int ticksUntilScrollPacket;
|
||||
boolean forceClientState;
|
||||
boolean recipeFilter;
|
||||
|
||||
public FilteringBehaviour(SmartTileEntity te, ValueBoxTransform slot) {
|
||||
super(te);
|
||||
|
@ -49,6 +50,7 @@ public class FilteringBehaviour extends TileEntityBehaviour {
|
|||
count = 0;
|
||||
ticksUntilScrollPacket = -1;
|
||||
showCountPredicate = () -> showCount;
|
||||
recipeFilter = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -96,6 +98,11 @@ public class FilteringBehaviour extends TileEntityBehaviour {
|
|||
return this;
|
||||
}
|
||||
|
||||
public FilteringBehaviour forRecipes() {
|
||||
recipeFilter = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public FilteringBehaviour onlyActiveWhen(Supplier<Boolean> condition) {
|
||||
isActive = condition;
|
||||
return this;
|
||||
|
|
|
@ -59,7 +59,8 @@ public class FilteringRenderer {
|
|||
ItemStack filter = behaviour.getFilter();
|
||||
boolean isFilterSlotted = filter.getItem() instanceof FilterItem;
|
||||
boolean showCount = behaviour.isCountVisible();
|
||||
String label = isFilterSlotted ? "" : Lang.translate("logistics.filter");
|
||||
String label = isFilterSlotted ? ""
|
||||
: Lang.translate(behaviour.recipeFilter ? "logistics.recipe_filter" : "logistics.filter");
|
||||
boolean hit = behaviour.slotPositioning.testHit(state, target.getHitVec()
|
||||
.subtract(new Vec3d(pos)));
|
||||
|
||||
|
|
|
@ -135,6 +135,7 @@
|
|||
"create.contraptions.cart_movement_mode.rotation_locked": "Lock rotation",
|
||||
|
||||
"create.logistics.filter": "Filter",
|
||||
"create.logistics.recipe_filter": "Recipe Filter",
|
||||
"create.logistics.firstFrequency": "Freq. #1",
|
||||
"create.logistics.secondFrequency": "Freq. #2",
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"5": "create:block/brass_casing",
|
||||
"6": "create:block/crafter_top",
|
||||
"7": "create:block/crafter_topunderside",
|
||||
"8": "create:block/smooth_dark_log_top",
|
||||
"particle": "create:block/brass_casing"
|
||||
},
|
||||
"elements": [
|
||||
|
@ -28,7 +29,7 @@
|
|||
"from": [0, 0, 10],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#5"},
|
||||
"north": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#8"},
|
||||
"east": {"uv": [0, 10, 16, 16], "rotation": 90, "texture": "#4"},
|
||||
"south": {"uv": [0, 0, 16, 16], "texture": "#6"},
|
||||
"west": {"uv": [16, 10, 0, 16], "rotation": 270, "texture": "#4"},
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
"5": "create:block/brass_casing",
|
||||
"6": "create:block/crafter_top",
|
||||
"7": "create:block/crafter_topunderside",
|
||||
"particle": "create:block/cogwheel",
|
||||
"8": "create:block/smooth_dark_log_top",
|
||||
"particle": "create:block/crafter_top",
|
||||
"1_2": "create:block/cogwheel"
|
||||
},
|
||||
"elements": [
|
||||
|
@ -33,7 +34,7 @@
|
|||
"east": {"uv": [0, 10, 16, 16], "texture": "#4"},
|
||||
"south": {"uv": [0, 10, 16, 16], "texture": "#4"},
|
||||
"west": {"uv": [0, 10, 16, 16], "texture": "#4"},
|
||||
"up": {"uv": [0, 0, 16, 16], "texture": "#5"},
|
||||
"up": {"uv": [0, 0, 16, 16], "texture": "#8"},
|
||||
"down": {"uv": [0, 0, 16, 16], "texture": "#6"}
|
||||
}
|
||||
},
|
||||
|
@ -82,11 +83,11 @@
|
|||
"from": [4, 16, 4],
|
||||
"to": [5, 17, 12],
|
||||
"faces": {
|
||||
"north": {"uv": [4, 1, 5, 2], "texture": "#5"},
|
||||
"north": {"uv": [5, 2, 6, 3], "texture": "#5"},
|
||||
"east": {"uv": [2, 1, 10, 2], "texture": "#5"},
|
||||
"south": {"uv": [3.5, 1, 4.5, 2], "texture": "#5"},
|
||||
"west": {"uv": [2, 1, 10, 2], "texture": "#5"},
|
||||
"up": {"uv": [1, 2, 2, 10], "texture": "#5"}
|
||||
"south": {"uv": [3, 2, 4, 3], "texture": "#5"},
|
||||
"west": {"uv": [4, 2, 12, 3], "texture": "#5"},
|
||||
"up": {"uv": [2, 4, 3, 12], "texture": "#5"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -94,11 +95,11 @@
|
|||
"from": [11, 16, 4],
|
||||
"to": [12, 17, 12],
|
||||
"faces": {
|
||||
"north": {"uv": [4, 1, 5, 2], "texture": "#5"},
|
||||
"east": {"uv": [2, 1, 10, 2], "texture": "#5"},
|
||||
"south": {"uv": [3.5, 1, 4.5, 2], "texture": "#5"},
|
||||
"north": {"uv": [4, 2, 5, 3], "texture": "#5"},
|
||||
"east": {"uv": [3, 2, 11, 3], "texture": "#5"},
|
||||
"south": {"uv": [5, 2, 6, 3], "texture": "#5"},
|
||||
"west": {"uv": [2, 1, 10, 2], "texture": "#5"},
|
||||
"up": {"uv": [1, 2, 2, 10], "texture": "#5"}
|
||||
"up": {"uv": [2, 4, 3, 12], "texture": "#5"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -106,11 +107,11 @@
|
|||
"from": [5, 16, 4],
|
||||
"to": [11, 17, 5],
|
||||
"faces": {
|
||||
"north": {"uv": [3, 1, 9, 2], "texture": "#5"},
|
||||
"north": {"uv": [5, 2, 11, 3], "texture": "#5"},
|
||||
"east": {"uv": [1, 2, 2, 3], "texture": "#5"},
|
||||
"south": {"uv": [2.5, 1, 8.5, 2], "texture": "#5"},
|
||||
"west": {"uv": [1, 2, 2, 3], "texture": "#5"},
|
||||
"up": {"uv": [2.5, 1, 8.5, 2], "texture": "#5"}
|
||||
"up": {"uv": [4, 2, 10, 3], "texture": "#5"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -120,9 +121,9 @@
|
|||
"faces": {
|
||||
"north": {"uv": [3, 1, 9, 2], "texture": "#5"},
|
||||
"east": {"uv": [1, 2, 2, 3], "texture": "#5"},
|
||||
"south": {"uv": [2.5, 1, 8.5, 2], "texture": "#5"},
|
||||
"south": {"uv": [2, 2, 8, 3], "texture": "#5"},
|
||||
"west": {"uv": [1, 2, 2, 3], "texture": "#5"},
|
||||
"up": {"uv": [2.5, 1, 8.5, 2], "texture": "#5"}
|
||||
"up": {"uv": [5, 2, 11, 3], "texture": "#5"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,59 +1,60 @@
|
|||
{
|
||||
"__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)",
|
||||
"textures": {
|
||||
"gearbox_top": "create:block/gearbox_top",
|
||||
"gearbox": "create:block/gearbox",
|
||||
"mechanical_press_top": "create:block/mechanical_press_top",
|
||||
"mechanical_press_bottom": "create:block/mechanical_press_bottom",
|
||||
"particle": "create:block/gearbox"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "Top",
|
||||
"from": [ 0, 14, 0 ],
|
||||
"to": [ 16, 16, 16 ],
|
||||
"faces": {
|
||||
"north": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] },
|
||||
"east": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] },
|
||||
"south": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] },
|
||||
"west": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] },
|
||||
"up": { "texture": "#mechanical_press_top", "uv": [ 0, 0, 16, 16 ] },
|
||||
"down": { "texture": "#gearbox", "uv": [ 0, 0, 16, 16 ] }
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Core",
|
||||
"from": [ 2, 4, 1 ],
|
||||
"to": [ 14, 14, 15 ],
|
||||
"faces": {
|
||||
"north": { "texture": "#gearbox", "uv": [ 2, 2, 14, 12 ] },
|
||||
"south": { "texture": "#gearbox", "uv": [ 2, 2, 14, 12 ] },
|
||||
"down": { "texture": "#mechanical_press_bottom", "uv": [ 2, 1, 14, 15 ] }
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Side",
|
||||
"from": [ 0, 2, 0 ],
|
||||
"to": [ 2, 14, 16 ],
|
||||
"faces": {
|
||||
"north": { "texture": "#gearbox_top", "uv": [ 14, 2, 16, 14 ] },
|
||||
"east": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] },
|
||||
"south": { "texture": "#gearbox_top", "uv": [ 0, 2, 2, 14 ] },
|
||||
"west": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] },
|
||||
"down": { "texture": "#gearbox_top", "uv": [ 0, 0, 2, 16 ] }
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Side",
|
||||
"from": [ 14, 2, 0 ],
|
||||
"to": [ 16, 14, 16 ],
|
||||
"faces": {
|
||||
"north": { "texture": "#gearbox_top", "uv": [ 0, 2, 2, 14 ] },
|
||||
"east": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] },
|
||||
"south": { "texture": "#gearbox_top", "uv": [ 14, 2, 16, 14 ] },
|
||||
"west": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] },
|
||||
"down": { "texture": "#gearbox_top", "uv": [ 14, 0, 16, 16 ] }
|
||||
}
|
||||
}
|
||||
]
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"4": "create:block/mechanical_press_side",
|
||||
"gearbox_top": "create:block/gearbox_top",
|
||||
"particle": "create:block/mechanical_press_side",
|
||||
"gearbox": "create:block/gearbox",
|
||||
"mechanical_press_top": "create:block/mechanical_press_top",
|
||||
"mechanical_press_bottom": "create:block/mechanical_press_bottom"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "Top",
|
||||
"from": [0, 14, 0],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 2], "texture": "#gearbox"},
|
||||
"east": {"uv": [0, 0, 16, 2], "texture": "#4"},
|
||||
"south": {"uv": [0, 0, 16, 2], "texture": "#gearbox"},
|
||||
"west": {"uv": [0, 0, 16, 2], "texture": "#4"},
|
||||
"up": {"uv": [0, 0, 16, 16], "texture": "#mechanical_press_top"},
|
||||
"down": {"uv": [0, 0, 16, 16], "texture": "#gearbox"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Core",
|
||||
"from": [2, 4, 1],
|
||||
"to": [14, 14, 15],
|
||||
"faces": {
|
||||
"north": {"uv": [2, 2, 14, 12], "texture": "#gearbox"},
|
||||
"south": {"uv": [2, 2, 14, 12], "texture": "#gearbox"},
|
||||
"down": {"uv": [2, 1, 14, 15], "texture": "#mechanical_press_bottom"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Side",
|
||||
"from": [0, 2, 0],
|
||||
"to": [2, 14, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [14, 2, 16, 14], "texture": "#gearbox_top"},
|
||||
"east": {"uv": [0, 2, 16, 14], "texture": "#4"},
|
||||
"south": {"uv": [0, 2, 2, 14], "texture": "#gearbox_top"},
|
||||
"west": {"uv": [0, 2, 16, 14], "texture": "#4"},
|
||||
"down": {"uv": [0, 0, 2, 16], "texture": "#gearbox_top"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Side",
|
||||
"from": [14, 2, 0],
|
||||
"to": [16, 14, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 2, 2, 14], "texture": "#gearbox_top"},
|
||||
"east": {"uv": [0, 2, 16, 14], "texture": "#4"},
|
||||
"south": {"uv": [14, 2, 16, 14], "texture": "#gearbox_top"},
|
||||
"west": {"uv": [0, 2, 16, 14], "texture": "#4"},
|
||||
"down": {"uv": [14, 0, 16, 16], "texture": "#gearbox_top"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -4,13 +4,14 @@
|
|||
"textures": {
|
||||
"0": "create:block/axis",
|
||||
"1": "create:block/axis_top",
|
||||
"8": "create:block/mechanical_press_side",
|
||||
"mechanical_press_head": "create:block/mechanical_press_head",
|
||||
"gearbox_top": "create:block/gearbox_top",
|
||||
"mechanical_press_pole": "create:block/mechanical_press_pole",
|
||||
"gearbox": "create:block/gearbox",
|
||||
"mechanical_press_top": "create:block/mechanical_press_top",
|
||||
"mechanical_press_bottom": "create:block/mechanical_press_bottom",
|
||||
"particle": "create:block/axis"
|
||||
"particle": "create:block/mechanical_press_side"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
|
@ -19,9 +20,9 @@
|
|||
"to": [16, 20, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 2], "texture": "#gearbox"},
|
||||
"east": {"uv": [0, 0, 16, 2], "texture": "#gearbox"},
|
||||
"east": {"uv": [0, 0, 16, 2], "texture": "#8"},
|
||||
"south": {"uv": [0, 0, 16, 2], "texture": "#gearbox"},
|
||||
"west": {"uv": [0, 0, 16, 2], "texture": "#gearbox"},
|
||||
"west": {"uv": [0, 0, 16, 2], "texture": "#8"},
|
||||
"up": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#mechanical_press_top"},
|
||||
"down": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#gearbox"}
|
||||
}
|
||||
|
@ -42,9 +43,9 @@
|
|||
"to": [16, 18, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 2, 2, 14], "texture": "#gearbox_top"},
|
||||
"east": {"uv": [0, 4, 16, 16], "texture": "#gearbox_top"},
|
||||
"east": {"uv": [0, 2, 16, 14], "texture": "#8"},
|
||||
"south": {"uv": [14, 2, 16, 14], "texture": "#gearbox_top"},
|
||||
"west": {"uv": [0, 4, 16, 16], "texture": "#gearbox_top"},
|
||||
"west": {"uv": [0, 2, 16, 14], "texture": "#8"},
|
||||
"down": {"uv": [0, 0, 2, 16], "rotation": 180, "texture": "#gearbox_top"}
|
||||
}
|
||||
},
|
||||
|
@ -54,9 +55,9 @@
|
|||
"to": [2, 18, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [14, 2, 16, 14], "texture": "#gearbox_top"},
|
||||
"east": {"uv": [0, 4, 16, 16], "texture": "#gearbox_top"},
|
||||
"east": {"uv": [0, 2, 16, 14], "texture": "#8"},
|
||||
"south": {"uv": [0, 2, 2, 14], "texture": "#gearbox_top"},
|
||||
"west": {"uv": [0, 4, 16, 16], "texture": "#gearbox_top"},
|
||||
"west": {"uv": [0, 2, 16, 14], "texture": "#8"},
|
||||
"down": {"uv": [14, 0, 16, 16], "rotation": 180, "texture": "#gearbox_top"}
|
||||
}
|
||||
},
|
||||
|
|
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 495 B |
Before Width: | Height: | Size: 759 B After Width: | Height: | Size: 802 B |
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 437 B |
After Width: | Height: | Size: 482 B |
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 493 B |
Before Width: | Height: | Size: 467 B After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 409 B |