mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-17 17:54:04 +00:00
Fix Javadocs and code issues.
This commit is contained in:
@@ -19,14 +19,12 @@
|
||||
|
||||
package com.sk89q.worldedit.forge;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.sk89q.worldedit.blocks.BaseItemStack;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.sk89q.worldedit.blocks.BaseItemStack;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import java.util.Map;
|
||||
|
||||
public final class ForgeUtil {
|
||||
|
||||
@@ -41,7 +39,7 @@ public final class ForgeUtil {
|
||||
public static ItemStack toForgeItemStack(BaseItemStack item) {
|
||||
ItemStack ret = new ItemStack(item.getType(), item.getAmount(), item.getData());
|
||||
for (Map.Entry<Integer, Integer> entry : item.getEnchantments().entrySet()) {
|
||||
ret.addEnchantment(net.minecraft.enchantment.Enchantment.enchantmentsList[((Integer)entry.getKey()).intValue()], ((Integer)entry.getValue()).intValue());
|
||||
ret.addEnchantment(net.minecraft.enchantment.Enchantment.enchantmentsList[((Integer) entry.getKey())], (Integer) entry.getValue());
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@@ -33,7 +33,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
/**
|
||||
* Utility methods for setting tile entities in the world.
|
||||
*/
|
||||
class TileEntityUtils {
|
||||
final class TileEntityUtils {
|
||||
|
||||
private TileEntityUtils() {
|
||||
}
|
||||
@@ -110,7 +110,8 @@ class TileEntityUtils {
|
||||
* @param clazz the class
|
||||
* @return a tile entity (may be null if it failed)
|
||||
*/
|
||||
static @Nullable TileEntity constructTileEntity(World world, Vector position, Class<? extends TileEntity> clazz) {
|
||||
@Nullable
|
||||
static TileEntity constructTileEntity(World world, Vector position, Class<? extends TileEntity> clazz) {
|
||||
Constructor<? extends TileEntity> baseConstructor;
|
||||
try {
|
||||
baseConstructor = clazz.getConstructor(); // creates "blank" TE
|
||||
|
@@ -33,6 +33,7 @@ import cpw.mods.fml.common.network.Player;
|
||||
public class WECUIPacketHandler implements IPacketHandler {
|
||||
public static final Charset UTF_8_CHARSET = Charset.forName("UTF-8");
|
||||
|
||||
@Override
|
||||
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) {
|
||||
if (player instanceof EntityPlayerMP) {
|
||||
LocalSession session = ForgeWorldEdit.inst.getSession((EntityPlayerMP) player);
|
||||
|
Reference in New Issue
Block a user