19w39a
This commit is contained in:
1 parent
5d25dd9c9d
commit
1195b95d0d
7 files changed
+27
-18
No files matched your search
@@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
@Mixin(BlockEntityRenderDispatcher.class)
|
||||
public abstract class BlockEntityRenderDispatcher_movableTEMixin implements BlockEntityRenderDispatcherInterface
|
||||
{
|
||||
{/*
|
||||
@Shadow
|
||||
public static double renderOffsetX;
|
||||
@Shadow
|
||||
@@ -41,11 +41,11 @@ public abstract class BlockEntityRenderDispatcher_movableTEMixin implements Bloc
|
||||
}
|
||||
}
|
||||
@Shadow
|
||||
public abstract <T extends BlockEntity> BlockEntityRenderer<T> get(/*@Nullable*/ BlockEntity blockEntity_1);
|
||||
public abstract <T extends BlockEntity> BlockEntityRenderer<T> get(/@Nullable/ BlockEntity blockEntity_1);
|
||||
|
||||
/**
|
||||
* @author 2No2Name
|
||||
*/
|
||||
/
|
||||
@author 2No2Name
|
||||
/
|
||||
//Renders the BlockEntity offset by the amount specified in the arguments xOffset yOffset zOffset (the moving block moved in the animation by this)
|
||||
//Code copied and modified from BlockEntityRenderDispatcher::render(BlockEntity blockEntity_1, float float_1, int int_1, BlockRenderLayer blockRenderLayer_1, BufferBuilder bufferBuilder_1)
|
||||
public void renderBlockEntityOffset(BlockEntity blockEntity_1, float partialTicks, int destroyStage, BlockRenderLayer blockRenderLayer_1, BufferBuilder bufferBuilder_1, double xOffset,
|
||||
@@ -67,5 +67,5 @@ public abstract class BlockEntityRenderDispatcher_movableTEMixin implements Bloc
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
@@ -1,14 +1,11 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.settings.CarpetSettings;
|
||||
import carpet.fakes.BlockEntityRenderDispatcherInterface;
|
||||
import carpet.fakes.PistonBlockEntityInterface;
|
||||
import net.minecraft.block.BlockRenderLayer;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.block.entity.PistonBlockEntity;
|
||||
import net.minecraft.class_4587;
|
||||
import net.minecraft.class_4597;
|
||||
import net.minecraft.client.render.BufferBuilder;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
|
||||
import net.minecraft.client.render.block.entity.PistonBlockEntityRenderer;
|
||||
@@ -21,6 +18,11 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
@Mixin(PistonBlockEntityRenderer.class)
|
||||
public abstract class PistonBlockEntityRenderer_movableTEMixin extends BlockEntityRenderer<PistonBlockEntity>
|
||||
{
|
||||
public PistonBlockEntityRenderer_movableTEMixin(BlockEntityRenderDispatcher blockEntityRenderDispatcher_1)
|
||||
{
|
||||
super(blockEntityRenderDispatcher_1);
|
||||
}
|
||||
|
||||
@Inject(method = "method_3576", at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/render/block/entity/PistonBlockEntityRenderer;method_3575(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/class_4587;Lnet/minecraft/class_4597;Lnet/minecraft/world/World;Z)V", ordinal = 3))
|
||||
private void updateRenderBool(PistonBlockEntity pistonBlockEntity_1, double double_1, double double_2, double double_3, float float_1, class_4587 class_4587_1, class_4597 class_4597_1, int int_1, CallbackInfo ci)
|
||||
@@ -31,7 +33,7 @@ public abstract class PistonBlockEntityRenderer_movableTEMixin extends BlockEnti
|
||||
|
||||
|
||||
@Inject(method = "method_3576", at = @At("RETURN"), locals = LocalCapture.NO_CAPTURE)
|
||||
private void endMethod3576(PistonBlockEntity pistonBlockEntity_1, double double_1, double double_2, double double_3, float float_1, int int_1, BlockRenderLayer blockRenderLayer_1, BufferBuilder bufferBuilder_1, int int_2, int int_3, CallbackInfo ci)
|
||||
private void endMethod3576(PistonBlockEntity pistonBlockEntity_1, double xOffset, double yOffset, double zOffset, float partialTicks, class_4587 transform, class_4597 bufferWrapper, int int_1, CallbackInfo ci)
|
||||
{
|
||||
if (((PistonBlockEntityInterface) pistonBlockEntity_1).getRenderCarriedBlockEntity())
|
||||
{
|
||||
@@ -39,7 +41,14 @@ public abstract class PistonBlockEntityRenderer_movableTEMixin extends BlockEnti
|
||||
if (carriedBlockEntity != null)
|
||||
{
|
||||
carriedBlockEntity.setPos(pistonBlockEntity_1.getPos());
|
||||
((BlockEntityRenderDispatcherInterface) BlockEntityRenderDispatcher.INSTANCE).renderBlockEntityOffset(carriedBlockEntity, float_1, int_1, BlockRenderLayer.field_20799, bufferBuilder_1, pistonBlockEntity_1.getRenderOffsetX(float_1), pistonBlockEntity_1.getRenderOffsetY(float_1), pistonBlockEntity_1.getRenderOffsetZ(float_1));
|
||||
//((BlockEntityRenderDispatcherInterface) BlockEntityRenderDispatcher.INSTANCE).renderBlockEntityOffset(carriedBlockEntity, float_1, int_1, BlockRenderLayer.field_20799, bufferBuilder_1, pistonBlockEntity_1.getRenderOffsetX(float_1), pistonBlockEntity_1.getRenderOffsetY(float_1), pistonBlockEntity_1.getRenderOffsetZ(float_1));
|
||||
transform.method_22904( // translate
|
||||
pistonBlockEntity_1.getRenderOffsetX(partialTicks),
|
||||
pistonBlockEntity_1.getRenderOffsetY(partialTicks),
|
||||
pistonBlockEntity_1.getRenderOffsetZ(partialTicks)
|
||||
);
|
||||
BlockEntityRenderDispatcher.INSTANCE.render(carriedBlockEntity, partialTicks, transform, bufferWrapper, xOffset, yOffset, zOffset);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public abstract class RedstoneWireBlockMixin implements RedstoneWireBlockInterfa
|
||||
if (blockState_3.isSimpleFullBlock(world_1, blockPos_2) && !world_1.getBlockState(blockPos_3).isSimpleFullBlock(world_1, blockPos_3)) {
|
||||
int_3 = this.increasePower(int_3, world_1.getBlockState(blockPos_2.up()));
|
||||
} else if (!blockState_3.isSimpleFullBlock(world_1, blockPos_2)) {
|
||||
int_3 = this.increasePower(int_3, world_1.getBlockState(blockPos_2.down(1)));
|
||||
int_3 = this.increasePower(int_3, world_1.getBlockState(blockPos_2.method_10074()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1987,7 +1987,7 @@ public class CarpetExpression
|
||||
|
||||
List<Value> neighbours = new ArrayList<>();
|
||||
neighbours.add(new BlockValue(null, world, center.up()));
|
||||
neighbours.add(new BlockValue(null, world, center.down(1)));
|
||||
neighbours.add(new BlockValue(null, world, center.method_10074()));
|
||||
neighbours.add(new BlockValue(null, world, center.north()));
|
||||
neighbours.add(new BlockValue(null, world, center.south()));
|
||||
neighbours.add(new BlockValue(null, world, center.east()));
|
||||
|
||||
@@ -107,7 +107,7 @@ public class PerimeterDiagnostics
|
||||
pos = new BlockPos(eX+x, y, eZ+z);
|
||||
|
||||
BlockState iblockstate = worldserver.getBlockState(pos);
|
||||
BlockState iblockstate_down = worldserver.getBlockState(pos.down(1));
|
||||
BlockState iblockstate_down = worldserver.getBlockState(pos.method_10074());
|
||||
BlockState iblockstate_up = worldserver.getBlockState(pos.up());
|
||||
|
||||
if ( iblockstate.getMaterial() == Material.WATER && iblockstate_down.getMaterial() == Material.WATER && !iblockstate_up.isSimpleFullBlock(worldserver, pos))
|
||||
|
||||
@@ -165,7 +165,7 @@ public class SpawnReporter
|
||||
|
||||
public static List<BaseText> show_mobcaps(BlockPos pos, World worldIn)
|
||||
{
|
||||
DyeColor under = WoolTool.getWoolColorAtPosition(worldIn, pos.down(1));
|
||||
DyeColor under = WoolTool.getWoolColorAtPosition(worldIn, pos.method_10074());
|
||||
if (under == null)
|
||||
{
|
||||
if (track_spawns > 0L)
|
||||
|
||||
@@ -60,7 +60,7 @@ public class WoolTool
|
||||
break;
|
||||
case GRAY:
|
||||
if (CarpetSettings.commandInfo)
|
||||
Messenger.send(placer, BlockInfo.blockInfo(pos.down(1), worldIn));
|
||||
Messenger.send(placer, BlockInfo.blockInfo(pos.method_10074(), worldIn));
|
||||
break;
|
||||
case YELLOW:
|
||||
if (CarpetSettings.commandInfo)
|
||||
@@ -70,7 +70,7 @@ public class WoolTool
|
||||
case GREEN:
|
||||
if (CarpetSettings.hopperCounters)
|
||||
{
|
||||
DyeColor under = getWoolColorAtPosition(worldIn, pos.down(1));
|
||||
DyeColor under = getWoolColorAtPosition(worldIn, pos.method_10074());
|
||||
if (under == null) return;
|
||||
HopperCounter counter = HopperCounter.getCounter(under.toString());
|
||||
if (counter != null)
|
||||
@@ -80,7 +80,7 @@ public class WoolTool
|
||||
case RED:
|
||||
if (CarpetSettings.hopperCounters)
|
||||
{
|
||||
DyeColor under = getWoolColorAtPosition(worldIn, pos.down(1));
|
||||
DyeColor under = getWoolColorAtPosition(worldIn, pos.method_10074());
|
||||
if (under == null) return;
|
||||
HopperCounter counter = HopperCounter.getCounter(under.toString());
|
||||
if (counter == null) return;
|
||||
|
||||
Reference in new issue
Block a user