mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 05:02:18 +00:00
Fix most of the compile errors in the client package (#5137)
* Add KeyBinding#getKey and clean up errors in KeyModifier * Add dimension IRenderHandler patches * Fix most of the compile errors in client package. The rest are missing Block/KeyBinding patches * Disable selective reloads until configs are finished * Add OnlyIn on IForgeDimension to match those of Dimension
This commit is contained in:
1 parent
a0cef07a0b
commit
949a62a0da
13 files changed
+163
-91
No files matched your search
@@ -439,32 +439,28 @@ public final class ModelDynBucket implements IUnbakedModel
|
||||
@Override
|
||||
public IBakedModel func_209581_a(IBakedModel originalModel, ItemStack stack, @Nullable World world, @Nullable EntityLivingBase entity)
|
||||
{
|
||||
FluidStack fluidStack = FluidUtil.getFluidContained(stack);
|
||||
return FluidUtil.getFluidContained(stack)
|
||||
.map(fluidStack -> {
|
||||
BakedDynBucket model = (BakedDynBucket)originalModel;
|
||||
|
||||
// not a fluid item apparently
|
||||
if (fluidStack == null)
|
||||
{
|
||||
// empty bucket
|
||||
return originalModel;
|
||||
}
|
||||
Fluid fluid = fluidStack.getFluid();
|
||||
String name = fluid.getName();
|
||||
|
||||
BakedDynBucket model = (BakedDynBucket)originalModel;
|
||||
if (!model.cache.containsKey(name))
|
||||
{
|
||||
IUnbakedModel parent = model.parent.process(ImmutableMap.of("fluid", name));
|
||||
Function<ResourceLocation, TextureAtlasSprite> textureGetter;
|
||||
textureGetter = location -> Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString());
|
||||
|
||||
Fluid fluid = fluidStack.getFluid();
|
||||
String name = fluid.getName();
|
||||
IBakedModel bakedModel = parent.bake(ModelLoader.defaultModelGetter(), textureGetter, new SimpleModelState(model.transforms), false, model.format);
|
||||
model.cache.put(name, bakedModel);
|
||||
return bakedModel;
|
||||
}
|
||||
|
||||
if (!model.cache.containsKey(name))
|
||||
{
|
||||
IUnbakedModel parent = model.parent.process(ImmutableMap.of("fluid", name));
|
||||
Function<ResourceLocation, TextureAtlasSprite> textureGetter;
|
||||
textureGetter = location -> Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString());
|
||||
|
||||
IBakedModel bakedModel = parent.bake(ModelLoader.defaultModelGetter(), textureGetter, new SimpleModelState(model.transforms), false, model.format);
|
||||
model.cache.put(name, bakedModel);
|
||||
return bakedModel;
|
||||
}
|
||||
|
||||
return model.cache.get(name);
|
||||
return model.cache.get(name);
|
||||
})
|
||||
// not a fluid item apparently
|
||||
.orElse(originalModel); // empty bucket
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user