Update mappings to 20151122.
This commit is contained in:
parent
84c3ef0f5c
commit
68dfcccd57
|
@ -28,7 +28,7 @@ apply plugin: "net.minecraftforge.gradle.launch4j"
|
|||
minecraft {
|
||||
version = "1.8.8"
|
||||
//mappings = 'stable_16'
|
||||
mappings = "snapshot_nodoc_20141130"
|
||||
mappings = "snapshot_nodoc_20151122"
|
||||
workspaceDir = "projects"
|
||||
versionJson = "jsons/1.8.8-dev.json"
|
||||
buildUserdev = true
|
||||
|
|
|
@ -57,7 +57,7 @@ public class ClientCommandHandler extends CommandHandler
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (icommand.canCommandSenderUse(sender))
|
||||
if (icommand.canCommandSenderUseCommand(sender))
|
||||
{
|
||||
CommandEvent event = new CommandEvent(icommand, sender, args);
|
||||
if (MinecraftForge.EVENT_BUS.post(event))
|
||||
|
@ -69,7 +69,7 @@ public class ClientCommandHandler extends CommandHandler
|
|||
return 0;
|
||||
}
|
||||
|
||||
icommand.execute(sender, args);
|
||||
icommand.processCommand(sender, args);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -113,7 +113,7 @@ public class GuiIngameForge extends GuiIngame
|
|||
|
||||
if (Minecraft.isFancyGraphicsEnabled())
|
||||
{
|
||||
func_180480_a(mc.thePlayer.getBrightness(partialTicks), res);
|
||||
renderVignette(mc.thePlayer.getBrightness(partialTicks), res);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -163,16 +163,16 @@ public class GuiIngameForge extends GuiIngame
|
|||
|
||||
Scoreboard scoreboard = this.mc.theWorld.getScoreboard();
|
||||
ScoreObjective objective = null;
|
||||
ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(mc.thePlayer.getName());
|
||||
ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(mc.thePlayer.getCommandSenderName());
|
||||
if (scoreplayerteam != null)
|
||||
{
|
||||
int slot = scoreplayerteam.func_178775_l().getColorIndex();
|
||||
int slot = scoreplayerteam.getChatFormat().getColorIndex();
|
||||
if (slot >= 0) objective = scoreboard.getObjectiveInDisplaySlot(3 + slot);
|
||||
}
|
||||
ScoreObjective scoreobjective1 = objective != null ? objective : scoreboard.getObjectiveInDisplaySlot(1);
|
||||
if (renderObjective && scoreobjective1 != null)
|
||||
{
|
||||
this.func_180475_a(scoreobjective1, res);
|
||||
this.renderScoreboard(scoreobjective1, res);
|
||||
}
|
||||
|
||||
GlStateManager.enableBlend();
|
||||
|
@ -234,7 +234,7 @@ public class GuiIngameForge extends GuiIngame
|
|||
{
|
||||
if (itemstack.getItem() == Item.getItemFromBlock(Blocks.pumpkin))
|
||||
{
|
||||
func_180476_e(res);
|
||||
renderPumpkinOverlay(res);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -345,28 +345,28 @@ public class GuiIngameForge extends GuiIngame
|
|||
|
||||
EntityPlayer player = (EntityPlayer)this.mc.getRenderViewEntity();
|
||||
int health = MathHelper.ceiling_float_int(player.getHealth());
|
||||
boolean highlight = field_175191_F > (long)updateCounter && (field_175191_F - (long)updateCounter) / 3L %2L == 1L;
|
||||
boolean highlight = healthUpdateCounter > (long)updateCounter && (healthUpdateCounter - (long)updateCounter) / 3L %2L == 1L;
|
||||
|
||||
if (health < this.field_175194_C && player.hurtResistantTime > 0)
|
||||
if (health < this.playerHealth && player.hurtResistantTime > 0)
|
||||
{
|
||||
this.lastSystemTime = Minecraft.getSystemTime();
|
||||
this.field_175191_F = (long)(this.updateCounter + 20);
|
||||
this.healthUpdateCounter = (long)(this.updateCounter + 20);
|
||||
}
|
||||
else if (health > this.field_175194_C && player.hurtResistantTime > 0)
|
||||
else if (health > this.playerHealth && player.hurtResistantTime > 0)
|
||||
{
|
||||
this.lastSystemTime = Minecraft.getSystemTime();
|
||||
this.field_175191_F = (long)(this.updateCounter + 10);
|
||||
this.healthUpdateCounter = (long)(this.updateCounter + 10);
|
||||
}
|
||||
|
||||
if (Minecraft.getSystemTime() - this.lastSystemTime > 1000L)
|
||||
{
|
||||
this.field_175194_C = health;
|
||||
this.field_175189_D = health;
|
||||
this.playerHealth = health;
|
||||
this.lastPlayerHealth = health;
|
||||
this.lastSystemTime = Minecraft.getSystemTime();
|
||||
}
|
||||
|
||||
this.field_175194_C = health;
|
||||
int healthLast = this.field_175189_D;
|
||||
this.playerHealth = health;
|
||||
int healthLast = this.lastPlayerHealth;
|
||||
|
||||
IAttributeInstance attrMaxHealth = player.getEntityAttribute(SharedMonsterAttributes.maxHealth);
|
||||
float healthMax = (float)attrMaxHealth.getAttributeValue();
|
||||
|
@ -748,11 +748,11 @@ public class GuiIngameForge extends GuiIngame
|
|||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(4.0F, 4.0F, 4.0F);
|
||||
int l = opacity << 24 & -16777216;
|
||||
this.func_175179_f().drawString(this.field_175201_x, (float)(-this.func_175179_f().getStringWidth(this.field_175201_x) / 2), -10.0F, 16777215 | l, true);
|
||||
this.getFontRenderer().drawString(this.field_175201_x, (float)(-this.getFontRenderer().getStringWidth(this.field_175201_x) / 2), -10.0F, 16777215 | l, true);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(2.0F, 2.0F, 2.0F);
|
||||
this.func_175179_f().drawString(this.field_175200_y, (float)(-this.func_175179_f().getStringWidth(this.field_175200_y) / 2), 5.0F, 16777215 | l, true);
|
||||
this.getFontRenderer().drawString(this.field_175200_y, (float)(-this.getFontRenderer().getStringWidth(this.field_175200_y) / 2), 5.0F, 16777215 | l, true);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
|
@ -784,16 +784,16 @@ public class GuiIngameForge extends GuiIngame
|
|||
ScoreObjective scoreobjective = this.mc.theWorld.getScoreboard().getObjectiveInDisplaySlot(0);
|
||||
NetHandlerPlayClient handler = mc.thePlayer.sendQueue;
|
||||
|
||||
if (mc.gameSettings.keyBindPlayerList.isKeyDown() && (!mc.isIntegratedServerRunning() || handler.func_175106_d().size() > 1 || scoreobjective != null))
|
||||
if (mc.gameSettings.keyBindPlayerList.isKeyDown() && (!mc.isIntegratedServerRunning() || handler.getPlayerInfoMap().size() > 1 || scoreobjective != null))
|
||||
{
|
||||
this.overlayPlayerList.func_175246_a(true);
|
||||
this.overlayPlayerList.updatePlayerList(true);
|
||||
if (pre(PLAYER_LIST)) return;
|
||||
this.overlayPlayerList.func_175249_a(width, this.mc.theWorld.getScoreboard(), scoreobjective);
|
||||
this.overlayPlayerList.renderPlayerlist(width, this.mc.theWorld.getScoreboard(), scoreobjective);
|
||||
post(PLAYER_LIST);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.overlayPlayerList.func_175246_a(false);
|
||||
this.overlayPlayerList.updatePlayerList(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ public class ForgeBlockStateV1 extends Marker
|
|||
{
|
||||
JsonObject json = element.getAsJsonObject();
|
||||
ForgeBlockStateV1 ret = new ForgeBlockStateV1();
|
||||
ret.forge_marker = JsonUtils.getJsonObjectIntegerFieldValue(json, "forge_marker");
|
||||
ret.forge_marker = JsonUtils.getInt(json, "forge_marker");
|
||||
|
||||
if (json.has("defaults")) // Load defaults Variant.
|
||||
{
|
||||
|
@ -146,13 +146,13 @@ public class ForgeBlockStateV1 extends Marker
|
|||
part.state = state;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Iterator<List<Variant>> iter = v.submodels.values().iterator();
|
||||
|
||||
|
||||
while (iter.hasNext())
|
||||
{
|
||||
List<Variant> submodel = iter.next();
|
||||
|
||||
|
||||
if (submodel == null)
|
||||
iter.remove();
|
||||
}
|
||||
|
@ -430,7 +430,7 @@ public class ForgeBlockStateV1 extends Marker
|
|||
if (json.get("model").isJsonNull())
|
||||
ret.model = null; // Allow overriding base model to remove it from a state.
|
||||
else
|
||||
ret.model = getBlockLocation(JsonUtils.getJsonObjectStringFieldValue(json, "model"));
|
||||
ret.model = getBlockLocation(JsonUtils.getString(json, "model"));
|
||||
ret.modelSet = true;
|
||||
}
|
||||
|
||||
|
@ -447,8 +447,8 @@ public class ForgeBlockStateV1 extends Marker
|
|||
|
||||
if (json.has("x") || json.has("y"))
|
||||
{ // Load rotation values.
|
||||
int x = JsonUtils.getJsonObjectIntegerFieldValueOrDefault(json, "x", 0);
|
||||
int y = JsonUtils.getJsonObjectIntegerFieldValueOrDefault(json, "y", 0);
|
||||
int x = JsonUtils.getInt(json, "x", 0);
|
||||
int y = JsonUtils.getInt(json, "y", 0);
|
||||
ret.state = Optional.<IModelState>of(new TRSRTransformation(ModelRotation.getModelRotation(x, y)));
|
||||
if (!ret.state.isPresent())
|
||||
throw new JsonParseException("Invalid BlockModelRotation x: " + x + " y: " + y);
|
||||
|
@ -589,12 +589,12 @@ public class ForgeBlockStateV1 extends Marker
|
|||
|
||||
if (json.has("uvlock"))
|
||||
{ // Load uvlock.
|
||||
ret.uvLock = Optional.of(JsonUtils.getJsonObjectBooleanFieldValue(json, "uvlock"));
|
||||
ret.uvLock = Optional.of(JsonUtils.getBoolean(json, "uvlock"));
|
||||
}
|
||||
|
||||
if (json.has("weight"))
|
||||
{ // Load weight.
|
||||
ret.weight = Optional.of(JsonUtils.getJsonObjectIntegerFieldValue(json, "weight"));
|
||||
ret.weight = Optional.of(JsonUtils.getInt(json, "weight"));
|
||||
}
|
||||
|
||||
if (json.has("submodel"))
|
||||
|
|
|
@ -234,7 +234,7 @@ public class ChestGenHooks
|
|||
public ItemStack getOneItem(Random rand)
|
||||
{
|
||||
WeightedRandomChestContent item = (WeightedRandomChestContent)WeightedRandom.getRandomItem(rand, getItems(rand));
|
||||
ItemStack[] stacks = ChestGenHooks.generateStacks(rand, item.theItemId, item.theMinimumChanceToGenerateItem, item.theMaximumChanceToGenerateItem);
|
||||
ItemStack[] stacks = ChestGenHooks.generateStacks(rand, item.theItemId, item.minStackSize, item.maxStackSize);
|
||||
return (stacks.length > 0 ? stacks[0] : null);
|
||||
}
|
||||
|
||||
|
|
|
@ -670,7 +670,7 @@ public class ForgeHooks
|
|||
if (world.getTileEntity(pos) == null)
|
||||
{
|
||||
S23PacketBlockChange packet = new S23PacketBlockChange(world, pos);
|
||||
packet.field_148883_d = Blocks.air.getDefaultState();
|
||||
packet.blockState = Blocks.air.getDefaultState();
|
||||
entityPlayer.playerNetServerHandler.sendPacket(packet);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public class FakePlayer extends EntityPlayerMP
|
|||
}
|
||||
|
||||
@Override public Vec3 getPositionVector(){ return new Vec3(0, 0, 0); }
|
||||
@Override public boolean canUseCommand(int i, String s){ return false; }
|
||||
@Override public boolean canCommandSenderUseCommand(int i, String s){ return false; }
|
||||
@Override public void addChatComponentMessage(IChatComponent chatmessagecomponent){}
|
||||
@Override public void addStat(StatBase par1StatBase, int par2){}
|
||||
@Override public void openGui(Object mod, int modGuiId, World world, int x, int y, int z){}
|
||||
|
|
|
@ -64,7 +64,7 @@ public class ExplosionEvent extends Event
|
|||
/** return the list of blocks affected by the explosion. */
|
||||
public List<BlockPos> getAffectedBlocks()
|
||||
{
|
||||
return explosion.func_180343_e();
|
||||
return explosion.getAffectedBlockPositions();
|
||||
}
|
||||
|
||||
/** return the list of entities affected by the explosion. */
|
||||
|
|
|
@ -579,7 +579,7 @@ public class GuiModList extends GuiScreen
|
|||
k += GuiModList.this.fontRendererObj.getStringWidth(((ChatComponentText)part).getChatComponentText_TextValue());
|
||||
if (k >= x)
|
||||
{
|
||||
GuiModList.this.func_175276_a(part);
|
||||
GuiModList.this.handleComponentClick(part);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ public class FMLNetworkHandler
|
|||
embeddedChannel.writeOutbound(openGui);
|
||||
entityPlayerMP.openContainer = remoteGuiContainer;
|
||||
entityPlayerMP.openContainer.windowId = windowId;
|
||||
entityPlayerMP.openContainer.addCraftingToCrafters(entityPlayerMP);
|
||||
entityPlayerMP.openContainer.onCraftGuiOpened(entityPlayerMP);
|
||||
}
|
||||
}
|
||||
else if (entityPlayer instanceof FakePlayer)
|
||||
|
|
|
@ -456,7 +456,7 @@ public class FMLControlledNamespacedRegistry<I> extends RegistryNamespacedDefaul
|
|||
|
||||
for (I thing : this.typeSafeIterable())
|
||||
{
|
||||
if (!registry.field_148758_b.containsKey(thing))
|
||||
if (!registry.inverseObjectRegistry.containsKey(thing))
|
||||
{
|
||||
if (!registry.activeSubstitutions.containsKey(getNameForObject(thing).toString()))
|
||||
{
|
||||
|
|
|
@ -506,7 +506,7 @@ public class GameRegistry
|
|||
NBTBase nbttag = null;
|
||||
try
|
||||
{
|
||||
nbttag = JsonToNBT.func_180713_a(nbtString);
|
||||
nbttag = JsonToNBT.getTagFromJson(nbtString);
|
||||
} catch (NBTException e)
|
||||
{
|
||||
FMLLog.getLogger().log(Level.WARN, "Encountered an exception parsing ItemStack NBT string {}", nbtString, e);
|
||||
|
|
|
@ -180,7 +180,7 @@ public class FMLServerHandler implements IFMLSidedHandler
|
|||
{
|
||||
for (Iterator<ServerCommand> it = GenericIterableFactory.newCastingIterable(dedServer.pendingCommandList, ServerCommand.class).iterator(); it.hasNext(); )
|
||||
{
|
||||
String cmd = it.next().input.trim().toLowerCase();
|
||||
String cmd = it.next().command.trim().toLowerCase();
|
||||
|
||||
if (cmd.equals("/fml confirm"))
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ public class ForgeCommand extends CommandBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
public String getCommandName()
|
||||
{
|
||||
return "forge";
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public class ForgeCommand extends CommandBase {
|
|||
return 2;
|
||||
}
|
||||
@Override
|
||||
public void execute(ICommandSender sender, String[] args) throws CommandException
|
||||
public void processCommand(ICommandSender sender, String[] args) throws CommandException
|
||||
{
|
||||
if (args.length == 0)
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ public class ForgeCommand extends CommandBase {
|
|||
else if (args.length == 2)
|
||||
{
|
||||
if ("tps".equals(args[0])) {
|
||||
return func_175762_a(args, getServer().worldTickTimes.keySet());
|
||||
return getListOfStringsMatchingLastWord(args, getServer().worldTickTimes.keySet());
|
||||
}
|
||||
else if ("track".equals(args[0]))
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ public class ForgeCommand extends CommandBase {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private void handleTracking(ICommandSender sender, String[] args) throws CommandException
|
||||
{
|
||||
if (args.length != 3)
|
||||
|
|
|
@ -36,7 +36,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
public class ForgeBlockStatesLoaderDebug {
|
||||
public static final String MODID = "ForgeBlockStatesLoader";
|
||||
public static final String ASSETS = "forgeblockstatesloader:";
|
||||
|
||||
|
||||
public static final Block blockCustom = new CustomMappedBlock();
|
||||
public static final String nameCustomWall = "custom_wall";
|
||||
public static final BlockWall blockCustomWall = new BlockWall(Blocks.cobblestone);
|
||||
|
@ -48,42 +48,42 @@ public class ForgeBlockStatesLoaderDebug {
|
|||
return BlockWall.EnumType.byMetadata(stack.getMetadata()).getUnlocalizedName();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
{
|
||||
blockCustom.setUnlocalizedName(MODID + ".customBlock");
|
||||
GameRegistry.registerBlock(blockCustom, "customBlock");
|
||||
|
||||
|
||||
blockCustomWall.setUnlocalizedName(MODID + ".customWall");
|
||||
GameRegistry.registerBlock(blockCustomWall, null, nameCustomWall);
|
||||
GameRegistry.registerItem(itemCustomWall, nameCustomWall);
|
||||
GameData.getBlockItemMap().put(blockCustomWall, itemCustomWall);
|
||||
|
||||
|
||||
if (event.getSide() == Side.CLIENT)
|
||||
preInitClient(event);
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void preInitClient(FMLPreInitializationEvent event)
|
||||
{
|
||||
ModelLoader.setCustomStateMapper(blockCustom, new StateMap.Builder().setProperty(CustomMappedBlock.VARIANT).build());
|
||||
|
||||
ModelLoader.setCustomStateMapper(blockCustom, new StateMap.Builder().withName(CustomMappedBlock.VARIANT).build());
|
||||
|
||||
ModelLoader.setCustomStateMapper(blockCustomWall, new IStateMapper()
|
||||
{
|
||||
StateMap stateMap = new StateMap.Builder().setProperty(BlockWall.VARIANT).setBuilderSuffix("_wall").build();
|
||||
StateMap stateMap = new StateMap.Builder().withName(BlockWall.VARIANT).withSuffix("_wall").build();
|
||||
@Override
|
||||
public Map putStateModelLocations(Block block)
|
||||
{
|
||||
Map<IBlockState, ModelResourceLocation> map = (Map<IBlockState, ModelResourceLocation>) stateMap.putStateModelLocations(block);
|
||||
Map<IBlockState, ModelResourceLocation> newMap = Maps.newHashMap();
|
||||
|
||||
|
||||
for (Entry<IBlockState, ModelResourceLocation> e : map.entrySet())
|
||||
{
|
||||
ModelResourceLocation loc = e.getValue();
|
||||
newMap.put(e.getKey(), new ModelResourceLocation(ASSETS + loc.getResourcePath(), loc.getVariant()));
|
||||
}
|
||||
|
||||
|
||||
return newMap;
|
||||
}
|
||||
});
|
||||
|
@ -92,41 +92,41 @@ public class ForgeBlockStatesLoaderDebug {
|
|||
ModelLoader.setCustomModelResourceLocation(customWallItem, 1, new ModelResourceLocation(ASSETS + "mossy_cobblestone_wall", "inventory"));
|
||||
ModelBakery.addVariantName(customWallItem, ASSETS + "cobblestone_wall", ASSETS + "mossy_cobblestone_wall");
|
||||
}
|
||||
|
||||
|
||||
// this block is never actually used, it's only needed for the error message on load to see the variant it maps to
|
||||
public static class CustomMappedBlock extends Block {
|
||||
public static final PropertyEnum VARIANT = PropertyEnum.create("type", CustomVariant.class);
|
||||
|
||||
|
||||
protected CustomMappedBlock() {
|
||||
super(Material.rock);
|
||||
|
||||
|
||||
this.setUnlocalizedName(MODID + ".customMappedBlock");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState() {
|
||||
return new BlockState(this, VARIANT);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
return ((CustomVariant)state.getValue(VARIANT)).ordinal();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
if(meta > CustomVariant.values().length || meta < 0)
|
||||
meta = 0;
|
||||
|
||||
|
||||
return this.getDefaultState().withProperty(VARIANT, CustomVariant.values()[meta]);
|
||||
}
|
||||
|
||||
|
||||
public static enum CustomVariant implements IStringSerializable {
|
||||
TypeA,
|
||||
TypeB;
|
||||
|
||||
|
||||
public String getName() { return this.toString(); };
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue