Updated raw types in ExtendedBlockState, fixed some ATs, updated some things that needed updating in model classes.

This commit is contained in:
RainWarrior committed 2016-03-02 20:00:32 +03:00
1 parent d44d82e19d
commit cff4bf21ae
12 files changed
+46 -59

No files matched your search

@@ -108,12 +108,6 @@ public class BlockStateLoader
private final ResourceLocation model;
private final ImmutableMap<String, String> customData;
@Deprecated // remove in 1.9
public SubModel(IModelState state, boolean uvLock, ImmutableMap<String, String> textures, ResourceLocation model, ImmutableMap<String, String> customData)
{
this(state, uvLock, true, true, textures, model, customData);
}
public SubModel(IModelState state, boolean uvLock, boolean smooth, boolean gui3d, ImmutableMap<String, String> textures, ResourceLocation model, ImmutableMap<String, String> customData)
{
this.state = state;
@@ -37,7 +37,6 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
@SuppressWarnings("deprecation")
public class ForgeBlockStateV1 extends Marker
{
ForgeBlockStateV1.Variant defaults;
@@ -372,7 +371,7 @@ public class ForgeBlockStateV1 extends Marker
protected SubModel asGenericSubModel()
{
return new SubModel(state.or(TRSRTransformation.identity()), uvLock.or(false), getTextures(), model, getCustomData());
return new SubModel(state.or(TRSRTransformation.identity()), smooth.or(true), gui3d.or(true), uvLock.or(false), getTextures(), model, getCustomData());
}
/**
@@ -9,6 +9,5 @@ public interface IModelCustomData<M extends IModelCustomData<M>> extends IModel
* If unknown data is encountered it should be skipped.
* @return a new model, with data applied.
*/
// 1.9: change IModel to M
IModel process(ImmutableMap<String, String> customData);
M process(ImmutableMap<String, String> customData);
}
@@ -21,6 +21,5 @@ public interface IRetexturableModel<M extends IRetexturableModel<M>> extends IMo
* @param textures New
* @return Model with textures applied.
*/
// 1.9: change IModel to M
IModel retexture(ImmutableMap<String, String> textures);
M retexture(ImmutableMap<String, String> textures);
}
@@ -31,7 +31,6 @@ import com.google.common.collect.ImmutableMap;
public class ItemLayerModel implements IRetexturableModel<ItemLayerModel>
{
public static final ItemLayerModel instance = new ItemLayerModel(ImmutableList.<ResourceLocation>of());
private final ImmutableList<ResourceLocation> textures;
@@ -71,7 +70,7 @@ public class ItemLayerModel implements IRetexturableModel<ItemLayerModel>
return TRSRTransformation.identity();
}
public IModel retexture(ImmutableMap<String, String> textures)
public ItemLayerModel retexture(ImmutableMap<String, String> textures)
{
ImmutableList.Builder<ResourceLocation> builder = ImmutableList.builder();
for(int i = 0; i < textures.size() + this.textures.size(); i++)
@@ -152,7 +152,7 @@ public class ModelDynBucket implements IModel, IModelCustomData<ModelDynBucket>,
* If the fluid can't be found, water is used
*/
@Override
public IModel process(ImmutableMap<String, String> customData)
public ModelDynBucket process(ImmutableMap<String, String> customData)
{
String fluidName = customData.get("fluid");
Fluid fluid = FluidRegistry.getFluid(fluidName);
@@ -183,7 +183,7 @@ public class ModelDynBucket implements IModel, IModelCustomData<ModelDynBucket>,
* If no liquid is given a hardcoded variant for the bucket is used.
*/
@Override
public IModel retexture(ImmutableMap<String, String> textures)
public ModelDynBucket retexture(ImmutableMap<String, String> textures)
{
ResourceLocation base = baseLocation;
@@ -391,7 +391,7 @@ public class ModelFluid implements IModelCustomData<ModelFluid>
}
@Override
public IModel process(ImmutableMap<String, String> customData)
public ModelFluid process(ImmutableMap<String, String> customData)
{
if(!customData.containsKey("fluid")) return this;
@@ -93,7 +93,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
}
@Override
public IModel process(ImmutableMap<String, String> customData)
public MultiLayerModel process(ImmutableMap<String, String> customData)
{
ImmutableMap.Builder<Optional<BlockRenderLayer>, ModelResourceLocation> builder = ImmutableMap.builder();
for(String key : customData.keySet())