More Rendering Fixes
This commit is contained in:
@@ -408,6 +408,7 @@ public class CubeBuilder
|
||||
if( e.getIndex() == 0 )
|
||||
{
|
||||
builder.put( i, u, v );
|
||||
break;
|
||||
}
|
||||
else if( e.getIndex() == 2 && renderFullBright )
|
||||
{
|
||||
@@ -416,8 +417,8 @@ public class CubeBuilder
|
||||
final float lightMapU = (float) ( 15 * 0x20 ) / 0xFFFF;
|
||||
final float lightMapV = (float) ( 15 * 0x20 ) / 0xFFFF;
|
||||
builder.put( i, lightMapU, lightMapV );
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
builder.put( i );
|
||||
break;
|
||||
|
||||
@@ -117,6 +117,6 @@ class CraftingCubeModel implements IModelGeometry<CraftingCubeModel>
|
||||
|
||||
private static Material texture( String name )
|
||||
{
|
||||
return new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, new ResourceLocation(AppEng.MOD_ID, "blocks/crafting/" + name));
|
||||
return new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, new ResourceLocation(AppEng.MOD_ID, "block/crafting/" + name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@ package appeng.client.render.effects;
|
||||
|
||||
import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.sun.javafx.geom.Vec3f;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.particles.IParticleData;
|
||||
import net.minecraft.particles.ParticleType;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -14,9 +14,9 @@ import java.util.Locale;
|
||||
*/
|
||||
public class LightningArcParticleData implements IParticleData {
|
||||
|
||||
public final Vec3f target;
|
||||
public final Vec3d target;
|
||||
|
||||
public LightningArcParticleData(Vec3f target) {
|
||||
public LightningArcParticleData(Vec3d target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class LightningArcParticleData implements IParticleData {
|
||||
float y = reader.readFloat();
|
||||
reader.expect(' ');
|
||||
float z = reader.readFloat();
|
||||
return new LightningArcParticleData(new Vec3f(x, y, z));
|
||||
return new LightningArcParticleData(new Vec3d(x, y, z));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -37,7 +37,7 @@ public class LightningArcParticleData implements IParticleData {
|
||||
float x = buffer.readFloat();
|
||||
float y = buffer.readFloat();
|
||||
float z = buffer.readFloat();
|
||||
return new LightningArcParticleData(new Vec3f(x, y, z));
|
||||
return new LightningArcParticleData(new Vec3d(x, y, z));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -48,9 +48,9 @@ public class LightningArcParticleData implements IParticleData {
|
||||
|
||||
@Override
|
||||
public void write(PacketBuffer buffer) {
|
||||
buffer.writeFloat(target.x);
|
||||
buffer.writeFloat(target.y);
|
||||
buffer.writeFloat(target.z);
|
||||
buffer.writeFloat((float) target.x);
|
||||
buffer.writeFloat((float) target.y);
|
||||
buffer.writeFloat((float) target.z);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -160,7 +160,7 @@ public class AutoRotatingBakedModel implements IBakedModel
|
||||
|
||||
if( forward == null || up == null )
|
||||
{
|
||||
return this.parent.getQuads( state, side, rand );
|
||||
return this.parent.getQuads( state, side, rand, extraData );
|
||||
}
|
||||
|
||||
// The model has other properties than just forward/up, so it would cause our cache to inadvertendly also cache
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
package appeng.client.render.model;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import net.minecraft.client.renderer.model.*;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class AutoRotatingModel implements IModelGeometry<AutoRotatingModel> {
|
||||
|
||||
private final BlockModel blockModel;
|
||||
|
||||
public AutoRotatingModel(BlockModel blockModel) {
|
||||
this.blockModel = blockModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery, Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform, ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
return new AutoRotatingBakedModel(
|
||||
this.blockModel.bakeModel(bakery, this.blockModel, spriteGetter, modelTransform, modelLocation, true)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner, Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return this.blockModel.getTextures(modelGetter, missingTextureErrors);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package appeng.client.render.model;
|
||||
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonObject;
|
||||
import net.minecraft.client.renderer.model.BlockModel;
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
import net.minecraftforge.client.model.IModelLoader;
|
||||
|
||||
public class AutoRotatingModelLoader implements IModelLoader<AutoRotatingModel> {
|
||||
|
||||
public static final AutoRotatingModelLoader INSTANCE = new AutoRotatingModelLoader();
|
||||
|
||||
@Override
|
||||
public void onResourceManagerReload(IResourceManager resourceManager) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AutoRotatingModel read(JsonDeserializationContext deserializationContext, JsonObject modelContents) {
|
||||
modelContents.remove("loader");
|
||||
BlockModel blockModel = deserializationContext.deserialize(modelContents, BlockModel.class);
|
||||
return new AutoRotatingModel(blockModel);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class SpatialPylonModel implements IModelGeometry<SpatialPylonModel>
|
||||
|
||||
private static Material getTexturePath( SpatialPylonTextureType type )
|
||||
{
|
||||
return new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, new ResourceLocation( AppEng.MOD_ID, "blocks/spatial_pylon/" + type.name().toLowerCase() ) );
|
||||
return new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, new ResourceLocation( AppEng.MOD_ID, "block/spatial_pylon/" + type.name().toLowerCase() ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public final class InscriberTESR extends TileEntityRenderer<TileInscriber>
|
||||
|
||||
private static final float ITEM_RENDER_SCALE = 1.0f / 1.2f;
|
||||
|
||||
private static final ResourceLocation TEXTURE_INSIDE = new ResourceLocation( AppEng.MOD_ID, "blocks/inscriber_inside" );
|
||||
private static final ResourceLocation TEXTURE_INSIDE = new ResourceLocation( AppEng.MOD_ID, "block/inscriber_inside" );
|
||||
|
||||
private static TextureAtlasSprite textureInside;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user