Updated ForgeDev MCP Mapping Version (#6532)

This commit is contained in:
DaemonUmbra authored and GitHub committed 2020-02-25 19:45:14 -08:00
1 parent aca45340bf
commit 2ce4f5ece5
83 files changed
+392 -379

No files matched your search

@@ -490,7 +490,7 @@ public class DimensionManager
this.type = data.getModType().getRegistryName();
if (data.getData() != null)
this.data = data.getData().array();
this.skyLight = data.func_218272_d();
this.skyLight = data.hasSkyLight();
}
private CompoundNBT write()
@@ -46,7 +46,7 @@ public class VillagerTradingManager
static
{
VillagerTrades.field_221239_a.entrySet().forEach(e ->
VillagerTrades.VILLAGER_DEFAULT_TRADES.entrySet().forEach(e ->
{
Int2ObjectMap<ITrade[]> copy = new Int2ObjectOpenHashMap<>();
e.getValue().int2ObjectEntrySet().forEach(ent -> copy.put(ent.getIntKey(), Arrays.copyOf(ent.getValue(), ent.getValue().length)));
@@ -95,7 +95,7 @@ public class VillagerTradingManager
MinecraftForge.EVENT_BUS.post(new VillagerTradesEvent(mutableTrades, prof));
Int2ObjectMap<ITrade[]> newTrades = new Int2ObjectOpenHashMap<>();
mutableTrades.int2ObjectEntrySet().forEach(e -> newTrades.put(e.getIntKey(), e.getValue().toArray(new ITrade[0])));
VillagerTrades.field_221239_a.put(prof, newTrades);
VillagerTrades.VILLAGER_DEFAULT_TRADES.put(prof, newTrades);
}
}
@@ -84,7 +84,7 @@ public abstract class LanguageProvider implements IDataProvider {
}
}
cache.func_208316_a(target, hash);
cache.recordHash(target, hash);
}
public void addBlock(Supplier<? extends Block> key, String name) {
@@ -900,7 +900,7 @@ public interface IForgeBlock
*/
default boolean isStickyBlock(BlockState state)
{
return state.getBlock() == Blocks.SLIME_BLOCK || state.getBlock() == Blocks.field_226907_mc_;
return state.getBlock() == Blocks.SLIME_BLOCK || state.getBlock() == Blocks.HONEY_BLOCK;
}
/**
@@ -911,8 +911,8 @@ public interface IForgeBlock
*/
default boolean canStickTo(BlockState state, BlockState other)
{
if (state.getBlock() == Blocks.field_226907_mc_ && other.getBlock() == Blocks.SLIME_BLOCK) return false;
if (state.getBlock() == Blocks.SLIME_BLOCK && other.getBlock() == Blocks.field_226907_mc_) return false;
if (state.getBlock() == Blocks.HONEY_BLOCK && other.getBlock() == Blocks.SLIME_BLOCK) return false;
if (state.getBlock() == Blocks.SLIME_BLOCK && other.getBlock() == Blocks.HONEY_BLOCK) return false;
return state.isStickyBlock() || other.isStickyBlock();
}
@@ -151,7 +151,7 @@ public interface IForgeDimension
*/
default SleepResult canSleepAt(net.minecraft.entity.player.PlayerEntity player, BlockPos pos)
{
return (getDimension().canRespawnHere() && getWorld().func_226691_t_(pos) != Biomes.NETHER) ? SleepResult.ALLOW : SleepResult.BED_EXPLODES;
return (getDimension().canRespawnHere() && getWorld().getBiome(pos) != Biomes.NETHER) ? SleepResult.ALLOW : SleepResult.BED_EXPLODES;
}
enum SleepResult
@@ -221,7 +221,7 @@ public interface IForgeDimension
default boolean isHighHumidity(BlockPos pos)
{
return getWorld().func_226691_t_(pos).isHighHumidity();
return getWorld().getBiome(pos).isHighHumidity();
}
default int getHeight()
@@ -52,9 +52,9 @@ public interface IForgeEntityMinecart
*/
default BlockPos getCurrentRailPosition()
{
int x = MathHelper.floor(getMinecart().func_226277_ct_());
int y = MathHelper.floor(getMinecart().func_226278_cu_());
int z = MathHelper.floor(getMinecart().func_226281_cx_());
int x = MathHelper.floor(getMinecart().getPosX());
int y = MathHelper.floor(getMinecart().getPosY());
int z = MathHelper.floor(getMinecart().getPosZ());
BlockPos pos = new BlockPos(x, y - 1, z);
if (getMinecart().world.getBlockState(pos).isIn(BlockTags.RAILS)) pos = pos.down();
return pos;
@@ -56,7 +56,7 @@ public interface IForgeFluid
*/
default boolean isEntityInside(IFluidState state, IWorldReader world, BlockPos pos, Entity entity, double yToTest, Tag<Fluid> tag, boolean testingHead)
{
return state.isTagged(tag) && yToTest < (double)(pos.getY() + state.func_215679_a(world, pos) + 0.11111111F);
return state.isTagged(tag) && yToTest < (double)(pos.getY() + state.getActualHeight(world, pos) + 0.11111111F);
}
/**
@@ -50,7 +50,7 @@ public interface IForgeFluidState
*/
default boolean isEntityInside(IWorldReader world, BlockPos pos, Entity entity, double yToTest, Tag<Fluid> tag, boolean testingHead)
{
// return ifluidstate.isTagged(p_213290_1_) && d0 < (double)((float)blockpos.getY() + ifluidstate.func_215679_a(this.world, blockpos) + 0.11111111F);
// return ifluidstate.isTagged(p_213290_1_) && d0 < (double)((float)blockpos.getY() + ifluidstate.getActualHeight(this.world, blockpos) + 0.11111111F);
return getFluidState().getFluid().isEntityInside(getFluidState(), world, pos, entity, yToTest, tag, testingHead);
}
@@ -40,7 +40,7 @@ public final class TransformationHelper
@OnlyIn(Dist.CLIENT)
public static TransformationMatrix toTransformation(ItemTransformVec3f transform)
{
if (transform.equals(ItemTransformVec3f.DEFAULT)) return TransformationMatrix.func_227983_a_();
if (transform.equals(ItemTransformVec3f.DEFAULT)) return TransformationMatrix.identity();
return new TransformationMatrix(transform.translation, quatFromXYZ(transform.rotation, true), transform.scale, null);
}
@@ -62,8 +62,8 @@ public final class TransformationHelper
public static Vector3f lerp(Vector3f from, Vector3f to, float progress)
{
Vector3f res = from.func_229195_e_();
res.func_229190_a_(to, progress);
Vector3f res = from.copy();
res.lerp(to, progress);
return res;
}
@@ -116,7 +116,7 @@ public final class TransformationHelper
{
return new TransformationMatrix(
lerp(one.getTranslation(), that.getTranslation(), progress),
slerp(one.func_227989_d_(), that.func_227989_d_(), progress),
slerp(one.getRotationLeft(), that.getRotationLeft(), progress),
lerp(one.getScale(), that.getScale(), progress),
slerp(one.getRightRot(), that.getRightRot(), progress)
);
@@ -140,7 +140,7 @@ public final class TransformationHelper
String transform = json.getAsString();
if(transform.equals("identity"))
{
return TransformationMatrix.func_227983_a_();
return TransformationMatrix.identity();
}
else
{
@@ -266,15 +266,15 @@ public final class TransformationHelper
{
if (entry.getKey().equals("x"))
{
ret = Vector3f.field_229179_b_.func_229187_a_(entry.getValue().getAsNumber().floatValue());
ret = Vector3f.XP.rotationDegrees(entry.getValue().getAsNumber().floatValue());
}
else if (entry.getKey().equals("y"))
{
ret = Vector3f.field_229181_d_.func_229187_a_(entry.getValue().getAsNumber().floatValue());
ret = Vector3f.YP.rotationDegrees(entry.getValue().getAsNumber().floatValue());
}
else if (entry.getKey().equals("z"))
{
ret = Vector3f.field_229183_f_.func_229187_a_(entry.getValue().getAsNumber().floatValue());
ret = Vector3f.ZP.rotationDegrees(entry.getValue().getAsNumber().floatValue());
}
else throw new JsonParseException("Axis rotation: expected single axis key, got: " + entry.getKey());
}
@@ -291,7 +291,7 @@ public final class TransformationHelper
{
if (e.getAsJsonArray().get(0).isJsonObject())
{
Quaternion ret = Quaternion.field_227060_a_.func_227068_g_();
Quaternion ret = Quaternion.ONE.copy();
for (JsonElement a : e.getAsJsonArray())
{
ret.multiply(parseAxisRotation(a));
@@ -307,9 +307,9 @@ public final class Clips
return Pair.of(new IModelTransform()
{
@Override
public TransformationMatrix func_225615_b_()
public TransformationMatrix getRotation()
{
return TransformationMatrix.func_227983_a_();
return TransformationMatrix.identity();
}
@Override
@@ -317,7 +317,7 @@ public final class Clips
{
if(!(part instanceof IJoint))
{
return TransformationMatrix.func_227983_a_();
return TransformationMatrix.identity();
}
IJoint joint = (IJoint)part;
// TODO: Cache clip application?
@@ -33,7 +33,7 @@ public final class JointClips
@Override
public TransformationMatrix apply(float time)
{
return TransformationMatrix.func_227983_a_();
return TransformationMatrix.identity();
}
}
@@ -30,8 +30,8 @@ public class ChunkCoordComparator implements java.util.Comparator<ChunkPos>
public ChunkCoordComparator(ServerPlayerEntity entityplayer)
{
x = (int) entityplayer.func_226277_ct_() >> 4;
z = (int) entityplayer.func_226281_cx_() >> 4;
x = (int) entityplayer.getPosX() >> 4;
z = (int) entityplayer.getPosZ() >> 4;
}
@Override