25w05a
This commit is contained in:
1 parent
b1a2e33caf
commit
6a77d6a3f5
4 files changed
+41
-8
No files matched your search
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.client.renderer.blockentity.PistonHeadRenderer;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.piston.PistonMovingBlockEntity;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
@@ -27,8 +28,9 @@ public abstract class PistonHeadRenderer_movableBEMixin implements BlockEntityRe
|
||||
}
|
||||
|
||||
@Inject(method = "render", at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/renderer/blockentity/PistonHeadRenderer;renderBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;Lnet/minecraft/world/level/Level;ZI)V", ordinal = 3))
|
||||
private void updateRenderBool(PistonMovingBlockEntity pistonBlockEntity_1, float float_1, PoseStack matrixStack_1, MultiBufferSource layeredVertexConsumerStorage_1, int int_1, int int_2, CallbackInfo ci)
|
||||
target = "Lnet/minecraft/client/renderer/blockentity/PistonHeadRenderer;renderBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;Lnet/minecraft/world/level/Level;ZI)V",
|
||||
ordinal = 3))
|
||||
private void updateRenderBool(PistonMovingBlockEntity pistonBlockEntity_1, float float_1, PoseStack matrixStack_1, MultiBufferSource layeredVertexConsumerStorage_1, int int_1, int int_2, Vec3 cameraPos, CallbackInfo ci)
|
||||
//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)
|
||||
{
|
||||
if (!((PistonBlockEntityInterface) pistonBlockEntity_1).isRenderModeSet())
|
||||
@@ -37,7 +39,7 @@ public abstract class PistonHeadRenderer_movableBEMixin implements BlockEntityRe
|
||||
|
||||
|
||||
@Inject(method = "render", at = @At("RETURN"), locals = LocalCapture.NO_CAPTURE)
|
||||
private void endMethod3576(PistonMovingBlockEntity pistonBlockEntity_1, float partialTicks, PoseStack matrixStack_1, MultiBufferSource layeredVertexConsumerStorage_1, int int_1, int init_2, CallbackInfo ci)
|
||||
private void endMethod3576(PistonMovingBlockEntity pistonBlockEntity_1, float partialTicks, PoseStack matrixStack_1, MultiBufferSource layeredVertexConsumerStorage_1, int int_1, int init_2, Vec3 cameraPos, CallbackInfo ci)
|
||||
{
|
||||
if (((PistonBlockEntityInterface) pistonBlockEntity_1).getRenderCarriedBlockEntity())
|
||||
{
|
||||
|
||||
@@ -35,6 +35,7 @@ import net.minecraft.world.scores.ScoreHolder;
|
||||
import net.minecraft.world.scores.Scoreboard;
|
||||
import net.minecraft.world.scores.Team;
|
||||
import net.minecraft.world.scores.criteria.ObjectiveCriteria;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class Scoreboards
|
||||
{
|
||||
@@ -420,7 +421,7 @@ public class Scoreboards
|
||||
{
|
||||
throw new InternalExpressionException("'team_property' requires a string as the third argument for the property " + propertyVal.getString());
|
||||
}
|
||||
Team.CollisionRule collisionRule = Team.CollisionRule.byName(settingVal.getString());
|
||||
Team.CollisionRule collisionRule = getCollisionRule(settingVal);
|
||||
if (collisionRule == null)
|
||||
{
|
||||
throw new InternalExpressionException("Unknown value for property " + propertyVal.getString() + ": " + settingVal.getString());
|
||||
@@ -452,7 +453,7 @@ public class Scoreboards
|
||||
{
|
||||
throw new InternalExpressionException("'team_property' requires a string as the third argument for the property " + propertyVal.getString());
|
||||
}
|
||||
Team.Visibility deathMessageVisibility = Team.Visibility.byName(settingVal.getString());
|
||||
Team.Visibility deathMessageVisibility = getVisibility(settingVal);
|
||||
if (deathMessageVisibility == null)
|
||||
{
|
||||
throw new InternalExpressionException("Unknown value for property " + propertyVal.getString() + ": " + settingVal.getString());
|
||||
@@ -490,7 +491,7 @@ public class Scoreboards
|
||||
{
|
||||
throw new InternalExpressionException("'team_property' requires a string as the third argument for the property " + propertyVal.getString());
|
||||
}
|
||||
Team.Visibility nametagVisibility = Team.Visibility.byName(settingVal.getString());
|
||||
Team.Visibility nametagVisibility = getVisibility(settingVal);
|
||||
if (nametagVisibility == null)
|
||||
{
|
||||
throw new InternalExpressionException("Unknown value for property " + propertyVal.getString() + ": " + settingVal.getString());
|
||||
@@ -697,5 +698,35 @@ public class Scoreboards
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static Team.CollisionRule getCollisionRule(Value settingVal)
|
||||
{
|
||||
|
||||
final String string = settingVal.getString();
|
||||
for (Team.CollisionRule rule : Team.CollisionRule.values())
|
||||
{
|
||||
if (rule.getSerializedName().equalsIgnoreCase(string))
|
||||
{
|
||||
return rule;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static Team.Visibility getVisibility(Value settingVal)
|
||||
{
|
||||
|
||||
final String string = settingVal.getString();
|
||||
for (Team.Visibility rule : Team.Visibility.values())
|
||||
{
|
||||
if (rule.getSerializedName().equalsIgnoreCase(string))
|
||||
{
|
||||
return rule;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ public class ShapesRenderer
|
||||
if (blockEntityRenderer != null)
|
||||
{
|
||||
blockEntityRenderer.render(BlockEntity, partialTick,
|
||||
matrices, immediate, light, OverlayTexture.NO_OVERLAY);
|
||||
matrices, immediate, light, OverlayTexture.NO_OVERLAY, camera1.getPosition());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user