Fix remaining issues preventing compilation, launching, and loading worlds (#5156)

Fix duplicate ID for ingredient serializers
Fix KeyBinding compile errors. No GuiKeyBindingList patches yet.
Implement controls GUI and WorldServer patches
This commit is contained in:
tterrag authored and LexManos committed 2018-09-21 19:07:48 -07:00
1 parent c191851ec0
commit d08f8e1a78
15 files changed
+645 -75

No files matched your search

@@ -30,7 +30,10 @@ import net.minecraftforge.client.IRenderHandler;
public interface IForgeDimension
{
default Dimension getDimension() { return (Dimension) this; }
default Dimension getDimension()
{
return (Dimension) this;
}
/**
* Called from {@link World#initCapabilities()}, to gather capabilities for this
@@ -50,19 +53,21 @@ public interface IForgeDimension
}
/**
* The dimension's movement factor.
* Whenever a player or entity changes dimension from world A to world B, their coordinates are multiplied by
* The dimension's movement factor. Whenever a player or entity changes
* dimension from world A to world B, their coordinates are multiplied by
* worldA.provider.getMovementFactor() / worldB.provider.getMovementFactor()
* Example: Overworld factor is 1, nether factor is 8. Traveling from overworld to nether multiplies coordinates by 1/8.
* Example: Overworld factor is 1, nether factor is 8. Traveling from overworld
* to nether multiplies coordinates by 1/8.
*
* @return The movement factor
*/
default double getMovementFactor()
{
if (getDimension() instanceof NetherDimension)
{
return 8.0;
}
return 1.0;
if (getDimension() instanceof NetherDimension)
{
return 8.0;
}
return 1.0;
}
/**
@@ -96,4 +101,16 @@ public interface IForgeDimension
@OnlyIn(Dist.CLIENT)
void setWeatherRenderer(IRenderHandler renderer);
void resetRainAndThunder();
default boolean canDoLightning(net.minecraft.world.chunk.Chunk chunk)
{
return true;
}
default boolean canDoRainSnowIce(net.minecraft.world.chunk.Chunk chunk)
{
return true;
}
}
@@ -47,7 +47,6 @@ public interface IForgeFluidState
* @param material to test for.
* @param testingHead when true, its testing the entities head for vision, breathing ect... otherwise its testing the body, for swimming and movement adjustment.
*/
@Nullable
default boolean isEntityInside(IWorldReader world, BlockPos pos, Entity entity, double yToTest, Tag<Fluid> tag, boolean testingHead)
{
return getFluidState().func_206886_c().isEntityInside(getFluidState(), world, pos, entity, yToTest, tag, testingHead);