Update mappings

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2019-06-08 10:45:28 -04:00
parent fc04a65a0f
commit 9fa4641cb0
No known key found for this signature in database
GPG key ID: 8EB3DF749553B1B7
46 changed files with 149 additions and 141 deletions

View file

@ -45,7 +45,7 @@ ext {
]
}
MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20190526-1.13.2'
MAPPING_VERSION = '20190608-1.14.2'
MC_VERSION = '1.14.2'
MCP_VERSION = '20190603.175704'
}

View file

@ -18,15 +18,17 @@
this.func_146190_e(this.field_146211_a.func_78269_a(s, i).length() + this.field_146225_q);
return true;
} else {
@@ -367,7 +367,7 @@
@@ -367,8 +367,8 @@
}
}
- public void func_146195_b(boolean p_146195_1_) {
+ public void setFocused(boolean p_146195_1_) {
super.setFocused(p_146195_1_);
- super.setFocused(p_146195_1_);
+ public void setFocused(boolean isFocusedIn) {
+ super.setFocused(isFocusedIn);
}
public void renderButton(int p_renderButton_1_, int p_renderButton_2_, float p_renderButton_3_) {
@@ -381,7 +381,7 @@
int i = this.field_146226_p ? this.field_146222_t : this.field_146221_u;
int j = this.field_146224_r - this.field_146225_q;

View file

@ -130,14 +130,14 @@ public class ForgeIngameGui extends IngameGui
if (renderHelmet) renderHelmet(partialTicks);
if (renderPortal && !mc.player.isPotionActive(Effects.NAUSEA))
if (renderPortal && !mc.player.isPotionActive(Effects.field_76431_k))
{
renderPortal(partialTicks);
}
if (this.mc.playerController.getCurrentGameType() == GameType.SPECTATOR)
if (this.mc.field_71442_b.getCurrentGameType() == GameType.SPECTATOR)
{
if (renderSpectatorTooltip) spectatorGui.renderTooltip(partialTicks);
if (renderSpectatorTooltip) field_175197_u.renderTooltip(partialTicks);
}
else if (!this.mc.gameSettings.hideGUI)
{
@ -153,7 +153,7 @@ public class ForgeIngameGui extends IngameGui
if (renderBossHealth) renderBossHealth();
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
if (this.mc.playerController.shouldDrawHUD() && this.mc.getRenderViewEntity() instanceof PlayerEntity)
if (this.mc.field_71442_b.shouldDrawHUD() && this.mc.getRenderViewEntity() instanceof PlayerEntity)
{
if (renderHealth) renderHealth(this.scaledWidth, this.scaledHeight);
if (renderArmor) renderArmor(this.scaledWidth, this.scaledHeight);
@ -170,10 +170,10 @@ public class ForgeIngameGui extends IngameGui
{
renderExperience(this.scaledWidth / 2 - 91);
}
if (this.mc.gameSettings.heldItemTooltips && this.mc.playerController.getCurrentGameType() != GameType.SPECTATOR) {
if (this.mc.gameSettings.heldItemTooltips && this.mc.field_71442_b.getCurrentGameType() != GameType.SPECTATOR) {
this.renderSelectedItem();
} else if (this.mc.player.isSpectator()) {
this.spectatorGui.renderSelectedItem();
this.field_175197_u.renderSelectedItem();
}
}
@ -240,7 +240,7 @@ public class ForgeIngameGui extends IngameGui
protected void renderSubtitles()
{
if (pre(SUBTITLES)) return;
this.overlaySubtitle.render();
this.field_184049_t.render();
post(SUBTITLES);
}
@ -249,11 +249,11 @@ public class ForgeIngameGui extends IngameGui
if (pre(BOSSHEALTH)) return;
bind(AbstractGui.GUI_ICONS_LOCATION);
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
mc.func_213239_aq().startSection("bossHealth");
mc.getProfiler().startSection("bossHealth");
GlStateManager.enableBlend();
this.overlayBoss.render();
this.field_184050_w.render();
GlStateManager.disableBlend();
mc.func_213239_aq().endSection();
mc.getProfiler().endSection();
post(BOSSHEALTH);
}
@ -296,7 +296,7 @@ public class ForgeIngameGui extends IngameGui
protected void renderArmor(int width, int height)
{
if (pre(ARMOR)) return;
mc.func_213239_aq().startSection("armor");
mc.getProfiler().startSection("armor");
GlStateManager.enableBlend();
int left = width / 2 - 91;
@ -322,7 +322,7 @@ public class ForgeIngameGui extends IngameGui
left_height += 10;
GlStateManager.disableBlend();
mc.func_213239_aq().endSection();
mc.getProfiler().endSection();
post(ARMOR);
}
@ -346,9 +346,9 @@ public class ForgeIngameGui extends IngameGui
{
if (pre(HOTBAR)) return;
if (mc.playerController.getCurrentGameType() == GameType.SPECTATOR)
if (mc.field_71442_b.getCurrentGameType() == GameType.SPECTATOR)
{
this.spectatorGui.renderTooltip(partialTicks);
this.field_175197_u.renderTooltip(partialTicks);
}
else
{
@ -367,7 +367,7 @@ public class ForgeIngameGui extends IngameGui
protected void renderAir(int width, int height)
{
if (pre(AIR)) return;
mc.func_213239_aq().startSection("air");
mc.getProfiler().startSection("air");
PlayerEntity player = (PlayerEntity)this.mc.getRenderViewEntity();
GlStateManager.enableBlend();
int left = width / 2 + 91;
@ -387,7 +387,7 @@ public class ForgeIngameGui extends IngameGui
}
GlStateManager.disableBlend();
mc.func_213239_aq().endSection();
mc.getProfiler().endSection();
post(AIR);
}
@ -395,7 +395,7 @@ public class ForgeIngameGui extends IngameGui
{
bind(GUI_ICONS_LOCATION);
if (pre(HEALTH)) return;
mc.func_213239_aq().startSection("health");
mc.getProfiler().startSection("health");
GlStateManager.enableBlend();
PlayerEntity player = (PlayerEntity)this.mc.getRenderViewEntity();
@ -438,7 +438,7 @@ public class ForgeIngameGui extends IngameGui
if (rowHeight != 10) left_height += 10 - rowHeight;
int regen = -1;
if (player.isPotionActive(Effects.REGENERATION))
if (player.isPotionActive(Effects.field_76428_l))
{
regen = ticks % 25;
}
@ -446,8 +446,8 @@ public class ForgeIngameGui extends IngameGui
final int TOP = 9 * (mc.world.getWorldInfo().isHardcore() ? 5 : 0);
final int BACKGROUND = (highlight ? 25 : 16);
int MARGIN = 16;
if (player.isPotionActive(Effects.POISON)) MARGIN += 36;
else if (player.isPotionActive(Effects.WITHER)) MARGIN += 72;
if (player.isPotionActive(Effects.field_76436_u)) MARGIN += 36;
else if (player.isPotionActive(Effects.field_82731_v)) MARGIN += 72;
float absorbRemaining = absorb;
for (int i = MathHelper.ceil((healthMax + absorb) / 2.0F) - 1; i >= 0; --i)
@ -493,14 +493,14 @@ public class ForgeIngameGui extends IngameGui
}
GlStateManager.disableBlend();
mc.func_213239_aq().endSection();
mc.getProfiler().endSection();
post(HEALTH);
}
public void renderFood(int width, int height)
{
if (pre(FOOD)) return;
mc.func_213239_aq().startSection("food");
mc.getProfiler().startSection("food");
PlayerEntity player = (PlayerEntity)this.mc.getRenderViewEntity();
GlStateManager.enableBlend();
@ -520,7 +520,7 @@ public class ForgeIngameGui extends IngameGui
int icon = 16;
byte background = 0;
if (mc.player.isPotionActive(Effects.HUNGER))
if (mc.player.isPotionActive(Effects.field_76438_s))
{
icon += 36;
background = 13;
@ -540,7 +540,7 @@ public class ForgeIngameGui extends IngameGui
blit(x, y, icon + 45, 27, 9, 9);
}
GlStateManager.disableBlend();
mc.func_213239_aq().endSection();
mc.getProfiler().endSection();
post(FOOD);
}
@ -548,7 +548,7 @@ public class ForgeIngameGui extends IngameGui
{
if (mc.player.getSleepTimer() > 0)
{
mc.func_213239_aq().startSection("sleep");
mc.getProfiler().startSection("sleep");
GlStateManager.disableDepthTest();
GlStateManager.disableAlphaTest();
int sleepTime = mc.player.getSleepTimer();
@ -563,7 +563,7 @@ public class ForgeIngameGui extends IngameGui
fill(0, 0, width, height, color);
GlStateManager.enableAlphaTest();
GlStateManager.enableDepthTest();
mc.func_213239_aq().endSection();
mc.getProfiler().endSection();
}
}
@ -574,7 +574,7 @@ public class ForgeIngameGui extends IngameGui
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
if (mc.playerController.gameIsSurvivalOrAdventure())
if (mc.field_71442_b.gameIsSurvivalOrAdventure())
{
super.renderExpBar(x);
}
@ -595,7 +595,7 @@ public class ForgeIngameGui extends IngameGui
super.renderHorseJumpBar(x);
GlStateManager.enableBlend();
mc.func_213239_aq().endSection();
mc.getProfiler().endSection();
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
post(JUMPBAR);
@ -603,7 +603,7 @@ public class ForgeIngameGui extends IngameGui
protected void renderHUDText(int width, int height)
{
mc.func_213239_aq().startSection("forgeHudText");
mc.getProfiler().startSection("forgeHudText");
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
ArrayList<String> listL = new ArrayList<String>();
ArrayList<String> listR = new ArrayList<String>();
@ -653,7 +653,7 @@ public class ForgeIngameGui extends IngameGui
}
}
mc.func_213239_aq().endSection();
mc.getProfiler().endSection();
post(TEXT);
}
@ -670,7 +670,7 @@ public class ForgeIngameGui extends IngameGui
{
if (overlayMessageTime > 0)
{
mc.func_213239_aq().startSection("overlayMessage");
mc.getProfiler().startSection("overlayMessage");
float hue = (float)overlayMessageTime - partialTicks;
int opacity = (int)(hue * 256.0F / 20.0F);
if (opacity > 255) opacity = 255;
@ -687,7 +687,7 @@ public class ForgeIngameGui extends IngameGui
GlStateManager.popMatrix();
}
mc.func_213239_aq().endSection();
mc.getProfiler().endSection();
}
}
@ -695,7 +695,7 @@ public class ForgeIngameGui extends IngameGui
{
if (titlesTimer > 0)
{
mc.func_213239_aq().startSection("titleAndSubtitle");
mc.getProfiler().startSection("titleAndSubtitle");
float age = (float)this.titlesTimer - partialTicks;
int opacity = 255;
@ -727,42 +727,42 @@ public class ForgeIngameGui extends IngameGui
GlStateManager.popMatrix();
}
this.mc.func_213239_aq().endSection();
this.mc.getProfiler().endSection();
}
}
protected void renderChat(int width, int height)
{
mc.func_213239_aq().startSection("chat");
mc.getProfiler().startSection("chat");
RenderGameOverlayEvent.Chat event = new RenderGameOverlayEvent.Chat(eventParent, 0, height - 48);
if (MinecraftForge.EVENT_BUS.post(event)) return;
GlStateManager.pushMatrix();
GlStateManager.translatef((float) event.getPosX(), (float) event.getPosY(), 0.0F);
persistantChatGUI.render(ticks);
field_73840_e.render(ticks);
GlStateManager.popMatrix();
post(CHAT);
mc.func_213239_aq().endSection();
mc.getProfiler().endSection();
}
protected void renderPlayerList(int width, int height)
{
ScoreObjective scoreobjective = this.mc.world.getScoreboard().getObjectiveInDisplaySlot(0);
ClientPlayNetHandler handler = mc.player.connection;
ClientPlayNetHandler handler = mc.player.field_71174_a;
if (mc.gameSettings.keyBindPlayerList.isKeyDown() && (!mc.isIntegratedServerRunning() || handler.getPlayerInfoMap().size() > 1 || scoreobjective != null))
{
this.overlayPlayerList.setVisible(true);
this.field_175196_v.setVisible(true);
if (pre(PLAYER_LIST)) return;
this.overlayPlayerList.render(width, this.mc.world.getScoreboard(), scoreobjective);
this.field_175196_v.render(width, this.mc.world.getScoreboard(), scoreobjective);
post(PLAYER_LIST);
}
else
{
this.overlayPlayerList.setVisible(false);
this.field_175196_v.setVisible(false);
}
}
@ -779,7 +779,7 @@ public class ForgeIngameGui extends IngameGui
boolean unused = false;
int left_align = width / 2 + 91;
mc.func_213239_aq().func_219895_b("mountHealth");
mc.getProfiler().endStartSection("mountHealth");
GlStateManager.enableBlend();
LivingEntity mount = (LivingEntity)tmp;
int health = (int)Math.ceil((double)mount.getHealth());

View file

@ -394,14 +394,14 @@ public final class ModelLoader extends ModelBakery
{
if(model.getParentLocation().getPath().equals("builtin/generated"))
{
model.parent = MODEL_GENERATED;
model.field_178315_d = field_177606_o;
}
else
{
IUnbakedModel parent = ModelLoaderRegistry.getModelOrLogError(model.getParentLocation(), "Could not load vanilla model parent '" + model.getParentLocation() + "' for '" + model);
if(parent instanceof VanillaModelWrapper)
{
model.parent = ((VanillaModelWrapper) parent).model;
model.field_178315_d = ((VanillaModelWrapper) parent).model;
}
else
{
@ -412,7 +412,7 @@ public final class ModelLoader extends ModelBakery
ImmutableSet.Builder<ResourceLocation> builder = ImmutableSet.builder();
if(model == ModelBakery.MODEL_GENERATED)
if(model == ModelBakery.field_177606_o)
{
for(String s : ItemModelGenerator.LAYERS)
{
@ -463,12 +463,12 @@ public final class ModelLoader extends ModelBakery
tMap.putAll(PerspectiveMapWrapper.getTransforms(state));
IModelState perState = new SimpleModelState(ImmutableMap.copyOf(tMap), state.apply(Optional.empty()));
if(model == ModelBakery.MODEL_GENERATED)
if(model == ModelBakery.field_177606_o)
{
return new ItemLayerModel(bakery, model, format).bake(bakery, bakedTextureGetter, new BasicState(perState, uvlock), format);
}
TextureAtlasSprite textureatlassprite = bakedTextureGetter.apply(new ResourceLocation(model.resolveTextureName("particle")));
if(model == ModelBakery.MODEL_ENTITY) return new BuiltInModel(transforms, model.getOverrides(bakery, model, bakedTextureGetter, format), textureatlassprite);
if(model == ModelBakery.field_177616_r) return new BuiltInModel(transforms, model.getOverrides(bakery, model, bakedTextureGetter, format), textureatlassprite);
return bakeNormal(bakery, model, perState, state, newTransforms, format, bakedTextureGetter, uvlock);
}
@ -496,13 +496,13 @@ public final class ModelLoader extends ModelBakery
{
TextureAtlasSprite textureatlassprite1 = bakedTextureGetter.apply(new ResourceLocation(model.resolveTextureName(e.getValue().texture)));
if (e.getValue().cullFace == null || !TRSRTransformation.isInteger(transformation.getMatrixVec()))
if (e.getValue().field_178244_b == null || !TRSRTransformation.isInteger(transformation.getMatrixVec()))
{
builder.addGeneralQuad(BlockModel.makeBakedQuad(part, e.getValue(), textureatlassprite1, e.getKey(), new BasicState(transformation, uvLocked)));
}
else
{
builder.addFaceQuad(baseState.rotate(e.getValue().cullFace), BlockModel.makeBakedQuad(part, e.getValue(), textureatlassprite1, e.getKey(), new BasicState(transformation, uvLocked)));
builder.addFaceQuad(baseState.rotate(e.getValue().field_178244_b), BlockModel.makeBakedQuad(part, e.getValue(), textureatlassprite1, e.getKey(), new BasicState(transformation, uvLocked)));
}
}
}
@ -546,7 +546,7 @@ public final class ModelLoader extends ModelBakery
Maps.newHashMap(this.model.textures), this.model.isAmbientOcclusion(), this.model.isGui3d(), //New Textures man VERY IMPORTANT
model.getAllTransforms(), Lists.newArrayList(model.getOverrides()));
newModel.name = this.model.name;
newModel.parent = this.model.parent;
newModel.field_178315_d = this.model.field_178315_d;
Set<String> removed = Sets.newHashSet();
@ -603,7 +603,7 @@ public final class ModelLoader extends ModelBakery
return this;
}
BlockModel newModel = new BlockModel(model.getParentLocation(), model.getElements(), model.textures, value, model.isGui3d(), model.getAllTransforms(), Lists.newArrayList(model.getOverrides()));
newModel.parent = model.parent;
newModel.field_178315_d = model.field_178315_d;
newModel.name = model.name;
return new VanillaModelWrapper(location, newModel, uvlock, animation);
}
@ -616,7 +616,7 @@ public final class ModelLoader extends ModelBakery
return this;
}
BlockModel newModel = new BlockModel(model.getParentLocation(), model.getElements(), model.textures, model.ambientOcclusion, value, model.getAllTransforms(), Lists.newArrayList(model.getOverrides()));
newModel.parent = model.parent;
newModel.field_178315_d = model.field_178315_d;
newModel.name = model.name;
return new VanillaModelWrapper(location, newModel, uvlock, animation);
}

View file

@ -125,7 +125,7 @@ public class BlockInfo
BlockPos pos = blockPos.add(x - 1, y - 1, z - 1);
BlockState state = world.getBlockState(pos);
t[x][y][z] = state.getOpacity(world, pos) < 15;
int brightness = state.func_215684_a(world, pos);
int brightness = state.getPackedLightmapCoords(world, pos);
s[x][y][z] = (brightness >> 0x14) & 0xF;
b[x][y][z] = (brightness >> 0x04) & 0xF;
ao[x][y][z] = state.func_215703_d(world, pos);
@ -187,12 +187,12 @@ public class BlockInfo
public void updateFlatLighting()
{
full = Block.isOpaque(state.getCollisionShape(world, blockPos));
packed[0] = state.func_215684_a(world, blockPos);
packed[0] = state.getPackedLightmapCoords(world, blockPos);
for (Direction side : SIDES)
{
int i = side.ordinal() + 1;
packed[i] = state.func_215684_a(world, blockPos.offset(side));
packed[i] = state.getPackedLightmapCoords(world, blockPos.offset(side));
}
}

View file

@ -36,7 +36,7 @@ public class VertexBufferConsumer implements IVertexConsumer
private BufferBuilder renderer;
private int[] quadData;
private int v = 0;
private BlockPos offset = BlockPos.ORIGIN;
private BlockPos offset = BlockPos.ZERO;
public VertexBufferConsumer() {}

View file

@ -48,7 +48,7 @@ public enum KeyConflictContext implements IKeyConflictContext
@Override
public boolean isActive()
{
return Minecraft.getInstance().currentScreen != null;
return Minecraft.getInstance().field_71462_r != null;
}
@Override

View file

@ -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();

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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));

View file

@ -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;
}

View file

@ -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);
}
}

View file

@ -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();
}
/**

View file

@ -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());
}
/**

View file

@ -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();

View file

@ -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)

View file

@ -228,7 +228,7 @@ public class BlockSnapshot
if (getNbt() != null)
{
compound.func_218657_a("tileEntity", getNbt());
compound.put("tileEntity", getNbt());
}
}

View file

@ -186,7 +186,7 @@ public class ForgeEventFactory
{
Result result = canEntitySpawn(entity, world, x, y, z, spawner);
if (result == Result.DEFAULT)
return entity.func_213380_a(world, SpawnReason.SPAWNER) || !entity.isNotColliding(world); // vanilla logic
return entity.canSpawn(world, SpawnReason.SPAWNER) || !entity.isNotColliding(world); // vanilla logic
else
return result == Result.ALLOW;
}
@ -372,7 +372,7 @@ public class ForgeEventFactory
if (event.getResult() == Result.ALLOW)
{
if (player.abilities.isCreativeMode)
if (player.playerAbilities.isCreativeMode)
return new ActionResult<ItemStack>(ActionResultType.SUCCESS, stack);
stack.shrink(1);

View file

@ -113,7 +113,7 @@ public class FluidStack
if (tag != null)
{
nbt.func_218657_a("Tag", tag);
nbt.put("Tag", tag);
}
return nbt;
}

View file

@ -232,7 +232,7 @@ public class FluidUtil
return FluidActionResult.FAILURE;
}
if (player != null && player.abilities.isCreativeMode)
if (player != null && player.playerAbilities.isCreativeMode)
{
FluidActionResult filledReal = tryFillContainer(container, fluidSource, maxAmount, player, doFill);
if (filledReal.isSuccess())
@ -300,7 +300,7 @@ public class FluidUtil
return FluidActionResult.FAILURE;
}
if (player != null && player.abilities.isCreativeMode)
if (player != null && player.playerAbilities.isCreativeMode)
{
FluidActionResult emptiedReal = tryEmptyContainer(container, fluidDestination, maxAmount, player, doDrain);
if (emptiedReal.isSuccess())

View file

@ -172,25 +172,25 @@ public class UniversalBucket extends Item
ActionResult<ItemStack> ret = ForgeEventFactory.onBucketUse(player, world, itemstack, rt);
if (ret != null) return ret;
if(rt == null || rt.func_216346_c() != RayTraceResult.Type.BLOCK)
if(rt == null || rt.getType() != RayTraceResult.Type.BLOCK)
{
return new ActionResult<ItemStack>(ActionResultType.PASS, itemstack);
}
BlockRayTraceResult brt = (BlockRayTraceResult) rt;
BlockPos clickPos = brt.func_216350_a();
BlockPos clickPos = brt.getPos();
// can we place liquid there?
if (world.isBlockModifiable(player, clickPos))
{
// the block adjacent to the side we clicked on
BlockPos targetPos = clickPos.offset(brt.func_216354_b());
BlockPos targetPos = clickPos.offset(brt.getFace());
// can the player place there?
if (player.canPlayerEdit(targetPos, brt.func_216354_b(), itemstack))
if (player.canPlayerEdit(targetPos, brt.getFace(), itemstack))
{
// try placing liquid
FluidActionResult result = FluidUtil.tryPlaceFluid(player, world, hand, targetPos, itemstack, fluidStack);
if (result.isSuccess() && !player.abilities.isCreativeMode)
if (result.isSuccess() && !player.playerAbilities.isCreativeMode)
{
// success!
player.addStat(Stats.ITEM_USED.get(this));
@ -238,18 +238,18 @@ public class UniversalBucket extends Item
// needs to target a block
RayTraceResult target = event.getTarget();
if (target == null || target.func_216346_c() != RayTraceResult.Type.BLOCK)
if (target == null || target.getType() != RayTraceResult.Type.BLOCK)
{
return;
}
World world = event.getWorld();
BlockPos pos = ((BlockRayTraceResult) target).func_216350_a();
BlockPos pos = ((BlockRayTraceResult) target).getPos();
ItemStack singleBucket = emptyBucket.copy();
singleBucket.setCount(1);
FluidActionResult filledResult = FluidUtil.tryPickUpFluid(singleBucket, event.getEntityPlayer(), world, pos, ((BlockRayTraceResult) target).func_216354_b());
FluidActionResult filledResult = FluidUtil.tryPickUpFluid(singleBucket, event.getEntityPlayer(), world, pos, ((BlockRayTraceResult) target).getFace());
if (filledResult.isSuccess())
{
event.setResult(net.minecraftforge.eventbus.api.Event.Result.ALLOW);

View file

@ -90,7 +90,7 @@ public class FluidHandlerItemStack implements IFluidHandlerItem, ICapabilityProv
CompoundNBT fluidTag = new CompoundNBT();
fluid.writeToNBT(fluidTag);
container.getTag().func_218657_a(FLUID_NBT_KEY, fluidTag);
container.getTag().put(FLUID_NBT_KEY, fluidTag);
}
@Override

View file

@ -87,7 +87,7 @@ public class FluidHandlerItemStackSimple implements IFluidHandlerItem, ICapabili
CompoundNBT fluidTag = new CompoundNBT();
fluid.writeToNBT(fluidTag);
container.getTag().func_218657_a(FLUID_NBT_KEY, fluidTag);
container.getTag().put(FLUID_NBT_KEY, fluidTag);
}
@Override

View file

@ -67,15 +67,15 @@ public final class FMLWorldPersistenceHook implements WorldPersistenceHooks.Worl
mod.putString("ModVersion", MavenVersionStringHelper.artifactVersionToString(mi.getVersion()));
modList.add(mod);
});
fmlData.func_218657_a("LoadingModList", modList);
fmlData.put("LoadingModList", modList);
CompoundNBT registries = new CompoundNBT();
fmlData.func_218657_a("Registries", registries);
fmlData.put("Registries", registries);
LOGGER.debug(WORLDPERSISTENCE,"Gathering id map for writing to world save {}", info.getWorldName());
for (Map.Entry<ResourceLocation, ForgeRegistry.Snapshot> e : RegistryManager.ACTIVE.takeSnapshot(true).entrySet())
{
registries.func_218657_a(e.getKey().toString(), e.getValue().write());
registries.put(e.getKey().toString(), e.getValue().write());
}
return fmlData;
}

View file

@ -226,7 +226,7 @@ public class StartupQuery {
}
if (query.isSynchronous()) {
while (client.currentScreen instanceof GuiNotification) {
while (client.field_71462_r instanceof GuiNotification) {
if (Thread.interrupted()) {
query.exception = new InterruptedException();
throw new RuntimeException();

View file

@ -37,7 +37,7 @@ public class WorldPersistenceHooks
public static void handleWorldDataSave(final SaveHandler handler, final WorldInfo worldInfo, final CompoundNBT tagCompound)
{
worldPersistenceHooks.forEach(wac->tagCompound.func_218657_a(wac.getModId(), wac.getDataForWriting(handler, worldInfo)));
worldPersistenceHooks.forEach(wac->tagCompound.put(wac.getModId(), wac.getDataForWriting(handler, worldInfo)));
}
public static void handleWorldDataLoad(SaveHandler handler, WorldInfo worldInfo, CompoundNBT tagCompound)

View file

@ -23,6 +23,8 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.gui.widget.button.Button.IPressable;
/**
* This class provides a button that fixes several bugs present in the vanilla GuiButton drawing code.
* The gist of it is that it allows buttons of any size without gaps in the graphics and with the

View file

@ -23,6 +23,8 @@ import net.minecraft.client.Minecraft;
import javax.annotation.Nullable;
import net.minecraft.client.gui.widget.button.Button.IPressable;
/**
* This class is blatantly stolen from iChunUtils with permission.
*

View file

@ -24,6 +24,8 @@ import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.gui.widget.button.Button.IPressable;
/**
* This class provides a button that shows a string glyph at the beginning. The glyph can be scaled using the glyphScale parameter.
*

View file

@ -34,14 +34,14 @@ public class GuiConfirmation extends GuiNotification
{
this.addButton(new Button(this.width / 2 - 104, this.height - 38, 100, 20, ForgeI18n.parseMessage("gui.yes"), b ->
{
GuiConfirmation.this.minecraft.currentScreen = null;
GuiConfirmation.this.minecraft.field_71462_r = null;
query.setResult(true);
query.finish();
}
));
this.addButton(new Button(this.width / 2 + 4, this.height - 38, 100, 20, ForgeI18n.parseMessage("gui.no"), b ->
{
GuiConfirmation.this.minecraft.currentScreen = null;
GuiConfirmation.this.minecraft.field_71462_r = null;
query.setResult(false);
query.finish();
}

View file

@ -66,7 +66,7 @@ public class FMLPlayMessages
SpawnEntity(Entity e)
{
this.entity = e;
this.typeId = Registry.ENTITY_TYPE.getId(e.getType());
this.typeId = Registry.field_212629_r.getId(e.getType());
this.entityId = e.getEntityId();
this.uuid = e.getUniqueID();
this.posX = e.posX;
@ -75,7 +75,7 @@ public class FMLPlayMessages
this.pitch = (byte) MathHelper.floor(e.rotationPitch * 256.0F / 360.0F);
this.yaw = (byte) MathHelper.floor(e.rotationYaw * 256.0F / 360.0F);
this.headYaw = (byte) (e.getRotationYawHead() * 256.0F / 360.0F);
Vec3d vec3d = e.func_213322_ci();
Vec3d vec3d = e.getMotion();
double d1 = MathHelper.clamp(vec3d.x, -3.9D, 3.9D);
double d2 = MathHelper.clamp(vec3d.y, -3.9D, 3.9D);
double d3 = MathHelper.clamp(vec3d.z, -3.9D, 3.9D);
@ -141,7 +141,7 @@ public class FMLPlayMessages
public static void handle(SpawnEntity msg, Supplier<NetworkEvent.Context> ctx)
{
ctx.get().enqueueWork(() -> {
EntityType<?> type = Registry.ENTITY_TYPE.getByValue(msg.typeId);
EntityType<?> type = Registry.field_212629_r.getByValue(msg.typeId);
if (type == null)
{
throw new RuntimeException(String.format("Could not spawn entity (id %d) with unknown type at (%f, %f, %f)", msg.entityId, msg.posX, msg.posY, msg.posZ));
@ -209,7 +209,7 @@ public class FMLPlayMessages
{
ctx.get().enqueueWork(() -> {
// TODO extend IScreenFactory to allow for extra data
ScreenManager.func_216909_a(msg.getType(), Minecraft.getInstance(), msg.getWindowId(), msg.getName());
ScreenManager.openScreen(msg.getType(), Minecraft.getInstance(), msg.getWindowId(), msg.getName());
});
ctx.get().setPacketHandled(true);
}

View file

@ -195,7 +195,7 @@ public class NetworkEvent extends Event
if (netHandler instanceof ServerPlayNetHandler)
{
ServerPlayNetHandler netHandlerPlayServer = (ServerPlayNetHandler) netHandler;
return netHandlerPlayServer.player;
return netHandlerPlayServer.field_147369_b;
}
return null;
}

View file

@ -163,7 +163,7 @@ public class NetworkHooks
throw new IllegalArgumentException("Invalid PacketBuffer for openGui, found "+ output.readableBytes()+ " bytes");
}
Container c = containerSupplier.createMenu(openContainerId, player.inventory, player);
ContainerType<?> type = c.func_216957_a();
ContainerType<?> type = c.getType();
FMLPlayMessages.OpenContainer msg = new FMLPlayMessages.OpenContainer(type, openContainerId, containerSupplier.getDisplayName(), output);
FMLNetworkConstants.playChannel.sendTo(msg, player.connection.getNetworkManager(), NetworkDirection.PLAY_TO_CLIENT);

View file

@ -51,7 +51,7 @@ public class NetworkRegistry
private static final Logger LOGGER = LogManager.getLogger();
private static final Marker NETREGISTRY = MarkerManager.getMarker("NETREGISTRY");
private static Map<ResourceLocation, NetworkInstance> instances = new HashMap<>();
private static Map<ResourceLocation, NetworkInstance> instances = Collections.synchronizedMap(new HashMap<>());
/**
* Special value for clientAcceptedVersions and serverAcceptedVersions predicates indicating the other side lacks

View file

@ -147,7 +147,7 @@ public class ServerLifecycleHooks
private static void rejectConnection(final NetworkManager manager, ConnectionType type, String message) {
manager.setConnectionState(ProtocolType.LOGIN);
LOGGER.info(SERVERHOOKS, "Disconnecting {} connection attempt: ", type, message);
LOGGER.info(SERVERHOOKS, "Disconnecting {} connection attempt: {}", type, message);
StringTextComponent text = new StringTextComponent(message);
manager.sendPacket(new SDisconnectLoginPacket(text));
manager.closeChannel(text);

View file

@ -193,7 +193,7 @@ public class ItemHandlerHelper
{
ItemEntity entityitem = new ItemEntity(world, player.posX, player.posY + 0.5, player.posZ, remainder);
entityitem.setPickupDelay(40);
entityitem.func_213317_d(entityitem.func_213322_ci().func_216372_d(0, 1, 0));
entityitem.setMotion(entityitem.getMotion().mul(0, 1, 0));
world.func_217376_c(entityitem);
}

View file

@ -185,7 +185,7 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I
}
}
CompoundNBT nbt = new CompoundNBT();
nbt.func_218657_a("Items", nbtTagList);
nbt.put("Items", nbtTagList);
nbt.putInt("Size", stacks.size());
return nbt;
}

View file

@ -98,7 +98,7 @@ public class ClearableRegistry<T> extends MutableRegistry<T>
}
@Override
public <V extends T> V func_218382_a(int id, ResourceLocation key, V value)
public <V extends T> V register(int id, ResourceLocation key, V value)
{
Validate.isTrue(id >= 0, "Invalid ID, can not be < 0");
Validate.notNull(key);
@ -121,9 +121,9 @@ public class ClearableRegistry<T> extends MutableRegistry<T>
}
@Override
public <V extends T> V func_218381_a(ResourceLocation key, V value)
public <V extends T> V register(ResourceLocation key, V value)
{
return func_218382_a(nextId, key, value);
return register(nextId, key, value);
}
@Override

View file

@ -829,7 +829,7 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
tag.putInt("V", e.getValue());
ids.add(tag);
});
data.func_218657_a("ids", ids);
data.put("ids", ids);
ListNBT aliases = new ListNBT();
this.aliases.entrySet().stream().forEach(e ->
@ -839,7 +839,7 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
tag.putString("V", e.getKey().toString());
aliases.add(tag);
});
data.func_218657_a("aliases", aliases);
data.put("aliases", aliases);
ListNBT overrides = new ListNBT();
this.overrides.entrySet().stream().forEach(e ->
@ -849,14 +849,14 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
tag.putString("V", e.getValue());
overrides.add(tag);
});
data.func_218657_a("overrides", overrides);
data.put("overrides", overrides);
int[] blocked = this.blocked.stream().mapToInt(x->x).sorted().toArray();
data.putIntArray("blocked", blocked);
ListNBT dummied = new ListNBT();
this.dummied.stream().sorted().forEach(e -> dummied.add(new StringNBT(e.toString())));
data.func_218657_a("dummied", dummied);
data.put("dummied", dummied);
return data;
}

View file

@ -379,7 +379,7 @@ public class GameData
state.func_215692_c();
}
block.func_220068_i();
block.getLootTable();
}
}

View file

@ -47,7 +47,7 @@ class NamespacedDefaultedWrapper<T extends IForgeRegistryEntry<T>> extends Defau
}
@Override
public <V extends T> V func_218382_a(int id, ResourceLocation key, V value)
public <V extends T> V register(int id, ResourceLocation key, V value)
{
if (locked)
throw new IllegalStateException("Can not register to a locked registry. Modder should use Forge Register methods.");
@ -64,9 +64,9 @@ class NamespacedDefaultedWrapper<T extends IForgeRegistryEntry<T>> extends Defau
}
@Override
public <V extends T> V func_218381_a(ResourceLocation key, V value)
public <V extends T> V register(ResourceLocation key, V value)
{
return func_218382_a(-1, key, value);
return register(-1, key, value);
}
// Reading Functions

View file

@ -43,7 +43,7 @@ class NamespacedWrapper<T extends IForgeRegistryEntry<T>> extends SimpleRegistry
}
@Override
public <V extends T> V func_218382_a(int id, ResourceLocation key, V value)
public <V extends T> V register(int id, ResourceLocation key, V value)
{
if (locked)
throw new IllegalStateException("Can not register to a locked registry. Modder should use Forge Register methods.");
@ -60,9 +60,9 @@ class NamespacedWrapper<T extends IForgeRegistryEntry<T>> extends SimpleRegistry
}
@Override
public <R extends T> R func_218381_a(ResourceLocation key, R value)
public <R extends T> R register(ResourceLocation key, R value)
{
return func_218382_a(-1, key, value);
return register(-1, key, value);
}
// Reading Functions

View file

@ -146,7 +146,7 @@ public class ChunkGenWorker implements IWorker
int x = next.getX();
int z = next.getZ();
IChunk chunk = world.func_217353_a(x, z, ChunkStatus.field_222617_m, false);
IChunk chunk = world.getChunk(x, z, ChunkStatus.FULL, false);
/* TODO: Mark things to unload
PlayerChunkMapEntry watchers = world.getPlayerChunkMap().getEntry(chunk.x, chunk.z);
if (watchers == null) //If there are no players watching this, this will be null, so we can unload.