Update mappings

Signed-off-by: cpw <[email protected]>
This commit is contained in:
cpw committed 2019-06-08 10:45:28 -04:00
1 parent fc04a65a0f
commit 9fa4641cb0
46 files changed
+149 -141

No files matched your search

@@ -108,7 +108,7 @@ public class DimensionManager
}
@SuppressWarnings("deprecation")
DimensionType instance = new DimensionType(id, "", name.getNamespace() + "/" + name.getPath(), type.getFactory(), hasSkyLight, type, data);
REGISTRY.func_218382_a(id, name, instance);
REGISTRY.register(id, name, instance);
LOGGER.info(DIMMGR, "Registered dimension {} of type {} and id {}", name.toString(), type.getRegistryName().toString(), id);
return instance;
}
@@ -190,7 +190,7 @@ public class DimensionManager
@SuppressWarnings("deprecation")
DimensionType instance = new DimensionType(id, "", name.getNamespace() + "/" + name.getPath(), type.getFactory(), hasSkyLight, type, data);
REGISTRY.func_218382_a(id, name, instance);
REGISTRY.register(id, name, instance);
LOGGER.info(DIMMGR, "Registered dimension {} of type {} and id {}", name.toString(), type.getRegistryName().toString(), id);
return instance;
}
@@ -219,7 +219,7 @@ public class DimensionManager
private static boolean canUnloadWorld(ServerWorld world)
{
return world.func_217469_z().isEmpty()
&& world.func_217369_A().isEmpty()
&& world.getPlayers().isEmpty()
//&& !world.dimension.getType().shouldLoadSpawn()
&& !getData(world.getDimension().getType()).keepLoaded;
}
@@ -322,7 +322,7 @@ public class DimensionManager
ListNBT lst = new ListNBT();
list.forEach(e -> lst.add(e.write()));
data.func_218657_a("entries", lst);
data.put("entries", lst);
}
public static void readRegistry(CompoundNBT data)
@@ -336,7 +336,7 @@ public class DimensionManager
REGISTRY.clear();
vanilla.forEach((key, value) -> {
LOGGER.debug(DIMMGR, "Registering vanilla entry ID: {} Name: {} Value: {}", value.getId() + 1, key.toString(), value.toString());
REGISTRY.func_218382_a(value.getId() + 1, key, value);
REGISTRY.register(value.getId() + 1, key, value);
});
savedEntries.clear();
@@ -237,12 +237,12 @@ public class ForgeHooks
public static boolean onPickBlock(RayTraceResult target, PlayerEntity player, World world)
{
ItemStack result = ItemStack.EMPTY;
boolean isCreative = player.abilities.isCreativeMode;
boolean isCreative = player.playerAbilities.isCreativeMode;
TileEntity te = null;
if (target.func_216346_c() == RayTraceResult.Type.BLOCK)
if (target.getType() == RayTraceResult.Type.BLOCK)
{
BlockPos pos = ((BlockRayTraceResult)target).func_216350_a();
BlockPos pos = ((BlockRayTraceResult)target).getPos();
BlockState state = world.getBlockState(pos);
if (state.isAir(world, pos))
@@ -254,15 +254,15 @@ public class ForgeHooks
result = state.getBlock().getPickBlock(state, target, world, pos, player);
if (result.isEmpty())
LOGGER.warn("Picking on: [{}] {} gave null item", target.func_216346_c(), state.getBlock().getRegistryName());
LOGGER.warn("Picking on: [{}] {} gave null item", target.getType(), state.getBlock().getRegistryName());
}
else if (target.func_216346_c() == RayTraceResult.Type.ENTITY)
else if (target.getType() == RayTraceResult.Type.ENTITY)
{
Entity entity = ((EntityRayTraceResult)target).func_216348_a();
Entity entity = ((EntityRayTraceResult)target).getEntity();
result = entity.getPickedResult(target);
if (result.isEmpty())
LOGGER.warn("Picking on: [{}] {} gave null item", target.func_216346_c(), entity.getType().getRegistryName());
LOGGER.warn("Picking on: [{}] {} gave null item", target.getType(), entity.getType().getRegistryName());
}
if (result.isEmpty())
@@ -274,7 +274,7 @@ public class ForgeHooks
if (isCreative)
{
player.inventory.setPickedItemStack(result);
Minecraft.getInstance().playerController.sendSlotPacket(player.getHeldItem(Hand.MAIN_HAND), 36 + player.inventory.currentItem);
Minecraft.getInstance().field_71442_b.sendSlotPacket(player.getHeldItem(Hand.MAIN_HAND), 36 + player.inventory.currentItem);
return true;
}
int slot = player.inventory.getSlotFor(result);
@@ -283,7 +283,7 @@ public class ForgeHooks
if (PlayerInventory.isHotbar(slot))
player.inventory.currentItem = slot;
else
Minecraft.getInstance().playerController.pickItem(slot);
Minecraft.getInstance().field_71442_b.pickItem(slot);
return true;
}
return false;
@@ -438,7 +438,7 @@ public class ForgeHooks
@Nullable
public static ITextComponent onServerChatEvent(ServerPlayNetHandler net, String raw, ITextComponent comp)
{
ServerChatEvent event = new ServerChatEvent(net.player, raw, comp);
ServerChatEvent event = new ServerChatEvent(net.field_147369_b, raw, comp);
if (MinecraftForge.EVENT_BUS.post(event))
{
return null;
@@ -660,7 +660,7 @@ public class ForgeHooks
BlockState newBlock = world.getBlockState(snap.getPos());
if (!newBlock.getBlock().hasTileEntity(newBlock)) // Containers get placed automatically
{
newBlock.func_215705_a(world, snap.getPos(), oldBlock, false);
newBlock.onBlockAdded(world, snap.getPos(), oldBlock, false);
}
world.markAndNotifyBlock(snap.getPos(), null, oldBlock, newBlock, updateFlag);
@@ -741,7 +741,7 @@ public class ForgeHooks
public static ActionResultType onInteractEntityAt(PlayerEntity player, Entity entity, RayTraceResult ray, Hand hand)
{
Vec3d vec3d = new Vec3d(ray.func_216347_e().x - entity.posX, ray.func_216347_e().y - entity.posY, ray.func_216347_e().z - entity.posZ);
Vec3d vec3d = new Vec3d(ray.getHitVec().x - entity.posX, ray.getHitVec().y - entity.posY, ray.getHitVec().z - entity.posZ);
return onInteractEntityAt(player, entity, vec3d, hand);
}
@@ -201,7 +201,7 @@ public class ForgeMod implements WorldPersistenceHooks.WorldPersistenceHook
CompoundNBT dims = new CompoundNBT();
DimensionManager.writeRegistry(dims);
if (!dims.isEmpty())
forgeData.func_218657_a("dims", dims);
forgeData.put("dims", dims);
// TODO fluids FluidRegistry.writeDefaultFluidList(forgeData);
return forgeData;
}
@@ -113,7 +113,7 @@ public final class CapabilityDispatcher implements INBTSerializable<CompoundNBT>
CompoundNBT nbt = new CompoundNBT();
for (int x = 0; x < writers.length; x++)
{
nbt.func_218657_a(names[x], writers[x].serializeNBT());
nbt.put(names[x], writers[x].serializeNBT());
}
return nbt;
}
@@ -243,11 +243,11 @@ public class CraftingHelper
CompoundNBT tmp = new CompoundNBT();
if (nbt.contains("ForgeCaps"))
{
tmp.func_218657_a("ForgeCaps", nbt.get("ForgeCaps"));
tmp.put("ForgeCaps", nbt.get("ForgeCaps"));
nbt.remove("ForgeCaps");
}
tmp.func_218657_a("tag", nbt);
tmp.put("tag", nbt);
tmp.putString("id", itemName);
tmp.putInt("Count", JSONUtils.getInt(json, "count", 1));
@@ -237,7 +237,7 @@ public interface IForgeBlock
default boolean removedByPlayer(BlockState state, World world, BlockPos pos, PlayerEntity player, boolean willHarvest, IFluidState fluid)
{
getBlock().onBlockHarvested(world, pos, state, player);
return world.func_217377_a(pos, false);
return world.removeBlock(pos, false);
}
/**
@@ -268,7 +268,7 @@ public interface IForgeBlock
*/
default boolean canCreatureSpawn(BlockState state, IBlockReader world, BlockPos pos, EntitySpawnPlacementRegistry.PlacementType type, @Nullable EntityType<?> entityType)
{
return state.func_215688_a(world, pos, entityType);
return state.canEntitySpawn(world, pos, entityType);
}
/**
@@ -771,7 +771,7 @@ public interface IForgeBlock
*/
default SoundType getSoundType(BlockState state, IWorldReader world, BlockPos pos, @Nullable Entity entity)
{
return this.getBlock().func_220072_p(state);
return this.getBlock().getSoundType(state);
}
/**
@@ -812,7 +812,7 @@ public interface IForgeBlock
LivingEntity ent = (LivingEntity)entity;
f12 = (float) EnchantmentHelper.getRespirationModifier(ent) * 0.2F;
if (ent.isPotionActive(Effects.WATER_BREATHING))
if (ent.isPotionActive(Effects.field_76427_o))
{
f12 = f12 * 0.3F + 0.6F;
}
@@ -68,6 +68,6 @@ public interface IForgeEffectInstance {
default void writeCurativeItems(CompoundNBT nbt) {
ListNBT list = new ListNBT();
getCurativeItems().forEach(s -> list.add(s.write(new CompoundNBT())));
nbt.func_218657_a("CurativeItems", list);
nbt.put("CurativeItems", list);
}
}
@@ -159,7 +159,7 @@ public interface IForgeEntity extends ICapabilitySerializable<CompoundNBT>
*/
default EntityClassification getClassification(boolean forSpawnCount)
{
return getEntity().getType().func_220339_d();
return getEntity().getType().getClassiciation();
}
/**
@@ -601,7 +601,7 @@ public interface IForgeItem
*/
default boolean canApplyAtEnchantingTable(ItemStack stack, net.minecraft.enchantment.Enchantment enchantment)
{
return enchantment.type.canEnchantItem(stack.getItem());
return enchantment.field_77351_y.canEnchantItem(stack.getItem());
}
/**
@@ -111,7 +111,7 @@ public interface IForgeItemStack extends ICapabilitySerializable<CompoundNBT>
PlayerEntity entityplayer = context.getPlayer();
BlockPos blockpos = context.getPos();
CachedBlockInfo blockworldstate = new CachedBlockInfo(context.getWorld(), blockpos, false);
if (entityplayer != null && !entityplayer.abilities.allowEdit && !getStack().canPlaceOn(context.getWorld().getTags(), blockworldstate)) {
if (entityplayer != null && !entityplayer.playerAbilities.allowEdit && !getStack().canPlaceOn(context.getWorld().getTags(), blockworldstate)) {
return ActionResultType.PASS;
} else {
Item item = getStack().getItem();
@@ -65,9 +65,9 @@ public interface IForgeWorldType
default void onCustomizeButton(Minecraft mc, CreateWorldScreen gui)
{
if (this == WorldType.FLAT)
mc.displayGuiScreen(new CreateFlatWorldScreen(gui, gui.chunkProviderSettingsJson));
mc.displayGuiScreen(new CreateFlatWorldScreen(gui, gui.field_146334_a));
else if (this == WorldType.BUFFET)
mc.displayGuiScreen(new CreateBuffetWorldScreen(gui, gui.chunkProviderSettingsJson));
mc.displayGuiScreen(new CreateBuffetWorldScreen(gui, gui.field_146334_a));
}
default boolean handleSlimeSpawnReduction(java.util.Random random, World world)
@@ -228,7 +228,7 @@ public class BlockSnapshot
if (getNbt() != null)
{
compound.func_218657_a("tileEntity", getNbt());
compound.put("tileEntity", getNbt());
}
}