mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-18 19:39:12 +00:00
35 errors left
This commit is contained in:
1 parent
570eb9c176
commit
0fe91c2d7a
6 files changed
+66
-53
No files matched your search
@@ -8,6 +8,7 @@ public net.minecraft.entity.projectile.EntityArrow field_145791_d
|
||||
public net.minecraft.entity.projectile.EntityArrow field_145792_e
|
||||
public net.minecraft.entity.projectile.EntityArrow field_70254_i
|
||||
public net.minecraft.entity.projectile.EntityArrow field_70252_j
|
||||
public net.minecraft.entity.projectile.EntityArrow field_70253_h
|
||||
public net.minecraft.entity.projectile.EntityArrow field_70257_an
|
||||
public net.minecraft.entity.projectile.EntityArrow field_70255_ao
|
||||
public net.minecraft.entity.projectile.EntityArrow field_70256_ap
|
||||
@@ -24,9 +25,10 @@ public net.minecraft.block.BlockRailBase$Rail func_150650_a()I
|
||||
public net.minecraft.client.gui.inventory.GuiContainer field_146999_f
|
||||
public net.minecraft.client.gui.inventory.GuiContainer field_147009_r
|
||||
# GuiScreen
|
||||
public net.minecraft.client.gui.inventory.GuiScreen field_146292_n #buttonList
|
||||
public net.minecraft.client.gui.GuiScreen field_146292_n #buttonList
|
||||
# ThreadDownloadImageData
|
||||
public net.minecraft.client.renderer.ThreadDownloadImageData field_110559_g #field_110559_g
|
||||
public net.minecraft.client.renderer.ThreadDownloadImageData field_110560_d #field_110560_d
|
||||
public net.minecraft.potion.PotionEffect field_76460_b
|
||||
|
||||
# needs to have a space at the end of every line or SS will derp
|
||||
@@ -227,7 +227,7 @@ public class SmelteryBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity (World world, int metadata)
|
||||
public TileEntity func_149915_a (World world, int metadata)
|
||||
{
|
||||
switch (metadata)
|
||||
{
|
||||
@@ -304,4 +304,5 @@ public class SmelteryBlock extends InventoryBlock
|
||||
}
|
||||
super.func_149749_a(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@@ -89,7 +90,7 @@ public class SlimeGrass extends MantleBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSustainPlant (World world, int x, int y, int z, ForgeDirection direction, IPlantable plant)
|
||||
public boolean canSustainPlant (IBlockAccess world, int x, int y, int z, ForgeDirection direction, IPlantable plant)
|
||||
{
|
||||
EnumPlantType plantType = plant.getPlantType(world, x, y + 1, z);
|
||||
return plantType == EnumPlantType.Plains && plant.getPlant(world, x, y + 1, z) != Blocks.tallgrass;
|
||||
|
||||
@@ -27,7 +27,7 @@ public class TClientTickHandler
|
||||
@SubscribeEvent
|
||||
public void onTick (ClientTickEvent event)
|
||||
{
|
||||
|
||||
|
||||
if (event.phase.equals(Phase.END) && event.type.equals(Type.RENDER))
|
||||
{
|
||||
TRepo.oreBerry.func_150122_b(Blocks.leaves.field_150121_P);
|
||||
@@ -38,10 +38,10 @@ public class TClientTickHandler
|
||||
}
|
||||
}
|
||||
|
||||
/* @Override
|
||||
public EnumSet<TickType> ticks ()
|
||||
{
|
||||
return EnumSet.of(TickType.RENDER);
|
||||
}
|
||||
*/
|
||||
/* @Override
|
||||
public EnumSet<TickType> ticks ()
|
||||
{
|
||||
return EnumSet.of(TickType.RENDER);
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -6,55 +6,49 @@ import tconstruct.common.TRepo;
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
import tconstruct.util.player.TPlayerStats;
|
||||
import mantle.common.ComparisonHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import cpw.mods.fml.common.ICraftingHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent;
|
||||
|
||||
public class TCraftingHandler implements ICraftingHandler
|
||||
public class TCraftingHandler //implements ICraftingHandler
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onCrafting (EntityPlayer player, ItemStack itemstack, IInventory craftMatrix)
|
||||
@SubscribeEvent
|
||||
public void onCrafting (ItemCraftedEvent event)//EntityPlayer player, ItemStack itemstack, IInventory craftMatrix)
|
||||
{
|
||||
Item item = itemstack.getItem();
|
||||
if (!player.worldObj.isRemote)
|
||||
Item item = event.crafting.getItem();
|
||||
if (!event.player.worldObj.isRemote)
|
||||
{
|
||||
if (ComparisonHelper.areEquivalent(item,TRepo.toolStationWood))
|
||||
{
|
||||
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.getDisplayName());
|
||||
NBTTagCompound tags = player.getEntityData().getCompoundTag("TConstruct");
|
||||
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(event.player.getDisplayName());
|
||||
NBTTagCompound tags = event.player.getEntityData().getCompoundTag("TConstruct");
|
||||
if (!tags.getBoolean("materialManual") || !stats.materialManual)
|
||||
{
|
||||
stats.materialManual = true;
|
||||
tags.setBoolean("materialManual", true);
|
||||
AbilityHelper.spawnItemAtPlayer(player, new ItemStack(TRepo.manualBook, 1, 1));
|
||||
AbilityHelper.spawnItemAtPlayer(event.player, new ItemStack(TRepo.manualBook, 1, 1));
|
||||
}
|
||||
}
|
||||
if (ComparisonHelper.areEquivalent(item,TRepo.smeltery) || ComparisonHelper.areEquivalent(item,TRepo.lavaTank))
|
||||
{
|
||||
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.getDisplayName());
|
||||
NBTTagCompound tags = player.getEntityData().getCompoundTag("TConstruct");
|
||||
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(event.player.getDisplayName());
|
||||
NBTTagCompound tags = event.player.getEntityData().getCompoundTag("TConstruct");
|
||||
if (!tags.getBoolean("smelteryManual") || !stats.smelteryManual)
|
||||
{
|
||||
stats.smelteryManual = true;
|
||||
tags.setBoolean("smelteryManual", true);
|
||||
AbilityHelper.spawnItemAtPlayer(player, new ItemStack(TRepo.manualBook, 1, 2));
|
||||
AbilityHelper.spawnItemAtPlayer(event.player, new ItemStack(TRepo.manualBook, 1, 2));
|
||||
}
|
||||
player.addStat(TAchievements.achievements.get("tconstruct.smelteryMaker"), 1);
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct.smelteryMaker"), 1);
|
||||
}
|
||||
|
||||
if (ComparisonHelper.areEquivalent(item,TRepo.craftingStationWood)){
|
||||
player.addStat(TAchievements.achievements.get("tconstruct.betterCrafting"), 1);
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct.betterCrafting"), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSmelting (EntityPlayer player, ItemStack item)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,11 +2,14 @@ package tconstruct.util.player;
|
||||
|
||||
import cpw.mods.fml.common.*;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import mantle.player.PlayerUtils;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.Entity.EnumEntitySize;
|
||||
@@ -22,13 +25,37 @@ import tconstruct.library.tools.AbilityHelper;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
import tconstruct.util.network.packet.PacketDoubleJump;
|
||||
|
||||
public class TPlayerHandler implements IPlayerTracker
|
||||
public class TPlayerHandler
|
||||
{
|
||||
/* Player */
|
||||
//public int hunger;
|
||||
|
||||
public ConcurrentHashMap<String, TPlayerStats> playerStats = new ConcurrentHashMap<String, TPlayerStats>();
|
||||
|
||||
@Override
|
||||
@SubscribeEvent
|
||||
public void PlayerLoggedInEvent (PlayerEvent event)
|
||||
{
|
||||
onPlayerLogin(event.player);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void PlayerLoggedOutEvent (PlayerEvent event)
|
||||
{
|
||||
savePlayerStats(event.player, true);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerChangedDimension (PlayerEvent event)
|
||||
{
|
||||
savePlayerStats(event.player, false);
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void onPlayerRespawn (PlayerEvent event)
|
||||
{
|
||||
onPlayerRespawn(event.player);
|
||||
}
|
||||
|
||||
|
||||
public void onPlayerLogin (EntityPlayer entityplayer)
|
||||
{
|
||||
//TConstruct.logger.info("Player: "+entityplayer);
|
||||
@@ -108,9 +135,9 @@ public class TPlayerHandler implements IPlayerTracker
|
||||
PHConstruct.gregtech = false;
|
||||
if (PHConstruct.lavaFortuneInteraction)
|
||||
{
|
||||
PlayerUtils.sendChatMessage(entityplayer,"Warning: Cross-mod Exploit Present!");
|
||||
PlayerUtils.sendChatMessage(entityplayer,"Solution 1: Disable Reverse Smelting recipes from GregTech.");
|
||||
PlayerUtils.sendChatMessage(entityplayer,"Solution 2: Disable Auto-Smelt/Fortune interaction from TConstruct.");
|
||||
PlayerUtils.sendChatMessage(entityplayer, "Warning: Cross-mod Exploit Present!");
|
||||
PlayerUtils.sendChatMessage(entityplayer, "Solution 1: Disable Reverse Smelting recipes from GregTech.");
|
||||
PlayerUtils.sendChatMessage(entityplayer, "Solution 2: Disable Auto-Smelt/Fortune interaction from TConstruct.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,22 +158,11 @@ public class TPlayerHandler implements IPlayerTracker
|
||||
|
||||
PacketDispatcher.sendPacketToPlayer(packet, (Player) player);
|
||||
*/
|
||||
//TODO find out what packet needs to be used here (and make sure that player actually is a playerMP and this gets called)
|
||||
if(player instanceof EntityPlayerMP){
|
||||
TConstruct.packetPipeline.sendTo(new PacketDoubleJump(), (EntityPlayerMP)player);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerLogout (EntityPlayer entityplayer)
|
||||
{
|
||||
savePlayerStats(entityplayer, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerChangedDimension (EntityPlayer entityplayer)
|
||||
{
|
||||
savePlayerStats(entityplayer, false);
|
||||
//TODO find out what packet needs to be used here (and make sure that player actually is a playerMP and this gets called)
|
||||
if (player instanceof EntityPlayerMP)
|
||||
{
|
||||
TConstruct.packetPipeline.sendTo(new PacketDoubleJump(), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
void savePlayerStats (EntityPlayer player, boolean clean)
|
||||
@@ -169,7 +185,6 @@ public class TPlayerHandler implements IPlayerTracker
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerRespawn (EntityPlayer entityplayer)
|
||||
{
|
||||
//Boom!
|
||||
|
||||
Reference in new issue
Block a user