mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 04:09:51 +00:00
Some import renames and compile error fixes, killed ~800.
This commit is contained in:
1 parent
1f80eb17df
commit
ac7c4d2f6c
90 files changed
+454
-441
No files matched your search
@@ -557,13 +557,13 @@ public class ForgeHooks
|
||||
"((?:[a-z0-9]{2,}:\\/\\/)?(?:(?:[0-9]{1,3}\\.){3}[0-9]{1,3}|(?:[-\\w_\\.]{1,}\\.[a-z]{2,}?))(?::[0-9]{1,5})?.*?(?=[!\"\u00A7 \n]|$))",
|
||||
Pattern.CASE_INSENSITIVE);
|
||||
|
||||
public static IChatComponent newChatWithLinks(String string){ return newChatWithLinks(string, true); }
|
||||
public static IChatComponent newChatWithLinks(String string, boolean allowMissingHeader)
|
||||
public static ITextComponent newChatWithLinks(String string){ return newChatWithLinks(string, true); }
|
||||
public static ITextComponent newChatWithLinks(String string, boolean allowMissingHeader)
|
||||
{
|
||||
// Includes ipv4 and domain pattern
|
||||
// Matches an ip (xx.xxx.xx.xxx) or a domain (something.com) with or
|
||||
// without a protocol or path.
|
||||
IChatComponent ichat = null;
|
||||
ITextComponent ichat = null;
|
||||
Matcher matcher = URL_PATTERN.matcher(string);
|
||||
int lastEnd = 0;
|
||||
|
||||
@@ -578,13 +578,13 @@ public class ForgeHooks
|
||||
if (part.length() > 0)
|
||||
{
|
||||
if (ichat == null)
|
||||
ichat = new ChatComponentText(part);
|
||||
ichat = new TextComponentString(part);
|
||||
else
|
||||
ichat.appendText(part);
|
||||
}
|
||||
lastEnd = end;
|
||||
String url = string.substring(start, end);
|
||||
IChatComponent link = new ChatComponentText(url);
|
||||
ITextComponent link = new TextComponentString(url);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -594,7 +594,7 @@ public class ForgeHooks
|
||||
if (!allowMissingHeader)
|
||||
{
|
||||
if (ichat == null)
|
||||
ichat = new ChatComponentText(url);
|
||||
ichat = new TextComponentString(url);
|
||||
else
|
||||
ichat.appendText(url);
|
||||
continue;
|
||||
@@ -605,7 +605,7 @@ public class ForgeHooks
|
||||
catch (URISyntaxException e)
|
||||
{
|
||||
// Bad syntax bail out!
|
||||
if (ichat == null) ichat = new ChatComponentText(url);
|
||||
if (ichat == null) ichat = new TextComponentString(url);
|
||||
else ichat.appendText(url);
|
||||
continue;
|
||||
}
|
||||
@@ -624,7 +624,7 @@ public class ForgeHooks
|
||||
// Append the rest of the message.
|
||||
String end = string.substring(lastEnd);
|
||||
if (ichat == null)
|
||||
ichat = new ChatComponentText(end);
|
||||
ichat = new TextComponentString(end);
|
||||
else if (end.length() > 0)
|
||||
ichat.appendText(string.substring(lastEnd));
|
||||
return ichat;
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
@@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableTable;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
public class ExtendedBlockState extends BlockState
|
||||
public class ExtendedBlockState extends BlockStateContainer
|
||||
{
|
||||
private final ImmutableSet<IUnlistedProperty<?>> unlistedProperties;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ExtendedBlockState extends BlockState
|
||||
}
|
||||
this.unlistedProperties = builder.build();
|
||||
}
|
||||
|
||||
|
||||
public Collection<IUnlistedProperty<?>> getUnlistedProperties()
|
||||
{
|
||||
return unlistedProperties;
|
||||
@@ -143,13 +143,13 @@ public class ExtendedBlockState extends BlockState
|
||||
this.normalMap = map;
|
||||
super.buildPropertyValueTable(map);
|
||||
}
|
||||
|
||||
|
||||
private ExtendedStateImplementation setMap(@SuppressWarnings("rawtypes") Map<Map<IProperty, Comparable>, BlockState.StateImplementation> map)
|
||||
{
|
||||
this.normalMap = map;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public IBlockState getClean()
|
||||
{
|
||||
return this.normalMap.get(getProperties());
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.io.Serializable;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.minecraft.network.play.client.C15PacketClientSettings;
|
||||
import net.minecraft.server.management.ItemInWorldManager;
|
||||
import net.minecraft.stats.StatBase;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
@@ -24,7 +24,7 @@ public class FakePlayer extends EntityPlayerMP
|
||||
|
||||
@Override public Vec3 getPositionVector(){ return new Vec3(0, 0, 0); }
|
||||
@Override public boolean canCommandSenderUseCommand(int i, String s){ return false; }
|
||||
@Override public void addChatComponentMessage(IChatComponent chatmessagecomponent){}
|
||||
@Override public void addChatComponentMessage(ITextComponent 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){}
|
||||
@Override public boolean isEntityInvulnerable(DamageSource source){ return true; }
|
||||
|
||||
Reference in new issue
Block a user