Render at both directions
Changes to be committed: modified: src/main/java/org/dimdev/dimdoors/client/EntranceRiftBlockEntityRenderer.java deleted: src/main/java/org/dimdev/dimdoors/util/AnnotatedNbt.java
This commit is contained in:
parent
3028c6d848
commit
f3aac93d68
2 changed files with 8 additions and 60 deletions
|
@ -105,26 +105,26 @@ public class EntranceRiftBlockEntityRenderer extends BlockEntityRenderer<Entranc
|
|||
case NORTH:
|
||||
// South
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F + 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, r, g, b);
|
||||
// North
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F + 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, r, g, b);
|
||||
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F + 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, r, g, b);
|
||||
break;
|
||||
case SOUTH:
|
||||
// South
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F + 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, r, g, b);
|
||||
// North
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F + 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, r, g, b);
|
||||
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F + 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, r, g, b);
|
||||
break;
|
||||
case EAST:
|
||||
// East
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 1.0F, 0.0F + 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, g, b);
|
||||
// West
|
||||
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F + 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, g, b);
|
||||
break;
|
||||
case WEST:
|
||||
// East
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F + 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, g, b);
|
||||
// West
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 0.0F, 1.0F + 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, g, b);
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F + 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, g, b);
|
||||
|
||||
this.drawVertices(blockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 1.0F, 0.0F + 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, r, g, b);
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError();
|
||||
|
@ -150,12 +150,5 @@ public class EntranceRiftBlockEntityRenderer extends BlockEntityRenderer<Entranc
|
|||
vertexConsumer.vertex(matrix4f, x2, y1, z2).color(red, green, blue, 1.0F).next();
|
||||
vertexConsumer.vertex(matrix4f, x2, y2, z3).color(red, green, blue, 1.0F).next();
|
||||
vertexConsumer.vertex(matrix4f, x1, y2, z4).color(red, green, blue, 1.0F).next();
|
||||
// if (direction == endPortalBlockEntity.getOrientation() || direction.getOpposite() == endPortalBlockEntity.getOrientation()) {
|
||||
// float offset = direction == endPortalBlockEntity.getOrientation() ? 0.5F : -0.5F;
|
||||
// vertexConsumer.vertex(matrix4f, x1, y1, z1 + offset).color(red, green, blue, 1.0F).next();
|
||||
// vertexConsumer.vertex(matrix4f, x2, y1, z2 + offset).color(red, green, blue, 1.0F).next();
|
||||
// vertexConsumer.vertex(matrix4f, x2, y2, z3 + offset).color(red, green, blue, 1.0F).next();
|
||||
// vertexConsumer.vertex(matrix4f, x1, y2, z4 + offset).color(red, green, blue, 1.0F).next();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
package org.dimdev.dimdoors.util;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.mojang.serialization.Dynamic;
|
||||
import com.mojang.serialization.JsonOps;
|
||||
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.NbtOps;
|
||||
import net.minecraft.nbt.Tag;
|
||||
|
||||
public final class AnnotatedNbt {
|
||||
public static Gson gson = new Gson();
|
||||
|
||||
public static <T> T deserialize(Class<RotatedLocation> rotatedLocationClass, CompoundTag tag) {
|
||||
return null; // TODO
|
||||
}
|
||||
|
||||
public static CompoundTag serialize(Object object) {
|
||||
return null; // TODO
|
||||
}
|
||||
|
||||
public static void load(Object object, CompoundTag tag) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
public static void save(Object object, CompoundTag tag) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
public static void fromTag(Object playerRiftPointer, CompoundTag nbt) {
|
||||
|
||||
}
|
||||
|
||||
public static CompoundTag toTag(Object object, CompoundTag nbt) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Tag toTag(Object obj) {
|
||||
return new Dynamic<>(JsonOps.INSTANCE, gson.toJsonTree(obj)).convert(NbtOps.INSTANCE).getValue();
|
||||
}
|
||||
|
||||
public static Object fromTag(Class<?> clazz, Tag nbt) {
|
||||
return gson.fromJson(new Dynamic<>(NbtOps.INSTANCE, nbt).convert(JsonOps.INSTANCE).getValue(), clazz);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue