Tag migration
This commit is contained in:
parent
92a392cffe
commit
a390486d5b
76 changed files with 224 additions and 164 deletions
|
@ -100,6 +100,7 @@ public class LevelRendererMixin {
|
|||
RenderSystem.depthMask(false);
|
||||
RenderSystem.enableTexture();
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.setShaderColor(1,1,1,1);
|
||||
RenderSystem.blendFunc(
|
||||
GlStateManager.SourceFactor.SRC_ALPHA,
|
||||
GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA
|
||||
|
|
|
@ -54,7 +54,7 @@ public abstract class ChorusFlowerBlockMixin extends Block {
|
|||
|
||||
@Inject(method = "randomTick", at = @At("HEAD"), cancellable = true)
|
||||
private void be_randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random, CallbackInfo info) {
|
||||
if (world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) {
|
||||
if (world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) {
|
||||
BlockPos up = pos.above();
|
||||
if (world.isEmptyBlock(up) && up.getY() < 256) {
|
||||
int i = state.getValue(ChorusFlowerBlock.AGE);
|
||||
|
@ -119,7 +119,7 @@ public abstract class ChorusFlowerBlockMixin extends Block {
|
|||
@Inject(method = "placeDeadFlower", at = @At("HEAD"), cancellable = true)
|
||||
private void be_placeDeadFlower(Level world, BlockPos pos, CallbackInfo info) {
|
||||
BlockState down = world.getBlockState(pos.below());
|
||||
if (down.is(Blocks.CHORUS_PLANT) || down.is(TagAPI.GEN_TERRAIN)) {
|
||||
if (down.is(Blocks.CHORUS_PLANT) || down.is(TagAPI.BLOCK_GEN_TERRAIN)) {
|
||||
world.setBlock(pos, this.defaultBlockState().setValue(BlockStateProperties.AGE_5, 5), 2);
|
||||
world.levelEvent(1034, pos, 0);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
|||
BlockPos pos = ctx.getClickedPos();
|
||||
Level world = ctx.getLevel();
|
||||
BlockState plant = info.getReturnValue();
|
||||
if (ctx.canPlace() && plant.is(Blocks.CHORUS_PLANT) && world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) {
|
||||
if (ctx.canPlace() && plant.is(Blocks.CHORUS_PLANT) && world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) {
|
||||
if (GeneratorOptions.changeChorusPlant()) {
|
||||
info.setReturnValue(plant.setValue(VanillaBlockProperties.ROOTS, true)
|
||||
.setValue(BlockStateProperties.DOWN, true));
|
||||
|
@ -66,7 +66,7 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
|||
private void be_getStateForPlacement(BlockGetter blockGetter, BlockPos blockPos, CallbackInfoReturnable<BlockState> info) {
|
||||
BlockState plant = info.getReturnValue();
|
||||
if (plant.is(Blocks.CHORUS_PLANT)) {
|
||||
if (blockGetter.getBlockState(blockPos.below()).is(TagAPI.END_GROUND)) {
|
||||
if (blockGetter.getBlockState(blockPos.below()).is(TagAPI.BLOCK_END_GROUND)) {
|
||||
if (GeneratorOptions.changeChorusPlant()) {
|
||||
info.setReturnValue(plant.setValue(BlockStateProperties.DOWN, true)
|
||||
.setValue(VanillaBlockProperties.ROOTS, true));
|
||||
|
@ -98,7 +98,7 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
|||
private void be_updateShape(BlockState state, Direction direction, BlockState newState, LevelAccessor world, BlockPos pos, BlockPos posFrom, CallbackInfoReturnable<BlockState> info) {
|
||||
BlockState plant = info.getReturnValue();
|
||||
if (plant.is(Blocks.CHORUS_PLANT)) {
|
||||
if (world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) {
|
||||
if (world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) {
|
||||
if (GeneratorOptions.changeChorusPlant()) {
|
||||
plant = plant.setValue(BlockStateProperties.DOWN, true)
|
||||
.setValue(VanillaBlockProperties.ROOTS, true);
|
||||
|
|
|
@ -71,28 +71,28 @@ public abstract class EnchantmentMenuMixin extends AbstractContainerMenu {
|
|||
0,
|
||||
j
|
||||
)) && world.isEmptyBlock(blockPos.offset(k, 1, j))) {
|
||||
if (world.getBlockState(blockPos.offset(k * 2, 0, j * 2)).is(TagAPI.BOOKSHELVES)) {
|
||||
if (world.getBlockState(blockPos.offset(k * 2, 0, j * 2)).is(TagAPI.BLOCK_BOOKSHELVES)) {
|
||||
++i;
|
||||
}
|
||||
|
||||
if (world.getBlockState(blockPos.offset(k * 2, 1, j * 2)).is(TagAPI.BOOKSHELVES)) {
|
||||
if (world.getBlockState(blockPos.offset(k * 2, 1, j * 2)).is(TagAPI.BLOCK_BOOKSHELVES)) {
|
||||
++i;
|
||||
}
|
||||
|
||||
if (k != 0 && j != 0) {
|
||||
if (world.getBlockState(blockPos.offset(k * 2, 0, j)).is(TagAPI.BOOKSHELVES)) {
|
||||
if (world.getBlockState(blockPos.offset(k * 2, 0, j)).is(TagAPI.BLOCK_BOOKSHELVES)) {
|
||||
++i;
|
||||
}
|
||||
|
||||
if (world.getBlockState(blockPos.offset(k * 2, 1, j)).is(TagAPI.BOOKSHELVES)) {
|
||||
if (world.getBlockState(blockPos.offset(k * 2, 1, j)).is(TagAPI.BLOCK_BOOKSHELVES)) {
|
||||
++i;
|
||||
}
|
||||
|
||||
if (world.getBlockState(blockPos.offset(k, 0, j * 2)).is(TagAPI.BOOKSHELVES)) {
|
||||
if (world.getBlockState(blockPos.offset(k, 0, j * 2)).is(TagAPI.BLOCK_BOOKSHELVES)) {
|
||||
++i;
|
||||
}
|
||||
|
||||
if (world.getBlockState(blockPos.offset(k, 1, j * 2)).is(TagAPI.BOOKSHELVES)) {
|
||||
if (world.getBlockState(blockPos.offset(k, 1, j * 2)).is(TagAPI.BLOCK_BOOKSHELVES)) {
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue