Working in part placement
This commit is contained in:
@@ -21,8 +21,8 @@ package appeng.thirdparty.codechicken.lib.model;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormatElement;
|
||||
import net.minecraft.client.render.VertexFormat;
|
||||
import net.minecraft.client.render.VertexFormatElement;
|
||||
|
||||
/**
|
||||
* A simple VertexFormat cache. This caches the existence of attributes and
|
||||
@@ -73,7 +73,7 @@ public class CachedFormat {
|
||||
this.elementCount = format.getElements().size();
|
||||
for (int i = 0; i < this.elementCount; i++) {
|
||||
VertexFormatElement element = format.getElements().get(i);
|
||||
switch (element.getUsage()) {
|
||||
switch (element.getType()) {
|
||||
case POSITION:
|
||||
if (this.hasPosition) {
|
||||
throw new IllegalStateException("Found 2 position elements..");
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
package appeng.thirdparty.codechicken.lib.model;
|
||||
|
||||
import net.minecraft.client.render.VertexFormats;
|
||||
import net.minecraft.client.util.math.Vector3f;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.render.VertexFormat;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
@@ -275,7 +275,7 @@ public class Quad implements IVertexProducer, ISmartVertexConsumer {
|
||||
* @return The BakedQuad.
|
||||
*/
|
||||
public BakedQuad bake() {
|
||||
if (format.format != DefaultVertexFormats.BLOCK) {
|
||||
if (format.format != VertexFormats.POSITION_COLOR_TEXTURE_LIGHT_NORMAL) {
|
||||
throw new IllegalStateException("Unable to bake this quad to the specified format. " + format.format);
|
||||
}
|
||||
int[] packedData = new int[this.format.format.getSize()];
|
||||
|
||||
+1
-2
@@ -25,9 +25,8 @@ import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.render.VertexFormat;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.client.model.pipeline.IVertexConsumer;
|
||||
|
||||
import appeng.thirdparty.codechicken.lib.model.CachedFormat;
|
||||
import appeng.thirdparty.codechicken.lib.model.ISmartVertexConsumer;
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ package appeng.thirdparty.codechicken.lib.model.pipeline;
|
||||
import javax.annotation.OverridingMethodsMustInvokeSuper;
|
||||
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.render.VertexFormat;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.client.model.pipeline.IVertexConsumer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user