diff --git a/src/generated/resources/assets/create/blockstates/andesite_funnel.json b/src/generated/resources/assets/create/blockstates/andesite_funnel.json index 0161a1706..708f98831 100644 --- a/src/generated/resources/assets/create/blockstates/andesite_funnel.json +++ b/src/generated/resources/assets/create/blockstates/andesite_funnel.json @@ -7,16 +7,22 @@ "model": "create:block/andesite_funnel_floor_push" }, "extracting=false,face=wall,facing=north,powered=false": { - "model": "create:block/andesite_funnel_wall_pull" + "model": "create:block/andesite_funnel_wall_pull", + "x": 90 }, "extracting=true,face=wall,facing=north,powered=false": { - "model": "create:block/andesite_funnel_wall_push" + "model": "create:block/andesite_funnel_wall_push", + "x": 90 }, "extracting=false,face=ceiling,facing=north,powered=false": { - "model": "create:block/andesite_funnel_ceiling_pull" + "model": "create:block/andesite_funnel_ceiling_pull", + "x": 180, + "y": 180 }, "extracting=true,face=ceiling,facing=north,powered=false": { - "model": "create:block/andesite_funnel_ceiling_push" + "model": "create:block/andesite_funnel_ceiling_push", + "x": 180, + "y": 180 }, "extracting=false,face=floor,facing=south,powered=false": { "model": "create:block/andesite_funnel_floor_pull", @@ -28,19 +34,21 @@ }, "extracting=false,face=wall,facing=south,powered=false": { "model": "create:block/andesite_funnel_wall_pull", + "x": 90, "y": 180 }, "extracting=true,face=wall,facing=south,powered=false": { "model": "create:block/andesite_funnel_wall_push", + "x": 90, "y": 180 }, "extracting=false,face=ceiling,facing=south,powered=false": { "model": "create:block/andesite_funnel_ceiling_pull", - "y": 180 + "x": 180 }, "extracting=true,face=ceiling,facing=south,powered=false": { "model": "create:block/andesite_funnel_ceiling_push", - "y": 180 + "x": 180 }, "extracting=false,face=floor,facing=west,powered=false": { "model": "create:block/andesite_funnel_floor_pull", @@ -52,19 +60,23 @@ }, "extracting=false,face=wall,facing=west,powered=false": { "model": "create:block/andesite_funnel_wall_pull", + "x": 90, "y": 270 }, "extracting=true,face=wall,facing=west,powered=false": { "model": "create:block/andesite_funnel_wall_push", + "x": 90, "y": 270 }, "extracting=false,face=ceiling,facing=west,powered=false": { "model": "create:block/andesite_funnel_ceiling_pull", - "y": 270 + "x": 180, + "y": 90 }, "extracting=true,face=ceiling,facing=west,powered=false": { "model": "create:block/andesite_funnel_ceiling_push", - "y": 270 + "x": 180, + "y": 90 }, "extracting=false,face=floor,facing=east,powered=false": { "model": "create:block/andesite_funnel_floor_pull", @@ -76,19 +88,23 @@ }, "extracting=false,face=wall,facing=east,powered=false": { "model": "create:block/andesite_funnel_wall_pull", + "x": 90, "y": 90 }, "extracting=true,face=wall,facing=east,powered=false": { "model": "create:block/andesite_funnel_wall_push", + "x": 90, "y": 90 }, "extracting=false,face=ceiling,facing=east,powered=false": { "model": "create:block/andesite_funnel_ceiling_pull", - "y": 90 + "x": 180, + "y": 270 }, "extracting=true,face=ceiling,facing=east,powered=false": { "model": "create:block/andesite_funnel_ceiling_push", - "y": 90 + "x": 180, + "y": 270 }, "extracting=false,face=floor,facing=north,powered=true": { "model": "create:block/andesite_funnel_floor_pull_powered" @@ -97,16 +113,22 @@ "model": "create:block/andesite_funnel_floor_push_powered" }, "extracting=false,face=wall,facing=north,powered=true": { - "model": "create:block/andesite_funnel_wall_pull_powered" + "model": "create:block/andesite_funnel_wall_pull_powered", + "x": 90 }, "extracting=true,face=wall,facing=north,powered=true": { - "model": "create:block/andesite_funnel_wall_push_powered" + "model": "create:block/andesite_funnel_wall_push_powered", + "x": 90 }, "extracting=false,face=ceiling,facing=north,powered=true": { - "model": "create:block/andesite_funnel_ceiling_pull_powered" + "model": "create:block/andesite_funnel_ceiling_pull_powered", + "x": 180, + "y": 180 }, "extracting=true,face=ceiling,facing=north,powered=true": { - "model": "create:block/andesite_funnel_ceiling_push_powered" + "model": "create:block/andesite_funnel_ceiling_push_powered", + "x": 180, + "y": 180 }, "extracting=false,face=floor,facing=south,powered=true": { "model": "create:block/andesite_funnel_floor_pull_powered", @@ -118,19 +140,21 @@ }, "extracting=false,face=wall,facing=south,powered=true": { "model": "create:block/andesite_funnel_wall_pull_powered", + "x": 90, "y": 180 }, "extracting=true,face=wall,facing=south,powered=true": { "model": "create:block/andesite_funnel_wall_push_powered", + "x": 90, "y": 180 }, "extracting=false,face=ceiling,facing=south,powered=true": { "model": "create:block/andesite_funnel_ceiling_pull_powered", - "y": 180 + "x": 180 }, "extracting=true,face=ceiling,facing=south,powered=true": { "model": "create:block/andesite_funnel_ceiling_push_powered", - "y": 180 + "x": 180 }, "extracting=false,face=floor,facing=west,powered=true": { "model": "create:block/andesite_funnel_floor_pull_powered", @@ -142,19 +166,23 @@ }, "extracting=false,face=wall,facing=west,powered=true": { "model": "create:block/andesite_funnel_wall_pull_powered", + "x": 90, "y": 270 }, "extracting=true,face=wall,facing=west,powered=true": { "model": "create:block/andesite_funnel_wall_push_powered", + "x": 90, "y": 270 }, "extracting=false,face=ceiling,facing=west,powered=true": { "model": "create:block/andesite_funnel_ceiling_pull_powered", - "y": 270 + "x": 180, + "y": 90 }, "extracting=true,face=ceiling,facing=west,powered=true": { "model": "create:block/andesite_funnel_ceiling_push_powered", - "y": 270 + "x": 180, + "y": 90 }, "extracting=false,face=floor,facing=east,powered=true": { "model": "create:block/andesite_funnel_floor_pull_powered", @@ -166,19 +194,23 @@ }, "extracting=false,face=wall,facing=east,powered=true": { "model": "create:block/andesite_funnel_wall_pull_powered", + "x": 90, "y": 90 }, "extracting=true,face=wall,facing=east,powered=true": { "model": "create:block/andesite_funnel_wall_push_powered", + "x": 90, "y": 90 }, "extracting=false,face=ceiling,facing=east,powered=true": { "model": "create:block/andesite_funnel_ceiling_pull_powered", - "y": 90 + "x": 180, + "y": 270 }, "extracting=true,face=ceiling,facing=east,powered=true": { "model": "create:block/andesite_funnel_ceiling_push_powered", - "y": 90 + "x": 180, + "y": 270 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/create/blockstates/brass_funnel.json b/src/generated/resources/assets/create/blockstates/brass_funnel.json index 7458dae7c..23193c4df 100644 --- a/src/generated/resources/assets/create/blockstates/brass_funnel.json +++ b/src/generated/resources/assets/create/blockstates/brass_funnel.json @@ -7,16 +7,22 @@ "model": "create:block/brass_funnel_floor_push" }, "extracting=false,face=wall,facing=north,powered=false": { - "model": "create:block/brass_funnel_wall_pull" + "model": "create:block/brass_funnel_wall_pull", + "x": 90 }, "extracting=true,face=wall,facing=north,powered=false": { - "model": "create:block/brass_funnel_wall_push" + "model": "create:block/brass_funnel_wall_push", + "x": 90 }, "extracting=false,face=ceiling,facing=north,powered=false": { - "model": "create:block/brass_funnel_ceiling_pull" + "model": "create:block/brass_funnel_ceiling_pull", + "x": 180, + "y": 180 }, "extracting=true,face=ceiling,facing=north,powered=false": { - "model": "create:block/brass_funnel_ceiling_push" + "model": "create:block/brass_funnel_ceiling_push", + "x": 180, + "y": 180 }, "extracting=false,face=floor,facing=south,powered=false": { "model": "create:block/brass_funnel_floor_pull", @@ -28,19 +34,21 @@ }, "extracting=false,face=wall,facing=south,powered=false": { "model": "create:block/brass_funnel_wall_pull", + "x": 90, "y": 180 }, "extracting=true,face=wall,facing=south,powered=false": { "model": "create:block/brass_funnel_wall_push", + "x": 90, "y": 180 }, "extracting=false,face=ceiling,facing=south,powered=false": { "model": "create:block/brass_funnel_ceiling_pull", - "y": 180 + "x": 180 }, "extracting=true,face=ceiling,facing=south,powered=false": { "model": "create:block/brass_funnel_ceiling_push", - "y": 180 + "x": 180 }, "extracting=false,face=floor,facing=west,powered=false": { "model": "create:block/brass_funnel_floor_pull", @@ -52,19 +60,23 @@ }, "extracting=false,face=wall,facing=west,powered=false": { "model": "create:block/brass_funnel_wall_pull", + "x": 90, "y": 270 }, "extracting=true,face=wall,facing=west,powered=false": { "model": "create:block/brass_funnel_wall_push", + "x": 90, "y": 270 }, "extracting=false,face=ceiling,facing=west,powered=false": { "model": "create:block/brass_funnel_ceiling_pull", - "y": 270 + "x": 180, + "y": 90 }, "extracting=true,face=ceiling,facing=west,powered=false": { "model": "create:block/brass_funnel_ceiling_push", - "y": 270 + "x": 180, + "y": 90 }, "extracting=false,face=floor,facing=east,powered=false": { "model": "create:block/brass_funnel_floor_pull", @@ -76,19 +88,23 @@ }, "extracting=false,face=wall,facing=east,powered=false": { "model": "create:block/brass_funnel_wall_pull", + "x": 90, "y": 90 }, "extracting=true,face=wall,facing=east,powered=false": { "model": "create:block/brass_funnel_wall_push", + "x": 90, "y": 90 }, "extracting=false,face=ceiling,facing=east,powered=false": { "model": "create:block/brass_funnel_ceiling_pull", - "y": 90 + "x": 180, + "y": 270 }, "extracting=true,face=ceiling,facing=east,powered=false": { "model": "create:block/brass_funnel_ceiling_push", - "y": 90 + "x": 180, + "y": 270 }, "extracting=false,face=floor,facing=north,powered=true": { "model": "create:block/brass_funnel_floor_pull_powered" @@ -97,16 +113,22 @@ "model": "create:block/brass_funnel_floor_push_powered" }, "extracting=false,face=wall,facing=north,powered=true": { - "model": "create:block/brass_funnel_wall_pull_powered" + "model": "create:block/brass_funnel_wall_pull_powered", + "x": 90 }, "extracting=true,face=wall,facing=north,powered=true": { - "model": "create:block/brass_funnel_wall_push_powered" + "model": "create:block/brass_funnel_wall_push_powered", + "x": 90 }, "extracting=false,face=ceiling,facing=north,powered=true": { - "model": "create:block/brass_funnel_ceiling_pull_powered" + "model": "create:block/brass_funnel_ceiling_pull_powered", + "x": 180, + "y": 180 }, "extracting=true,face=ceiling,facing=north,powered=true": { - "model": "create:block/brass_funnel_ceiling_push_powered" + "model": "create:block/brass_funnel_ceiling_push_powered", + "x": 180, + "y": 180 }, "extracting=false,face=floor,facing=south,powered=true": { "model": "create:block/brass_funnel_floor_pull_powered", @@ -118,19 +140,21 @@ }, "extracting=false,face=wall,facing=south,powered=true": { "model": "create:block/brass_funnel_wall_pull_powered", + "x": 90, "y": 180 }, "extracting=true,face=wall,facing=south,powered=true": { "model": "create:block/brass_funnel_wall_push_powered", + "x": 90, "y": 180 }, "extracting=false,face=ceiling,facing=south,powered=true": { "model": "create:block/brass_funnel_ceiling_pull_powered", - "y": 180 + "x": 180 }, "extracting=true,face=ceiling,facing=south,powered=true": { "model": "create:block/brass_funnel_ceiling_push_powered", - "y": 180 + "x": 180 }, "extracting=false,face=floor,facing=west,powered=true": { "model": "create:block/brass_funnel_floor_pull_powered", @@ -142,19 +166,23 @@ }, "extracting=false,face=wall,facing=west,powered=true": { "model": "create:block/brass_funnel_wall_pull_powered", + "x": 90, "y": 270 }, "extracting=true,face=wall,facing=west,powered=true": { "model": "create:block/brass_funnel_wall_push_powered", + "x": 90, "y": 270 }, "extracting=false,face=ceiling,facing=west,powered=true": { "model": "create:block/brass_funnel_ceiling_pull_powered", - "y": 270 + "x": 180, + "y": 90 }, "extracting=true,face=ceiling,facing=west,powered=true": { "model": "create:block/brass_funnel_ceiling_push_powered", - "y": 270 + "x": 180, + "y": 90 }, "extracting=false,face=floor,facing=east,powered=true": { "model": "create:block/brass_funnel_floor_pull_powered", @@ -166,19 +194,23 @@ }, "extracting=false,face=wall,facing=east,powered=true": { "model": "create:block/brass_funnel_wall_pull_powered", + "x": 90, "y": 90 }, "extracting=true,face=wall,facing=east,powered=true": { "model": "create:block/brass_funnel_wall_push_powered", + "x": 90, "y": 90 }, "extracting=false,face=ceiling,facing=east,powered=true": { "model": "create:block/brass_funnel_ceiling_pull_powered", - "y": 90 + "x": 180, + "y": 270 }, "extracting=true,face=ceiling,facing=east,powered=true": { "model": "create:block/brass_funnel_ceiling_push_powered", - "y": 90 + "x": 180, + "y": 270 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/create/blockstates/radial_chassis.json b/src/generated/resources/assets/create/blockstates/radial_chassis.json index f97d8c8bc..8bd829ffc 100644 --- a/src/generated/resources/assets/create/blockstates/radial_chassis.json +++ b/src/generated/resources/assets/create/blockstates/radial_chassis.json @@ -89,8 +89,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "x" + "axis": "x", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -99,8 +99,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "y" + "axis": "y", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -109,8 +109,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "z" + "axis": "z", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky", @@ -119,8 +119,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "x" + "axis": "x", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -129,8 +129,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "y" + "axis": "y", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -139,8 +139,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "z" + "axis": "z", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_z", @@ -149,8 +149,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "x" + "axis": "x", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky" @@ -158,8 +158,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "y" + "axis": "y", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -168,8 +168,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "z" + "axis": "z", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -178,8 +178,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "x" + "axis": "x", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x" @@ -187,8 +187,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "y" + "axis": "y", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -197,8 +197,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "z" + "axis": "z", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -207,8 +207,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "x" + "axis": "x", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -217,8 +217,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "y" + "axis": "y", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -227,8 +227,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "z" + "axis": "z", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky" @@ -236,8 +236,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "x" + "axis": "x", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -246,8 +246,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "y" + "axis": "y", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -256,8 +256,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "z" + "axis": "z", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_z" diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index 70bc62853..fc9c251a2 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 7", + "_": "Missing Localizations: 11", "_": "->------------------------] Game Elements [------------------------<-", diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java index 84d8a878a..f03ef0947 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java @@ -6,8 +6,8 @@ import com.simibubi.create.foundation.render.backend.instancing.InstanceData; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.utility.ColorHelper; -import net.minecraft.client.renderer.Vector3f; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3f; public class KineticData> extends InstanceData { private float x; diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java b/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java index dcc5ca5f7..6176c132e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java @@ -5,8 +5,8 @@ import java.nio.ByteBuffer; import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; -import net.minecraft.client.renderer.Vector3f; import net.minecraft.util.Direction; +import net.minecraft.util.math.vector.Vector3f; public class RotatingData extends KineticData { public static VertexFormat FORMAT = VertexFormat.builder() diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/ContraptionActorData.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/ContraptionActorData.java index 56853e9d1..0f909783f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/ContraptionActorData.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/ContraptionActorData.java @@ -6,8 +6,8 @@ import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat; import com.simibubi.create.foundation.render.backend.instancing.InstanceData; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; -import net.minecraft.client.renderer.Vector3f; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Vector3f; public class ContraptionActorData extends InstanceData { public static VertexFormat FORMAT = VertexFormat.builder() diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java index f93fd9beb..2eb557510 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java @@ -32,7 +32,7 @@ public class NonStationaryLighter extends ContraptionLigh public GridAlignedBB getContraptionBounds() { GridAlignedBB bb = GridAlignedBB.fromAABB(contraption.bounds); - bb.translate(contraption.entity.getPosition()); + bb.translate(contraption.entity.getBlockPos()); return bb; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/OrientedContraptionEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/OrientedContraptionEntity.java index f33a4d678..f60e772ee 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/OrientedContraptionEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/OrientedContraptionEntity.java @@ -528,7 +528,7 @@ public class OrientedContraptionEntity extends AbstractContraptionEntity { @OnlyIn(Dist.CLIENT) private void repositionOnContraption(float partialTicks, MatrixStack[] matrixStacks, Entity ridingEntity) { - Vec3d pos = getContraptionOffset(partialTicks, ridingEntity); + Vector3d pos = getContraptionOffset(partialTicks, ridingEntity); for (MatrixStack stack : matrixStacks) stack.translate(pos.x, pos.y, pos.z); } @@ -537,36 +537,36 @@ public class OrientedContraptionEntity extends AbstractContraptionEntity { // has to adjust aswell @OnlyIn(Dist.CLIENT) private void repositionOnCart(float partialTicks, MatrixStack[] matrixStacks, Entity ridingEntity) { - Vec3d cartPos = getCartOffset(partialTicks, ridingEntity); + Vector3d cartPos = getCartOffset(partialTicks, ridingEntity); - if (cartPos == Vec3d.ZERO) return; + if (cartPos == Vector3d.ZERO) return; for (MatrixStack stack : matrixStacks) stack.translate(cartPos.x, cartPos.y, cartPos.z); } @OnlyIn(Dist.CLIENT) - private Vec3d getContraptionOffset(float partialTicks, Entity ridingEntity) { + private Vector3d getContraptionOffset(float partialTicks, Entity ridingEntity) { AbstractContraptionEntity parent = (AbstractContraptionEntity) ridingEntity; - Vec3d passengerPosition = parent.getPassengerPosition(this, partialTicks); + Vector3d passengerPosition = parent.getPassengerPosition(this, partialTicks); double x = passengerPosition.x - MathHelper.lerp(partialTicks, this.lastTickPosX, this.getX()); double y = passengerPosition.y - MathHelper.lerp(partialTicks, this.lastTickPosY, this.getY()); double z = passengerPosition.z - MathHelper.lerp(partialTicks, this.lastTickPosZ, this.getZ()); - return new Vec3d(x, y, z); + return new Vector3d(x, y, z); } @OnlyIn(Dist.CLIENT) - private Vec3d getCartOffset(float partialTicks, Entity ridingEntity) { + private Vector3d getCartOffset(float partialTicks, Entity ridingEntity) { AbstractMinecartEntity cart = (AbstractMinecartEntity) ridingEntity; double cartX = MathHelper.lerp(partialTicks, cart.lastTickPosX, cart.getX()); double cartY = MathHelper.lerp(partialTicks, cart.lastTickPosY, cart.getY()); double cartZ = MathHelper.lerp(partialTicks, cart.lastTickPosZ, cart.getZ()); - Vec3d cartPos = cart.getPos(cartX, cartY, cartZ); + Vector3d cartPos = cart.getPos(cartX, cartY, cartZ); if (cartPos != null) { - Vec3d cartPosFront = cart.getPosOffset(cartX, cartY, cartZ, (double) 0.3F); - Vec3d cartPosBack = cart.getPosOffset(cartX, cartY, cartZ, (double) -0.3F); + Vector3d cartPosFront = cart.getPosOffset(cartX, cartY, cartZ, (double) 0.3F); + Vector3d cartPosBack = cart.getPosOffset(cartX, cartY, cartZ, (double) -0.3F); if (cartPosFront == null) cartPosFront = cartPos; if (cartPosBack == null) @@ -576,9 +576,9 @@ public class OrientedContraptionEntity extends AbstractContraptionEntity { cartY = (cartPosFront.y + cartPosBack.y) / 2.0D - cartY; cartZ = cartPos.z - cartZ; - return new Vec3d(cartX, cartY, cartZ); + return new Vector3d(cartX, cartY, cartZ); } - return Vec3d.ZERO; + return Vector3d.ZERO; } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java index 1c8ffa5ed..96df45479 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.pi import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; import com.simibubi.create.foundation.render.backend.light.GridAlignedBB; -import net.minecraft.util.math.Vec3i; +import net.minecraft.util.math.vector.Vector3i; public class PistonLighter extends ContraptionLighter { public PistonLighter(PistonContraption contraption) { @@ -16,7 +16,7 @@ public class PistonLighter extends ContraptionLighter { bounds.translate(contraption.anchor); int length = contraption.extensionLength; - Vec3i direction = contraption.orientation.getDirectionVec(); + Vector3i direction = contraption.orientation.getDirectionVec(); int shift = length / 2; int shiftX = direction.getX() * shift; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java index 4714a30e3..1cb1d5478 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java @@ -19,7 +19,7 @@ public class PulleyLighter extends ContraptionLighter { World world = contraption.entity.world; - BlockPos.Mutable pos = new BlockPos.Mutable(contraption.anchor); + BlockPos.Mutable pos = contraption.anchor.mutableCopy(); while (!AllBlocks.ROPE_PULLEY.has(world.getBlockState(pos)) && pos.getY() < 256) { pos.move(0, 1, 0); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java index 7f0950ca0..a20137d53 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java @@ -4,9 +4,9 @@ import org.lwjgl.opengl.GL20; import com.simibubi.create.foundation.render.backend.gl.BasicProgram; -import net.minecraft.client.renderer.Matrix4f; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.vector.Matrix4f; public class ContraptionProgram extends BasicProgram { protected final int uLightBoxSize; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java index f26e5174b..3611eafc1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java @@ -35,7 +35,6 @@ import net.minecraft.client.renderer.BlockRendererDispatcher; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.LightTexture; -import net.minecraft.client.renderer.Matrix4f; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderTypeLookup; import net.minecraft.client.renderer.WorldRenderer; @@ -44,7 +43,8 @@ import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.SectionPos; -import net.minecraft.world.ILightReader; +import net.minecraft.util.math.vector.Matrix4f; +import net.minecraft.world.IBlockDisplayReader; import net.minecraft.world.LightType; import net.minecraft.world.World; import net.minecraft.world.gen.feature.template.Template; @@ -58,7 +58,7 @@ public class ContraptionRenderDispatcher { private static boolean firstLayer = true; - public static void notifyLightUpdate(ILightReader world, LightType type, SectionPos pos) { + public static void notifyLightUpdate(IBlockDisplayReader world, LightType type, SectionPos pos) { for (RenderedContraption renderer : renderers.values()) { renderer.getLighter().lightVolume.notifyLightUpdate(world, type, pos); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java index c86f70336..f178761fa 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java @@ -31,7 +31,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.BlockModelRenderer; import net.minecraft.client.renderer.BlockRendererDispatcher; import net.minecraft.client.renderer.BufferBuilder; -import net.minecraft.client.renderer.Matrix4f; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderTypeLookup; import net.minecraft.client.renderer.model.IBakedModel; @@ -41,6 +40,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.vector.Matrix4f; import net.minecraft.world.World; import net.minecraft.world.gen.feature.template.Template; import net.minecraft.world.lighting.WorldLightManager; diff --git a/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java index e2b97b148..6a7118cdd 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java @@ -12,7 +12,7 @@ import com.simibubi.create.foundation.render.backend.light.ILightListener; import net.minecraft.client.multiplayer.ClientChunkProvider; import net.minecraft.util.math.SectionPos; -import net.minecraft.world.ILightReader; +import net.minecraft.world.IBlockDisplayReader; import net.minecraft.world.LightType; import net.minecraft.world.chunk.AbstractChunkProvider; import net.minecraft.world.chunk.Chunk; @@ -48,6 +48,6 @@ public abstract class LightUpdateMixin extends AbstractChunkProvider { .forEach(ILightListener::onChunkLightUpdate); } - ContraptionRenderDispatcher.notifyLightUpdate((ILightReader) thi.getWorld(), type, pos); + ContraptionRenderDispatcher.notifyLightUpdate((IBlockDisplayReader) thi.getWorld(), type, pos); } } diff --git a/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java index 27f8173ce..2bf3bdde3 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java @@ -14,10 +14,10 @@ import com.simibubi.create.foundation.render.backend.Backend; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.render.backend.OptifineHandler; -import net.minecraft.client.renderer.Matrix4f; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.world.ClientWorld; +import net.minecraft.util.math.vector.Matrix4f; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; diff --git a/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java b/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java index 58e1746f2..7450e2fba 100644 --- a/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java @@ -11,11 +11,11 @@ import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRen import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.Matrix4f; import net.minecraft.client.renderer.RenderType; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Matrix4f; public class KineticRenderer extends InstancedTileRenderer { public static int MAX_ORIGIN_DISTANCE = 1000; @@ -42,7 +42,7 @@ public class KineticRenderer extends InstancedTileRenderer { if (renderViewEntity == null) return; - BlockPos renderViewPosition = renderViewEntity.getPosition(); + BlockPos renderViewPosition = renderViewEntity.getBlockPos(); int dX = Math.abs(renderViewPosition.getX() - originCoordinate.getX()); int dY = Math.abs(renderViewPosition.getY() - originCoordinate.getY()); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java b/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java index 6a416b187..6b57a970a 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java @@ -182,7 +182,7 @@ public class Backend { private static GlShader loadShader(IResourceManager manager, ResourceLocation name, ShaderType type, GlShader.PreProcessor preProcessor) throws IOException { try (InputStream is = new BufferedInputStream(manager.getResource(name).getInputStream())) { - String source = TextureUtil.func_225687_b_(is); + String source = TextureUtil.readAllToString(is); if (source == null) { throw new IOException("Could not load program " + name); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java b/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java index 17f504ab8..e46e92ecd 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java @@ -15,13 +15,13 @@ import com.simibubi.create.foundation.utility.WorldAttached; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.renderer.GameRenderer; -import net.minecraft.client.renderer.Matrix4f; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.Vector3f; import net.minecraft.client.world.ClientWorld; import net.minecraft.potion.Effects; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.vector.Matrix4f; +import net.minecraft.util.math.vector.Vector3f; import net.minecraft.world.World; public class FastRenderDispatcher { @@ -73,11 +73,11 @@ public class FastRenderDispatcher { layer.startDrawing(); - RenderSystem.enableDepthTest(); - RenderSystem.enableCull(); - GL11.glCullFace(GL11.GL_BACK); +// RenderSystem.enableDepthTest(); +// RenderSystem.enableCull(); +// GL11.glCullFace(GL11.GL_BACK); CreateClient.kineticRenderer.render(layer, viewProjection, cameraX, cameraY, cameraZ); - RenderSystem.disableCull(); +// RenderSystem.disableCull(); //RenderSystem.disableDepthTest(); layer.endDrawing(); @@ -93,7 +93,9 @@ public class FastRenderDispatcher { ClientPlayerEntity player = mc.player; MatrixStack matrixstack = new MatrixStack(); - matrixstack.peek().getModel().multiply(gameRenderer.func_228382_a_(gameRenderer.getActiveRenderInfo(), partialTicks, true)); + matrixstack.peek() + .getModel() + .multiply(gameRenderer.getBasicProjectionMatrix(gameRenderer.getActiveRenderInfo(), partialTicks, true)); gameRenderer.bobViewWhenHurt(matrixstack, partialTicks); if (mc.gameSettings.viewBobbing) { gameRenderer.bobView(matrixstack, partialTicks); @@ -116,7 +118,7 @@ public class FastRenderDispatcher { } Matrix4f matrix4f = matrixstack.peek().getModel(); - gameRenderer.func_228379_a_(matrix4f); + gameRenderer.loadProjectionMatrix(matrix4f); projectionMatrixThisFrame = matrix4f; return projectionMatrixThisFrame; diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/BasicProgram.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/BasicProgram.java index 8d6f71711..87310a2c1 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/BasicProgram.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/BasicProgram.java @@ -6,8 +6,8 @@ import com.simibubi.create.foundation.render.backend.Backend; import com.simibubi.create.foundation.render.backend.gl.shader.GlProgram; import com.simibubi.create.foundation.utility.AnimationTickHolder; -import net.minecraft.client.renderer.Matrix4f; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.vector.Matrix4f; public class BasicProgram extends GlProgram { protected final int uTime; diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java index 055e5dac7..27abf4df8 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java @@ -13,11 +13,11 @@ import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.WorldAttached; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.Matrix4f; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.world.ClientWorld; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.vector.Matrix4f; public abstract class InstancedTileRenderer

{ public static WorldAttached> addedLastTick = new WorldAttached<>(ConcurrentHashMap::new); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/RenderMaterial.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/RenderMaterial.java index bfdd3fd4e..f9df29f94 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/RenderMaterial.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/RenderMaterial.java @@ -28,10 +28,10 @@ import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.BlockRendererDispatcher; import net.minecraft.client.renderer.BufferBuilder; -import net.minecraft.client.renderer.Matrix4f; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.util.Direction; +import net.minecraft.util.math.vector.Matrix4f; public class RenderMaterial

> { diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/light/GridAlignedBB.java b/src/main/java/com/simibubi/create/foundation/render/backend/light/GridAlignedBB.java index 707efc0bd..78732ee81 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/light/GridAlignedBB.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/light/GridAlignedBB.java @@ -7,7 +7,7 @@ import com.simibubi.create.foundation.render.RenderMath; import net.minecraft.util.Direction; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.SectionPos; -import net.minecraft.util.math.Vec3i; +import net.minecraft.util.math.vector.Vector3i; public class GridAlignedBB { public int minX; @@ -93,7 +93,7 @@ public class GridAlignedBB { minZ == maxZ; } - public void translate(Vec3i by) { + public void translate(Vector3i by) { translate(by.getX(), by.getY(), by.getZ()); } @@ -107,7 +107,7 @@ public class GridAlignedBB { } public void mirrorAbout(Direction.Axis axis) { - Vec3i axisVec = Direction.getFacingFromAxis(Direction.AxisDirection.POSITIVE, axis).getDirectionVec(); + Vector3i axisVec = Direction.getFacingFromAxis(Direction.AxisDirection.POSITIVE, axis).getDirectionVec(); int flipX = axisVec.getX() - 1; int flipY = axisVec.getY() - 1; int flipZ = axisVec.getZ() - 1; diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java b/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java index 143964ba5..84bef0cf7 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java @@ -14,7 +14,8 @@ import com.simibubi.create.foundation.render.backend.gl.GlTexture; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.SectionPos; -import net.minecraft.world.ILightReader; +import net.minecraft.world.IBlockDisplayReader; +import net.minecraft.world.IWorldReader; import net.minecraft.world.LightType; public class LightVolume { @@ -97,7 +98,7 @@ public class LightVolume { return textureVolume.sizeZ(); } - public void move(ILightReader world, GridAlignedBB newSampleVolume) { + public void move(IBlockDisplayReader world, GridAlignedBB newSampleVolume) { if (textureVolume.contains(newSampleVolume)) { if (newSampleVolume.intersects(sampleVolume)) { GridAlignedBB newArea = newSampleVolume.intersect(sampleVolume); @@ -118,7 +119,7 @@ public class LightVolume { } } - public void notifyLightUpdate(ILightReader world, LightType type, SectionPos location) { + public void notifyLightUpdate(IBlockDisplayReader world, LightType type, SectionPos location) { GridAlignedBB changedVolume = GridAlignedBB.fromSection(location); if (!changedVolume.intersects(sampleVolume)) return; @@ -132,7 +133,7 @@ public class LightVolume { * Completely (re)populate this volume with block and sky lighting data. * This is expensive and should be avoided. */ - public void initialize(ILightReader world) { + public void initialize(IBlockDisplayReader world) { BlockPos.Mutable pos = new BlockPos.Mutable(); int shiftX = textureVolume.minX; @@ -155,7 +156,7 @@ public class LightVolume { * Copy block light from the world into this volume. * @param worldVolume the region in the world to copy data from. */ - public void copyBlock(ILightReader world, GridAlignedBB worldVolume) { + public void copyBlock(IBlockDisplayReader world, GridAlignedBB worldVolume) { BlockPos.Mutable pos = new BlockPos.Mutable(); int xShift = textureVolume.minX; @@ -177,7 +178,7 @@ public class LightVolume { * Copy sky light from the world into this volume. * @param worldVolume the region in the world to copy data from. */ - public void copySky(ILightReader world, GridAlignedBB worldVolume) { + public void copySky(IBlockDisplayReader world, GridAlignedBB worldVolume) { BlockPos.Mutable pos = new BlockPos.Mutable(); int xShift = textureVolume.minX; @@ -199,7 +200,7 @@ public class LightVolume { * Copy all light from the world into this volume. * @param worldVolume the region in the world to copy data from. */ - public void copyLight(ILightReader world, GridAlignedBB worldVolume) { + public void copyLight(IBlockDisplayReader world, GridAlignedBB worldVolume) { BlockPos.Mutable pos = new BlockPos.Mutable(); int xShift = textureVolume.minX; diff --git a/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java b/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java index 4035891ed..bfaef8b36 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java @@ -6,8 +6,6 @@ import javax.annotation.Nullable; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ActiveRenderInfo; -import net.minecraft.client.renderer.Quaternion; -import net.minecraft.client.renderer.Vector3f; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.nbt.DoubleNBT; @@ -16,7 +14,9 @@ import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.vector.Quaternion; import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.math.vector.Vector3f; import net.minecraft.util.math.vector.Vector3i; public class VecHelper { @@ -152,11 +152,11 @@ public class VecHelper { } //https://forums.minecraftforge.net/topic/88562-116solved-3d-to-2d-conversion/?do=findComment&comment=413573 slightly modified - public static Vec3d projectToPlayerView(Vec3d target, float partialTicks) { + public static Vector3d projectToPlayerView(Vector3d target, float partialTicks) { /* The (centered) location on the screen of the given 3d point in the world. * Result is (dist right of center screen, dist up from center screen, if < 0, then in front of view plane) */ ActiveRenderInfo ari = Minecraft.getInstance().gameRenderer.getActiveRenderInfo(); - Vec3d camera_pos = ari.getProjectedView(); + Vector3d camera_pos = ari.getProjectedView(); Quaternion camera_rotation_conj = ari.getRotation().copy(); camera_rotation_conj.conjugate(); @@ -196,7 +196,7 @@ public class VecHelper { float half_height = (float) mc.getWindow().getScaledHeight() / 2; float scale_factor = half_height / (result3f.getZ() * (float) Math.tan(Math.toRadians(fov / 2))); - return new Vec3d(-result3f.getX() * scale_factor, result3f.getY() * scale_factor, result3f.getZ()); + return new Vector3d(-result3f.getX() * scale_factor, result3f.getY() * scale_factor, result3f.getZ()); } } diff --git a/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockRenderer.java b/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockRenderer.java index 361f524bb..4bd7af59a 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockRenderer.java @@ -18,11 +18,8 @@ import com.simibubi.create.foundation.utility.VirtualEmptyModelData; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.BlockRendererDispatcher; -import net.minecraft.client.renderer.Matrix4f; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderTypeLookup; -import net.minecraft.client.renderer.Vector3f; -import net.minecraft.client.renderer.Vector4f; import net.minecraft.client.renderer.model.BakedQuad; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.texture.OverlayTexture; @@ -30,7 +27,10 @@ import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; -import net.minecraft.util.math.Vec3i; +import net.minecraft.util.math.vector.Matrix4f; +import net.minecraft.util.math.vector.Vector3f; +import net.minecraft.util.math.vector.Vector3i; +import net.minecraft.util.math.vector.Vector4f; public abstract class GhostBlockRenderer { @@ -56,7 +56,7 @@ public abstract class GhostBlockRenderer { IBakedModel model = dispatcher.getModelForState(params.state); - RenderType layer = RenderTypeLookup.getEntityBlockLayer(params.state); + RenderType layer = RenderTypeLookup.getEntityBlockLayer(params.state, false); IVertexBuilder vb = buffer.getEarlyBuffer(layer); BlockPos pos = params.pos; @@ -138,7 +138,7 @@ public abstract class GhostBlockRenderer { //IVertexBuilder static void quad(float alpha, IVertexBuilder vb, MatrixStack.Entry p_227890_1_, BakedQuad p_227890_2_, float[] p_227890_3_, float p_227890_4_, float p_227890_5_, float p_227890_6_, int[] p_227890_7_, int p_227890_8_) { int[] aint = p_227890_2_.getVertexData(); - Vec3i vec3i = p_227890_2_.getFace().getDirectionVec(); + Vector3i vec3i = p_227890_2_.getFace().getDirectionVec(); Vector3f vector3f = new Vector3f((float) vec3i.getX(), (float) vec3i.getY(), (float) vec3i.getZ()); Matrix4f matrix4f = p_227890_1_.getModel(); vector3f.transform(p_227890_1_.getNormal()); diff --git a/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java b/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java index 92ce7983d..054379b70 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java +++ b/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java @@ -26,7 +26,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.vector.Vector3d; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.event.RenderGameOverlayEvent; @@ -178,15 +178,15 @@ public class PlacementHelpers { float b = .8f; float a = progress * progress; - Vec3d projTarget = VecHelper.projectToPlayerView(VecHelper.getCenterOf(lastTarget), partialTicks); + Vector3d projTarget = VecHelper.projectToPlayerView(VecHelper.getCenterOf(lastTarget), partialTicks); - Vec3d target = new Vec3d(projTarget.x, projTarget.y, 0); + Vector3d target = new Vector3d(projTarget.x, projTarget.y, 0); if (projTarget.z > 0) { target = target.inverse(); } - Vec3d norm = target.normalize(); - Vec3d ref = new Vec3d(0, 1, 0); + Vector3d norm = target.normalize(); + Vector3d ref = new Vector3d(0, 1, 0); float targetAngle = AngleHelper.deg(Math.acos(norm.dotProduct(ref))); angle.withSpeed(0.25f); diff --git a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/WrappedChunkProvider.java b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/WrappedChunkProvider.java index f6a22d102..0b6b52854 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/WrappedChunkProvider.java +++ b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/WrappedChunkProvider.java @@ -2,7 +2,6 @@ package com.simibubi.create.foundation.utility.worldWrappers; import java.util.HashMap; import java.util.Map; -import java.util.function.BooleanSupplier; import java.util.stream.Stream; import javax.annotation.Nullable; @@ -66,11 +65,6 @@ public class WrappedChunkProvider extends AbstractChunkProvider { return chunk; } - @Override - public void tick(BooleanSupplier p_217207_1_) { - - } - @Override public String makeString() { return "WrappedChunkProvider"; diff --git a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/chunk/WrappedChunk.java b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/chunk/WrappedChunk.java index c6904537d..62a2a6060 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/chunk/WrappedChunk.java +++ b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/chunk/WrappedChunk.java @@ -15,7 +15,7 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; import net.minecraft.fluid.Fluid; -import net.minecraft.fluid.IFluidState; +import net.minecraft.fluid.FluidState; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; @@ -27,6 +27,7 @@ import net.minecraft.world.chunk.ChunkSection; import net.minecraft.world.chunk.ChunkStatus; import net.minecraft.world.chunk.IChunk; import net.minecraft.world.gen.Heightmap; +import net.minecraft.world.gen.feature.structure.Structure; import net.minecraft.world.gen.feature.structure.StructureStart; public class WrappedChunk implements IChunk { @@ -122,16 +123,6 @@ public class WrappedChunk implements IChunk { } - @Override - public Map getStructureStarts() { - return null; - } - - @Override - public void setStructureStarts(Map p_201612_1_) { - - } - @Nullable @Override public BiomeContainer getBiomeArray() { @@ -221,39 +212,49 @@ public class WrappedChunk implements IChunk { return world.getBlockState(pos); } - @Override - public IFluidState getFluidState(BlockPos pos) { - return null; - } + @Override + public FluidState getFluidState(BlockPos p_204610_1_) { + return null; + } - @Nullable - @Override - public StructureStart getStructureStart(String p_201585_1_) { - return null; - } + @Override + public void addStructureReference(Structure arg0, long arg1) { + + } - @Override - public void putStructureStart(String p_201584_1_, StructureStart p_201584_2_) { + @Override + public Map, LongSet> getStructureReferences() { + return null; + } - } + @Override + public LongSet getStructureReferences(Structure arg0) { + return null; + } - @Override - public LongSet getStructureReferences(String p_201578_1_) { - return null; - } + @Override + public StructureStart getStructureStart(Structure arg0) { + return null; + } - @Override - public void addStructureReference(String p_201583_1_, long p_201583_2_) { + @Override + public void setStructureReferences(Map, LongSet> arg0) { + + } - } + @Override + public void setStructureStart(Structure arg0, StructureStart arg1) { + + } - @Override - public Map getStructureReferences() { - return null; - } + @Override + public void setStructureStarts(Map, StructureStart> p_201612_1_) { + + } - @Override - public void setStructureReferences(Map p_201606_1_) { + @Override + public Map, StructureStart> getStructureStarts() { + return null; + } - } }