Add non working achievements

This commit is contained in:
Andrew-71 2023-10-21 17:19:40 +03:00
parent 78f9b80861
commit 24e5854d8c
11 changed files with 249 additions and 101 deletions

View file

@ -31,15 +31,6 @@ public class NewSovietClient implements ClientModInitializer {
BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.VINTAGE_IRON_BARS, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.BARBED_WIRE, RenderLayer.getCutout());
// TODO: Needed?
BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.RED_CONCRETE_WITH_BARS, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.GREEN_CONCRETE_WITH_BARS, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.WHITE_CONCRETE_WITH_BARS, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.BEIGE_CONCRETE_WITH_BARS, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.YELLOW_CONCRETE_WITH_BARS, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.BLUE_CONCRETE_WITH_BARS, RenderLayer.getCutout());
// BlockEntityRendererRegistry.register(NSE_Custom.TV_BLOCK_ENTITY, TVBlockEntityRenderer::new);
BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.TV, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.RED_TV, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.BROWN_TV, RenderLayer.getCutout());

View file

@ -1,57 +0,0 @@
package su.a71.new_soviet;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.BlockState;
import net.minecraft.block.SignBlock;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.RotationAxis;
import net.minecraft.util.math.Vec3d;
import su.a71.new_soviet.entities.TVBlockEntity;
@Environment(EnvType.CLIENT)
public class TVBlockEntityRenderer implements BlockEntityRenderer<TVBlockEntity> {
// private static TextRenderer textRenderer;
private static final Vec3d TEXT_OFFSET = new Vec3d(0.0, 0.3333333432674408, 0.046666666865348816);
public TVBlockEntityRenderer(BlockEntityRendererFactory.Context ctx) {
// textRenderer = ctx.getTextRenderer();
}
@Override
public void render(TVBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
matrices.push();
// Rendering stuff here
// this.setTextAngles(matrices, true, TEXT_OFFSET);
// textRenderer.draw("Test amogus", 0, 0, 999999, false, matrices.peek().getPositionMatrix(), vertexConsumers, TextRenderer.TextLayerType.POLYGON_OFFSET, 19999, light);
matrices.pop();
}
public float getScale() {
return 0.6666667F;
}
void setAngles(MatrixStack matrices, float rotationDegrees, BlockState state) {
matrices.translate(0.5F, 0.75F * this.getScale(), 0.5F);
matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(rotationDegrees));
if (!(state.getBlock() instanceof SignBlock)) {
matrices.translate(0.0F, -0.3125F, -0.4375F);
}
}
private void setTextAngles(MatrixStack matrices, boolean front, Vec3d translation) {
if (!front) {
matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(180.0F));
}
float f = 0.015625F * this.getScale();
matrices.translate(translation.x, translation.y, translation.z);
matrices.scale(f, -f, f);
}
}