mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Fix the rest of the "easy" compile errors (#5151)
* Add Entity.changeDimension patch and transitively required patches * Fix throws declaration on CommandSetDimension#execute * Fix rest of errors in fluid package * Add PLAYER_REACH attribute * Fix compile errors in fml.client.config and add GuiButton patch * Delete unnecessary client.config classes, fix all config errors * Comment some fluid errors in models * Fix all errors in common package root, except ForgeHooks * Mass comment network package * Experimental conversion of extended states to generic base class * Fix errors in common.util * Remove config annotation stuff cuz lex said so * Make extended state stuff compile fully
This commit is contained in:
1 parent
6814cbf0df
commit
c4cf950863
72 files changed
+610
-5996
No files matched your search
@@ -198,7 +198,7 @@ public final class ModelDynBucket implements IUnbakedModel
|
||||
public ModelDynBucket process(ImmutableMap<String, String> customData)
|
||||
{
|
||||
String fluidName = customData.get("fluid");
|
||||
Fluid fluid = FluidRegistry.getFluid(fluidName);
|
||||
Fluid fluid = null; // TODO fluids FluidRegistry.getFluid(fluidName);
|
||||
|
||||
if (fluid == null) fluid = this.fluid;
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ import net.minecraftforge.common.ForgeVersion;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.fluids.BlockFluidBase;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
@@ -69,8 +68,8 @@ import com.google.gson.JsonParser;
|
||||
public final class ModelFluid implements IUnbakedModel
|
||||
{
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
public static final ModelFluid WATER = new ModelFluid(FluidRegistry.WATER);
|
||||
public static final ModelFluid LAVA = new ModelFluid(FluidRegistry.LAVA);
|
||||
public static final ModelFluid WATER = null; // TODO fluids new ModelFluid(FluidRegistry.WATER);
|
||||
public static final ModelFluid LAVA = null; // TODO fluids new ModelFluid(FluidRegistry.LAVA);
|
||||
|
||||
private final Fluid fluid;
|
||||
|
||||
@@ -180,7 +179,7 @@ public final class ModelFluid implements IUnbakedModel
|
||||
IExtendedBlockState state = stateOption.get();
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
Float level = state.getValue(BlockFluidBase.LEVEL_CORNERS[i]);
|
||||
Float level = null; // TODO fluids state.getValue(BlockFluidBase.LEVEL_CORNERS[i]);
|
||||
cornerRound[i] = Math.round((level == null ? 8f / 9f : level) * 864);
|
||||
}
|
||||
}
|
||||
@@ -199,7 +198,7 @@ public final class ModelFluid implements IUnbakedModel
|
||||
Float flow = -1000f;
|
||||
if (stateOption.isPresent())
|
||||
{
|
||||
flow = stateOption.get().getValue(BlockFluidBase.FLOW_DIRECTION);
|
||||
flow = null; // TODO fluids stateOption.get().getValue(BlockFluidBase.FLOW_DIRECTION);
|
||||
if (flow == null) flow = -1000f;
|
||||
}
|
||||
int flowRound = (int) Math.round(Math.toDegrees(flow));
|
||||
@@ -222,7 +221,7 @@ public final class ModelFluid implements IUnbakedModel
|
||||
IExtendedBlockState state = stateOption.get();
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
Boolean overlay = state.getValue(BlockFluidBase.SIDE_OVERLAYS[i]);
|
||||
Boolean overlay = null; // TODO fluids state.getValue(BlockFluidBase.SIDE_OVERLAYS[i]);
|
||||
if (overlay != null) overlaySides[i] = overlay;
|
||||
}
|
||||
}
|
||||
@@ -510,12 +509,13 @@ public final class ModelFluid implements IUnbakedModel
|
||||
|
||||
String fluidStr = customData.get("fluid");
|
||||
JsonElement e = new JsonParser().parse(fluidStr);
|
||||
String fluid = e.getAsString();
|
||||
String fluid = e.getAsString();/* TODO fluids
|
||||
if(!FluidRegistry.isFluidRegistered(fluid))
|
||||
{
|
||||
LOGGER.fatal("fluid '{}' not found", fluid);
|
||||
return WATER;
|
||||
}
|
||||
return new ModelFluid(FluidRegistry.getFluid(fluid));
|
||||
return new ModelFluid(FluidRegistry.getFluid(fluid));*/
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -523,7 +523,7 @@ public final class ModelLoader extends ModelBakery
|
||||
if(exState.getUnlistedNames().contains(Properties.AnimationProperty))
|
||||
{
|
||||
IModelState newState = exState.getValue(Properties.AnimationProperty);
|
||||
IExtendedBlockState newExState = exState.withProperty(Properties.AnimationProperty, null);
|
||||
IExtendedBlockState newExState = (IExtendedBlockState) exState.withProperty(Properties.AnimationProperty, null);
|
||||
if(newState != null)
|
||||
{
|
||||
return VanillaModelWrapper.this.bake(modelGetter, bakedTextureGetter, new ModelStateComposition(modelState, newState), uvlock, format).func_200117_a(newExState, side, rand);
|
||||
|
||||
@@ -77,7 +77,7 @@ public class AnimationTESR<T extends TileEntity> extends FastTESR<T> implements
|
||||
|
||||
// TODO: caching?
|
||||
IBakedModel model = blockRenderer.getBlockModelShapes().getModelForState(exState.getClean());
|
||||
IExtendedBlockState animState = exState.withProperty(Properties.AnimationProperty, pair.getLeft());
|
||||
IExtendedBlockState animState = (IExtendedBlockState) exState.withProperty(Properties.AnimationProperty, pair.getLeft());
|
||||
|
||||
renderer.setTranslation(x - pos.getX(), y - pos.getY(), z - pos.getZ());
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.common.model.animation.IClip;
|
||||
import net.minecraftforge.common.model.animation.IJoint;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
import net.minecraftforge.common.property.Properties;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
@@ -81,7 +80,6 @@ import com.google.common.base.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.CacheLoader;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
|
||||
Reference in new issue
Block a user