Compare commits

...

3 commits

Author SHA1 Message Date
StormDragon_64 06e99631eb
Merge 518c10cab3 into d66170c8fe 2024-04-27 20:25:02 +00:00
StormDragon_64 518c10cab3
Merge branch 'Creators-of-Create:mc1.18/dev' into mc1.18/dev 2024-04-27 13:24:59 -07:00
StormDragon_64 23741be823 Make checks for AllBlocks.BASIN use a tag instead so it isn't hardcoded. 2024-02-23 17:57:59 -08:00
12 changed files with 27 additions and 16 deletions

View file

@ -5659,6 +5659,7 @@ d79c82bc6cf59b073b2f51f5fea9c98e81d14b68 data/create/recipes/weathered_copper_ti
452d480dd50b97fce72e0c89429cf68db534c6b2 data/create/recipes/weathered_copper_tile_slab_from_weathered_copper_tiles_stonecutting.json
ac265a674626e0e832330086fd18fe0be37fc327 data/create/recipes/weathered_copper_tile_stairs.json
5942a571f79c40524bbf408775cf91de4715f2b6 data/create/recipes/weathered_copper_tile_stairs_from_weathered_copper_tiles_stonecutting.json
ee171beb1cb778629a81a6385c0892fff8206073 data/create/tags/blocks/basin.json
2a2700b43614f86d3294726595cb28ed7dca4387 data/create/tags/blocks/brittle.json
d99d5c67bdffff60789a19bd51a5c5267c75e0a4 data/create/tags/blocks/casing.json
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/create/tags/blocks/contraption_inventory_deny.json

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"create:basin"
]
}

View file

@ -692,6 +692,7 @@ public class AllBlocks {
.transform(pickaxeOnly())
.blockstate(new BasinGenerator()::generate)
.addLayer(() -> RenderType::cutoutMipped)
.tag(AllBlockTags.BASIN.tag)
.onRegister(movementBehaviour(new BasinMovementBehaviour()))
.item()
.transform(customItemModel("_", "block"))

View file

@ -101,6 +101,7 @@ public class AllTags {
VALVE_HANDLES,
WINDMILL_SAILS,
WRENCH_PICKUP,
BASIN,
RELOCATION_NOT_SUPPORTED(FORGE),
WG_STONE(FORGE),

View file

@ -2,7 +2,7 @@ package com.simibubi.create.content.fluids.particle;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.math.Quaternion;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllTags;
import com.simibubi.create.content.processing.basin.BasinBlockEntity;
import com.simibubi.create.foundation.utility.VecHelper;
@ -56,7 +56,7 @@ public class BasinFluidParticle extends FluidStackParticle {
: 1 / 8f * (1 - ((Math.abs(age - (lifetime / 2)) / (1f * lifetime))));
if (age % 2 == 0) {
if (!AllBlocks.BASIN.has(level.getBlockState(basinPos))) {
if (!AllTags.AllBlockTags.BASIN.matches(level.getBlockState(basinPos))) {
remove();
return;
}

View file

@ -8,6 +8,7 @@ import javax.annotation.Nullable;
import org.apache.commons.lang3.mutable.MutableBoolean;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllTags;
import com.simibubi.create.Create;
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
import com.simibubi.create.content.kinetics.belt.BeltBlockEntity;
@ -96,7 +97,7 @@ public class AllArmInteractionPointTypes {
@Override
public boolean canCreatePoint(Level level, BlockPos pos, BlockState state) {
return AllBlocks.BASIN.has(state);
return AllTags.AllBlockTags.BASIN.matches(state);
}
@Override

View file

@ -1,8 +1,8 @@
package com.simibubi.create.content.kinetics.mixer;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTags;
import com.simibubi.create.content.kinetics.base.KineticBlock;
import com.simibubi.create.content.kinetics.simpleRelays.ICogWheel;
import com.simibubi.create.foundation.block.IBE;
@ -28,7 +28,7 @@ public class MechanicalMixerBlock extends KineticBlock implements IBE<Mechanical
@Override
public boolean canSurvive(BlockState state, LevelReader worldIn, BlockPos pos) {
return !AllBlocks.BASIN.has(worldIn.getBlockState(pos.below()));
return !AllTags.AllBlockTags.BASIN.matches(worldIn.getBlockState(pos.below()));
}
@Override

View file

@ -1,8 +1,8 @@
package com.simibubi.create.content.kinetics.press;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTags;
import com.simibubi.create.content.kinetics.base.HorizontalKineticBlock;
import com.simibubi.create.foundation.block.IBE;
@ -37,7 +37,7 @@ public class MechanicalPressBlock extends HorizontalKineticBlock implements IBE<
@Override
public boolean canSurvive(BlockState state, LevelReader worldIn, BlockPos pos) {
return !AllBlocks.BASIN.has(worldIn.getBlockState(pos.below()));
return !AllTags.AllBlockTags.BASIN.matches(worldIn.getBlockState(pos.below()));
}
@Override

View file

@ -3,8 +3,8 @@ package com.simibubi.create.content.kinetics.press;
import java.util.ArrayList;
import java.util.List;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.AllTags;
import com.simibubi.create.content.kinetics.belt.behaviour.BeltProcessingBehaviour;
import com.simibubi.create.content.kinetics.belt.behaviour.TransportedItemStackHandlerBehaviour;
import com.simibubi.create.content.kinetics.belt.transport.TransportedItemStack;
@ -144,7 +144,7 @@ public class PressingBehaviour extends BeltProcessingBehaviour {
if (BlockEntityBehaviour.get(level, worldPosition.below(2),
TransportedItemStackHandlerBehaviour.TYPE) != null)
return;
if (AllBlocks.BASIN.has(level.getBlockState(worldPosition.below(2))))
if (AllTags.AllBlockTags.BASIN.matches(level.getBlockState(worldPosition.below(2))))
return;
for (ItemEntity itemEntity : level.getEntitiesOfClass(ItemEntity.class,

View file

@ -1,6 +1,7 @@
package com.simibubi.create.content.processing;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllTags;
import com.simibubi.create.content.kinetics.belt.BeltBlock;
import com.simibubi.create.content.kinetics.belt.BeltSlope;
@ -48,7 +49,7 @@ public class AssemblyOperatorBlockItem extends BlockItem {
protected boolean operatesOn(BlockState placedOnState) {
if (AllBlocks.BELT.has(placedOnState))
return placedOnState.getValue(BeltBlock.SLOPE) == BeltSlope.HORIZONTAL;
return AllBlocks.BASIN.has(placedOnState) || AllBlocks.DEPOT.has(placedOnState) || AllBlocks.WEIGHTED_EJECTOR.has(placedOnState);
return AllTags.AllBlockTags.BASIN.matches(placedOnState) || AllBlocks.DEPOT.has(placedOnState) || AllBlocks.WEIGHTED_EJECTOR.has(placedOnState);
}
}

View file

@ -1,8 +1,8 @@
package com.simibubi.create.content.processing.basin;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTags;
import com.simibubi.create.Create;
import com.simibubi.create.content.equipment.wrench.IWrenchable;
import com.simibubi.create.content.fluids.transfer.GenericItemEmptying;
@ -127,7 +127,7 @@ public class BasinBlock extends Block implements IBE<BasinBlockEntity>, IWrencha
@Override
public void updateEntityAfterFallOn(BlockGetter worldIn, Entity entityIn) {
super.updateEntityAfterFallOn(worldIn, entityIn);
if (!AllBlocks.BASIN.has(worldIn.getBlockState(entityIn.blockPosition())))
if (!AllTags.AllBlockTags.BASIN.matches(worldIn.getBlockState(entityIn.blockPosition())))
return;
if (!(entityIn instanceof ItemEntity))
return;

View file

@ -3,8 +3,8 @@ package com.simibubi.create.content.processing.burner;
import java.util.List;
import java.util.Random;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllTags;
import com.simibubi.create.AllTags.AllItemTags;
import com.simibubi.create.content.fluids.tank.FluidTankBlock;
import com.simibubi.create.content.processing.burner.BlazeBurnerBlock.HeatLevel;
@ -269,7 +269,7 @@ public class BlazeBurnerBlockEntity extends SmartBlockEntity {
if (isVirtual())
return false;
BlockState blockState = level.getBlockState(worldPosition.above());
return AllBlocks.BASIN.has(blockState) || blockState.getBlock() instanceof FluidTankBlock;
return AllTags.AllBlockTags.BASIN.matches(blockState) || blockState.getBlock() instanceof FluidTankBlock;
}
protected void playSound() {
@ -305,14 +305,14 @@ public class BlazeBurnerBlockEntity extends SmartBlockEntity {
Vec3 c = VecHelper.getCenterOf(worldPosition);
Vec3 v = c.add(VecHelper.offsetRandomly(Vec3.ZERO, r, .125f)
.multiply(1, 0, 1));
if (r.nextInt(4) != 0)
return;
boolean empty = level.getBlockState(worldPosition.above())
.getCollisionShape(level, worldPosition.above())
.isEmpty();
if (empty || r.nextInt(8) == 0)
level.addParticle(ParticleTypes.LARGE_SMOKE, v.x, v.y, v.z, 0, 0, 0);