mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 14:34:28 +00:00
Rendering patches (#5262)
This commit is contained in:
1 parent
0bfa76251d
commit
b3b8c78527
122 files changed
+2354
-2888
No files matched your search
@@ -305,14 +305,14 @@ public final class ModelDynBucket implements IUnbakedModel
|
||||
if (getResource(new ResourceLocation(ForgeVersion.MOD_ID, "textures/items/bucket_cover.png")) == null)
|
||||
{
|
||||
ResourceLocation bucketCover = new ResourceLocation(ForgeVersion.MOD_ID, "items/bucket_cover");
|
||||
BucketCoverSprite bucketCoverSprite = new BucketCoverSprite(getResource(bucketCover));
|
||||
BucketCoverSprite bucketCoverSprite = new BucketCoverSprite(bucketCover);
|
||||
// map.setTextureEntry(bucketCoverSprite);
|
||||
}
|
||||
|
||||
if (getResource(new ResourceLocation(ForgeVersion.MOD_ID, "textures/items/bucket_base.png")) == null)
|
||||
{
|
||||
ResourceLocation bucketBase = new ResourceLocation(ForgeVersion.MOD_ID, "items/bucket_base");
|
||||
BucketBaseSprite bucketBaseSprite = new BucketBaseSprite(getResource(bucketBase));
|
||||
BucketBaseSprite bucketBaseSprite = new BucketBaseSprite(bucketBase);
|
||||
// map.setTextureEntry(bucketBaseSprite);
|
||||
}
|
||||
}
|
||||
@@ -320,12 +320,12 @@ public final class ModelDynBucket implements IUnbakedModel
|
||||
|
||||
private static final class BucketBaseSprite extends TextureAtlasSprite
|
||||
{
|
||||
private final ResourceLocation bucket = new ResourceLocation("items/bucket_empty");
|
||||
private final ResourceLocation bucket = new ResourceLocation("item/bucket");
|
||||
private final ImmutableList<ResourceLocation> dependencies = ImmutableList.of(bucket);
|
||||
|
||||
private BucketBaseSprite(IResource resource)
|
||||
private BucketBaseSprite(ResourceLocation res)
|
||||
{
|
||||
super(resource.getLocation(), getSizeInfo(resource), resource.getMetadata(AnimationMetadataSection.SERIALIZER));
|
||||
super(res, getSizeInfo(getResource(new ResourceLocation("textures/item/bucket.png"))), getResource(new ResourceLocation("textures/item/bucket.png")).getMetadata(AnimationMetadataSection.SERIALIZER));
|
||||
}
|
||||
|
||||
/* TODO Custom TAS
|
||||
@@ -361,13 +361,13 @@ public final class ModelDynBucket implements IUnbakedModel
|
||||
*/
|
||||
private static final class BucketCoverSprite extends TextureAtlasSprite
|
||||
{
|
||||
private final ResourceLocation bucket = new ResourceLocation("items/bucket_empty");
|
||||
private final ResourceLocation bucketCoverMask = new ResourceLocation(ForgeVersion.MOD_ID, "items/vanilla_bucket_cover_mask");
|
||||
private final ResourceLocation bucket = new ResourceLocation("item/bucket");
|
||||
private final ResourceLocation bucketCoverMask = new ResourceLocation(ForgeVersion.MOD_ID, "item/vanilla_bucket_cover_mask");
|
||||
private final ImmutableList<ResourceLocation> dependencies = ImmutableList.of(bucket, bucketCoverMask);
|
||||
|
||||
private BucketCoverSprite(IResource resource)
|
||||
private BucketCoverSprite(ResourceLocation res)
|
||||
{
|
||||
super(resource.getLocation(), getSizeInfo(resource), resource.getMetadata(AnimationMetadataSection.SERIALIZER));
|
||||
super(res, getSizeInfo(getResource(new ResourceLocation("textures/item/bucket.png"))), getResource(new ResourceLocation("textures/item/bucket.png")).getMetadata(AnimationMetadataSection.SERIALIZER));
|
||||
}
|
||||
|
||||
/* TODO Custom TAS
|
||||
|
||||
@@ -1009,8 +1009,7 @@ public final class ModelLoader extends ModelBakery
|
||||
shapes.registerBlockWithStateMapper(e.getKey().get(), e.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<IRegistryDelegate<Item>, ItemMeshDefinition> customMeshDefinitions = com.google.common.collect.Maps.newHashMap();
|
||||
*/
|
||||
private static final Map<Pair<IRegistryDelegate<Item>, Integer>, ModelResourceLocation> customModels = com.google.common.collect.Maps.newHashMap();
|
||||
|
||||
/**
|
||||
@@ -1039,10 +1038,10 @@ public final class ModelLoader extends ModelBakery
|
||||
ModelLoader.setCustomMeshDefinition(item, stack -> ModelDynBucket.LOCATION);
|
||||
ModelBakery.registerItemVariants(item, ModelDynBucket.LOCATION);
|
||||
}
|
||||
|
||||
*/
|
||||
/**
|
||||
* Internal, do not use.
|
||||
*//*
|
||||
*/
|
||||
public static void onRegisterItems(ItemModelMesher mesher)
|
||||
{
|
||||
for (Entry<Pair<IRegistryDelegate<Item>, Integer>, ModelResourceLocation> e : customModels.entrySet())
|
||||
@@ -1050,7 +1049,7 @@ public final class ModelLoader extends ModelBakery
|
||||
mesher.register(e.getKey().getLeft().get(), e.getValue());
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
private static enum DefaultTextureGetter implements Function<ResourceLocation, TextureAtlasSprite>
|
||||
{
|
||||
INSTANCE;
|
||||
|
||||
@@ -167,7 +167,7 @@ public class VertexLighterFlat extends QuadGatheringTransformer
|
||||
float y = position[v][1] - .5f;
|
||||
float z = position[v][2] - .5f;
|
||||
|
||||
//if(blockInfo.getBlock().isFullCube())
|
||||
// if(blockInfo.getState().getBlock().isFullCube(blockInfo.getState()))
|
||||
{
|
||||
x += normal[v][0] * .5f;
|
||||
y += normal[v][1] * .5f;
|
||||
|
||||
Reference in new issue
Block a user