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:
tterrag authored and GitHub committed 2018-09-11 21:42:29 -04:00
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
}
}