First update pass (1/3) - ~1400 -> 82 errors
This is first update pass, which is mainly import reorganization, name fixes, etc... Although some parts of second were done where changes aren't important. Errors: ~1400 -> 82.
This commit is contained in:
@@ -243,9 +243,9 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
this.priorityByStacks[btnNum] = Math.abs( pmb.getInt( this.priorityByStacks[btnNum] ) );
|
||||
this.levelByStacks[btnNum] = Math.abs( pmb.getInt( this.levelByStacks[btnNum] ) );
|
||||
|
||||
cmb.comment = "Controls buttons on Crafting Screen : Capped at " + buttonCap;
|
||||
pmb.comment = "Controls buttons on Priority Screen : Capped at " + buttonCap;
|
||||
lmb.comment = "Controls buttons on Level Emitter Screen : Capped at " + buttonCap;
|
||||
cmb.setComment( "Controls buttons on Crafting Screen : Capped at " + buttonCap );
|
||||
pmb.setComment( "Controls buttons on Priority Screen : Capped at " + buttonCap );
|
||||
lmb.setComment( "Controls buttons on Level Emitter Screen : Capped at " + buttonCap );
|
||||
|
||||
this.craftByStacks[btnNum] = Math.min( this.craftByStacks[btnNum], buttonCap );
|
||||
this.priorityByStacks[btnNum] = Math.min( this.priorityByStacks[btnNum], buttonCap );
|
||||
@@ -353,7 +353,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
@SubscribeEvent
|
||||
public void onConfigChanged( final ConfigChangedEvent.OnConfigChangedEvent eventArgs )
|
||||
{
|
||||
if( eventArgs.modID.equals( AppEng.MOD_ID ) )
|
||||
if( eventArgs.getModID().equals( AppEng.MOD_ID ) )
|
||||
{
|
||||
this.clientSync();
|
||||
}
|
||||
@@ -378,7 +378,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
|
||||
this.setCategoryComment( "OreCamouflage", "AE2 Automatically uses alternative ores present in your instance of MC to blend better with its surroundings, if you prefer you can disable this selectively using these flags; Its important to note, that some if these items even if enabled may not be craftable in game because other items are overriding their recipes." );
|
||||
final Property p = this.get( "OreCamouflage", mt.name(), true );
|
||||
p.comment = "OreDictionary Names: " + mt.getOreName();
|
||||
p.setComment( "OreDictionary Names: " + mt.getOreName() );
|
||||
|
||||
return !p.getBoolean( true );
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.tile.AEBaseTile;
|
||||
|
||||
@@ -61,7 +61,7 @@ import appeng.services.version.VersionCheckerConfig;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
@Mod( modid = AppEng.MOD_ID, acceptedMinecraftVersions = "[1.8.9]", name = AppEng.MOD_NAME, version = AEConfig.VERSION, dependencies = AppEng.MOD_DEPENDENCIES, guiFactory = "appeng.client.gui.config.AEConfigGuiFactory" )
|
||||
@Mod( modid = AppEng.MOD_ID, acceptedMinecraftVersions = "[1.9.4]", name = AppEng.MOD_NAME, version = AEConfig.VERSION, dependencies = AppEng.MOD_DEPENDENCIES, guiFactory = "appeng.client.gui.config.AEConfigGuiFactory" )
|
||||
public final class AppEng
|
||||
{
|
||||
public static final String MOD_ID = "appliedenergistics2";
|
||||
|
||||
@@ -25,8 +25,8 @@ import java.util.Random;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
|
||||
@@ -58,7 +58,7 @@ public abstract class CommonHelper
|
||||
|
||||
public abstract boolean shouldAddParticles( Random r );
|
||||
|
||||
public abstract MovingObjectPosition getMOP();
|
||||
public abstract RayTraceResult getRTR();
|
||||
|
||||
public abstract void doRenderItem( ItemStack itemstack, World w );
|
||||
|
||||
|
||||
@@ -73,6 +73,6 @@ public final class CreativeTab extends CreativeTabs
|
||||
}
|
||||
}
|
||||
|
||||
return new ItemStack( Blocks.chest );
|
||||
return new ItemStack( Blocks.CHEST );
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,6 @@ public final class CreativeTabFacade extends CreativeTabs
|
||||
return ( (ItemFacade) maybeFacade.get() ).getCreativeTabIcon();
|
||||
}
|
||||
|
||||
return new ItemStack( Blocks.planks );
|
||||
return new ItemStack( Blocks.PLANKS );
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,6 @@ import java.util.regex.Pattern;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||
|
||||
|
||||
public class FacadeConfig extends Configuration
|
||||
@@ -49,6 +48,7 @@ public class FacadeConfig extends Configuration
|
||||
return false;
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - UniqueIdentifier => ResourceLocation ???
|
||||
final UniqueIdentifier blk = GameRegistry.findUniqueIdentifierFor( id );
|
||||
if( blk == null )
|
||||
{
|
||||
|
||||
@@ -28,9 +28,8 @@ import com.google.common.base.Preconditions;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.ChestGenHooks;
|
||||
import net.minecraft.world.DimensionType;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
@@ -117,18 +116,24 @@ import appeng.worldgen.QuartzWorldGen;
|
||||
public final class Registration
|
||||
{
|
||||
private final RecipeHandler recipeHandler;
|
||||
private BiomeGenBase storageBiome;
|
||||
private DimensionType storageDimensionType;
|
||||
private Biome storageBiome;
|
||||
|
||||
Registration()
|
||||
{
|
||||
this.recipeHandler = new RecipeHandler();
|
||||
}
|
||||
|
||||
public BiomeGenBase getStorageBiome()
|
||||
public Biome getStorageBiome()
|
||||
{
|
||||
return this.storageBiome;
|
||||
}
|
||||
|
||||
public DimensionType getStorageDimensionType()
|
||||
{
|
||||
return storageDimensionType;
|
||||
}
|
||||
|
||||
void preInitialize( final FMLPreInitializationEvent event )
|
||||
{
|
||||
this.registerSpatial( false );
|
||||
@@ -170,35 +175,38 @@ public final class Registration
|
||||
{
|
||||
if( force && config.storageBiomeID == -1 )
|
||||
{
|
||||
config.storageBiomeID = Platform.findEmpty( BiomeGenBase.getBiomeGenArray() );
|
||||
config.storageBiomeID = Platform.findEmpty( Biome.REGISTRY, 0, 256 );
|
||||
if( config.storageBiomeID == -1 )
|
||||
{
|
||||
throw new IllegalStateException( "Biome Array is full, please free up some Biome ID's or disable spatial." );
|
||||
}
|
||||
|
||||
this.storageBiome = new BiomeGenStorage( config.storageBiomeID );
|
||||
this.storageBiome = new BiomeGenStorage();
|
||||
config.save();
|
||||
}
|
||||
|
||||
if( !force && config.storageBiomeID != -1 )
|
||||
{
|
||||
this.storageBiome = new BiomeGenStorage( config.storageBiomeID );
|
||||
this.storageBiome = new BiomeGenStorage();
|
||||
}
|
||||
}
|
||||
|
||||
if( config.storageProviderID != -1 )
|
||||
{
|
||||
DimensionManager.registerProviderType( config.storageProviderID, StorageWorldProvider.class, false );
|
||||
storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.storageProviderID, StorageWorldProvider.class, false );
|
||||
}
|
||||
|
||||
if( config.storageProviderID == -1 && force )
|
||||
{
|
||||
config.storageProviderID = -11;
|
||||
|
||||
while( !DimensionManager.registerProviderType( config.storageProviderID, StorageWorldProvider.class, false ) )
|
||||
//TODO 1.9.4 - Storage provider ids aren't stored anywhere, so no way to find free one. Do something with this!
|
||||
while( DimensionManager.isDimensionRegistered( config.storageProviderID ) )
|
||||
{
|
||||
config.storageProviderID--;
|
||||
}
|
||||
|
||||
storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.storageProviderID, StorageWorldProvider.class, false );
|
||||
|
||||
config.save();
|
||||
}
|
||||
@@ -411,6 +419,7 @@ public final class Registration
|
||||
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.ChestLoot ) )
|
||||
{
|
||||
//TODO 1.9.4 - Chest Gen => Loot Tables
|
||||
final ChestGenHooks d = ChestGenHooks.getInfo( ChestGenHooks.MINESHAFT_CORRIDOR );
|
||||
|
||||
final IMaterials materials = definitions.materials();
|
||||
@@ -447,7 +456,7 @@ public final class Registration
|
||||
/**
|
||||
* You can't move bed rock.
|
||||
*/
|
||||
mr.blacklistBlock( net.minecraft.init.Blocks.bedrock );
|
||||
mr.blacklistBlock( net.minecraft.init.Blocks.BEDROCK );
|
||||
|
||||
/*
|
||||
* White List Vanilla...
|
||||
|
||||
@@ -43,8 +43,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.parts.CableRenderMode;
|
||||
|
||||
@@ -30,7 +30,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
|
||||
@@ -53,24 +53,24 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
||||
this.ingots = new HashMap<ItemStack, String>();
|
||||
this.dusts = new HashMap<String, ItemStack>();
|
||||
|
||||
this.addOre( "Coal", new ItemStack( Items.coal ) );
|
||||
this.addOre( "Charcoal", new ItemStack( Items.coal, 1, 1 ) );
|
||||
this.addOre( "Coal", new ItemStack( Items.COAL ) );
|
||||
this.addOre( "Charcoal", new ItemStack( Items.COAL, 1, 1 ) );
|
||||
|
||||
this.addOre( "NetherQuartz", new ItemStack( Blocks.quartz_ore ) );
|
||||
this.addIngot( "NetherQuartz", new ItemStack( Items.quartz ) );
|
||||
this.addOre( "NetherQuartz", new ItemStack( Blocks.QUARTZ_ORE ) );
|
||||
this.addIngot( "NetherQuartz", new ItemStack( Items.QUARTZ ) );
|
||||
|
||||
this.addOre( "Gold", new ItemStack( Blocks.gold_ore ) );
|
||||
this.addIngot( "Gold", new ItemStack( Items.gold_ingot ) );
|
||||
this.addOre( "Gold", new ItemStack( Blocks.GOLD_ORE ) );
|
||||
this.addIngot( "Gold", new ItemStack( Items.GOLD_INGOT ) );
|
||||
|
||||
this.addOre( "Iron", new ItemStack( Blocks.iron_ore ) );
|
||||
this.addIngot( "Iron", new ItemStack( Items.iron_ingot ) );
|
||||
this.addOre( "Iron", new ItemStack( Blocks.IRON_ORE ) );
|
||||
this.addIngot( "Iron", new ItemStack( Items.IRON_INGOT ) );
|
||||
|
||||
this.addOre( "Obsidian", new ItemStack( Blocks.obsidian ) );
|
||||
this.addOre( "Obsidian", new ItemStack( Blocks.OBSIDIAN ) );
|
||||
|
||||
this.addIngot( "Ender", new ItemStack( Items.ender_pearl ) );
|
||||
this.addIngot( "EnderPearl", new ItemStack( Items.ender_pearl ) );
|
||||
this.addIngot( "Ender", new ItemStack( Items.ENDER_PEARL ) );
|
||||
this.addIngot( "EnderPearl", new ItemStack( Items.ENDER_PEARL ) );
|
||||
|
||||
this.addIngot( "Wheat", new ItemStack( Items.wheat ) );
|
||||
this.addIngot( "Wheat", new ItemStack( Items.WHEAT ) );
|
||||
|
||||
OreDictionaryHandler.INSTANCE.observe( this );
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class MatterCannonAmmoRegistry implements IOreListener, IMatterCannonAmmo
|
||||
public MatterCannonAmmoRegistry()
|
||||
{
|
||||
OreDictionaryHandler.INSTANCE.observe( this );
|
||||
this.registerAmmo( new ItemStack( Items.gold_nugget ), 196.96655 );
|
||||
this.registerAmmo( new ItemStack( Items.GOLD_NUGGET ), 196.96655 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -54,23 +54,23 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
/**
|
||||
* light!
|
||||
*/
|
||||
this.addNewAttunement( new ItemStack( Blocks.torch ), TunnelType.LIGHT );
|
||||
this.addNewAttunement( new ItemStack( Blocks.glowstone ), TunnelType.LIGHT );
|
||||
this.addNewAttunement( new ItemStack( Blocks.TORCH ), TunnelType.LIGHT );
|
||||
this.addNewAttunement( new ItemStack( Blocks.GLOWSTONE ), TunnelType.LIGHT );
|
||||
|
||||
/**
|
||||
* attune based on most redstone base items.
|
||||
*/
|
||||
this.addNewAttunement( new ItemStack( Items.redstone ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Items.repeater ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.redstone_lamp ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.unpowered_comparator ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.powered_comparator ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.powered_repeater ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.unpowered_repeater ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.daylight_detector ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.redstone_wire ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.redstone_block ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.lever ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Items.REDSTONE ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Items.REPEATER ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.REDSTONE_LAMP ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.UNPOWERED_COMPARATOR ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.POWERED_COMPARATOR ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.POWERED_REPEATER ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.UNPOWERED_REPEATER ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.DAYLIGHT_DETECTOR ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.REDSTONE_WIRE ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.REDSTONE_BLOCK ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( new ItemStack( Blocks.LEVER ), TunnelType.REDSTONE );
|
||||
this.addNewAttunement( this.getModItem( "EnderIO", "itemRedstoneConduit", OreDictionary.WILDCARD_VALUE ), TunnelType.REDSTONE );
|
||||
|
||||
/**
|
||||
@@ -86,9 +86,9 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
this.addNewAttunement( parts.importBus(), TunnelType.ITEM );
|
||||
this.addNewAttunement( parts.exportBus(), TunnelType.ITEM );
|
||||
|
||||
this.addNewAttunement( new ItemStack( Blocks.hopper ), TunnelType.ITEM );
|
||||
this.addNewAttunement( new ItemStack( Blocks.chest ), TunnelType.ITEM );
|
||||
this.addNewAttunement( new ItemStack( Blocks.trapped_chest ), TunnelType.ITEM );
|
||||
this.addNewAttunement( new ItemStack( Blocks.HOPPER ), TunnelType.ITEM );
|
||||
this.addNewAttunement( new ItemStack( Blocks.CHEST ), TunnelType.ITEM );
|
||||
this.addNewAttunement( new ItemStack( Blocks.TRAPPED_CHEST ), TunnelType.ITEM );
|
||||
this.addNewAttunement( this.getModItem( "ExtraUtilities", "extractor_base", 0 ), TunnelType.ITEM );
|
||||
this.addNewAttunement( this.getModItem( "Mekanism", "PartTransmitter", 9 ), TunnelType.ITEM );
|
||||
this.addNewAttunement( this.getModItem( "EnderIO", "itemItemConduit", OreDictionary.WILDCARD_VALUE ), TunnelType.ITEM );
|
||||
@@ -97,10 +97,10 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
/**
|
||||
* attune based on lots of random item related stuff
|
||||
*/
|
||||
this.addNewAttunement( new ItemStack( Items.bucket ), TunnelType.FLUID );
|
||||
this.addNewAttunement( new ItemStack( Items.lava_bucket ), TunnelType.FLUID );
|
||||
this.addNewAttunement( new ItemStack( Items.milk_bucket ), TunnelType.FLUID );
|
||||
this.addNewAttunement( new ItemStack( Items.water_bucket ), TunnelType.FLUID );
|
||||
this.addNewAttunement( new ItemStack( Items.BUCKET ), TunnelType.FLUID );
|
||||
this.addNewAttunement( new ItemStack( Items.LAVA_BUCKET ), TunnelType.FLUID );
|
||||
this.addNewAttunement( new ItemStack( Items.MILK_BUCKET ), TunnelType.FLUID );
|
||||
this.addNewAttunement( new ItemStack( Items.WATER_BUCKET ), TunnelType.FLUID );
|
||||
this.addNewAttunement( this.getModItem( "Mekanism", "MachineBlock2", 11 ), TunnelType.FLUID );
|
||||
this.addNewAttunement( this.getModItem( "Mekanism", "PartTransmitter", 4 ), TunnelType.FLUID );
|
||||
this.addNewAttunement( this.getModItem( "ExtraUtilities", "extractor_base", 6 ), TunnelType.FLUID );
|
||||
|
||||
@@ -96,8 +96,8 @@ public final class WorldGenRegistry implements IWorldGen
|
||||
}
|
||||
|
||||
final boolean isBadProvider = this.types[type.ordinal()].badProviders.contains( w.provider.getClass() );
|
||||
final boolean isBadDimension = this.types[type.ordinal()].badDimensions.contains( w.provider.getDimensionId() );
|
||||
final boolean isGoodDimension = this.types[type.ordinal()].enabledDimensions.contains( w.provider.getDimensionId() );
|
||||
final boolean isBadDimension = this.types[type.ordinal()].badDimensions.contains( w.provider.getDimension() );
|
||||
final boolean isGoodDimension = this.types[type.ordinal()].enabledDimensions.contains( w.provider.getDimension() );
|
||||
|
||||
if( isBadProvider || isBadDimension )
|
||||
{
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
|
||||
package appeng.core.localization;
|
||||
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
public enum ButtonToolTips
|
||||
{
|
||||
@@ -153,7 +151,7 @@ public enum ButtonToolTips
|
||||
|
||||
public String getLocal()
|
||||
{
|
||||
return StatCollector.translateToLocal( this.getUnlocalized() );
|
||||
return I18n.translateToLocal( this.getUnlocalized() );
|
||||
}
|
||||
|
||||
public String getUnlocalized()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.core.localization;
|
||||
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
|
||||
public enum GuiText
|
||||
@@ -199,7 +199,7 @@ public enum GuiText
|
||||
|
||||
public String getLocal()
|
||||
{
|
||||
return StatCollector.translateToLocal( this.getUnlocalized() );
|
||||
return I18n.translateToLocal( this.getUnlocalized() );
|
||||
}
|
||||
|
||||
public String getUnlocalized()
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package appeng.core.localization;
|
||||
|
||||
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
|
||||
|
||||
public enum PlayerMessages
|
||||
@@ -42,9 +42,9 @@ public enum PlayerMessages
|
||||
StationCanNotBeLocated,
|
||||
SettingCleared, ;
|
||||
|
||||
public IChatComponent get()
|
||||
public ITextComponent get()
|
||||
{
|
||||
return new ChatComponentTranslation( this.getName() );
|
||||
return new TextComponentTranslation( this.getName() );
|
||||
}
|
||||
|
||||
String getName()
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
|
||||
package appeng.core.localization;
|
||||
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
public enum WailaText
|
||||
{
|
||||
@@ -46,7 +44,7 @@ public enum WailaText
|
||||
|
||||
public String getLocal()
|
||||
{
|
||||
return StatCollector.translateToLocal( this.getUnlocalized() );
|
||||
return I18n.translateToLocal( this.getUnlocalized() );
|
||||
}
|
||||
|
||||
public String getUnlocalized()
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.core.stats;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.stats.StatBasic;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
|
||||
|
||||
public enum Stats
|
||||
@@ -51,7 +51,7 @@ public enum Stats
|
||||
{
|
||||
if( this.stat == null )
|
||||
{
|
||||
this.stat = new StatBasic( "stat.ae2." + this.name(), new ChatComponentTranslation( "stat.ae2." + this.name() ) );
|
||||
this.stat = new StatBasic( "stat.ae2." + this.name(), new TextComponentTranslation( "stat.ae2." + this.name() ) );
|
||||
this.stat.registerStat();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
|
||||
@@ -58,7 +58,7 @@ public final class AppEngServerPacketHandler extends AppEngPacketHandlerBase imp
|
||||
};
|
||||
|
||||
pack.setCallParam( callState );
|
||||
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, ( (EntityPlayerMP) player ).getServerForPlayer() );
|
||||
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, ( (EntityPlayerMP) player ).getServer() );
|
||||
callState.call( pack );
|
||||
}
|
||||
catch( final InstantiationException e )
|
||||
|
||||
@@ -82,7 +82,7 @@ public class NetworkHandler
|
||||
@SubscribeEvent
|
||||
public void newConnection( final ServerConnectionFromClientEvent ev )
|
||||
{
|
||||
WorldData.instance().dimensionData().sendToPlayer( ev.manager );
|
||||
WorldData.instance().dimensionData().sendToPlayer( ev.getManager() );
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@@ -97,12 +97,12 @@ public class NetworkHandler
|
||||
@SubscribeEvent
|
||||
public void serverPacket( final ServerCustomPacketEvent ev )
|
||||
{
|
||||
final NetHandlerPlayServer srv = (NetHandlerPlayServer) ev.packet.handler();
|
||||
final NetHandlerPlayServer srv = (NetHandlerPlayServer) ev.getPacket().handler();
|
||||
if( this.serveHandler != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
this.serveHandler.onPacketData( null, ev.handler, ev.packet, srv.playerEntity );
|
||||
this.serveHandler.onPacketData( null, ev.getHandler(), ev.getPacket(), srv.playerEntity );
|
||||
}
|
||||
catch( final ThreadQuickExitException ignored )
|
||||
{
|
||||
@@ -118,7 +118,7 @@ public class NetworkHandler
|
||||
{
|
||||
try
|
||||
{
|
||||
this.clientHandler.onPacketData( null, ev.handler, ev.packet, null );
|
||||
this.clientHandler.onPacketData( null, ev.getHandler(), ev.getPacket(), null );
|
||||
}
|
||||
catch( final ThreadQuickExitException ignored )
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ import io.netty.buffer.Unpooled;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IComparableDefinition;
|
||||
|
||||
@@ -41,8 +41,8 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.gui.implementations.GuICraftingCPU;
|
||||
import appeng.client.gui.implementations.GuiCraftConfirm;
|
||||
import appeng.client.gui.implementations.GuiCraftingCPU;
|
||||
import appeng.client.gui.implementations.GuiMEMonitorable;
|
||||
import appeng.client.gui.implementations.GuiNetworkStatus;
|
||||
import appeng.core.AELog;
|
||||
@@ -154,9 +154,9 @@ public class PacketMEInventoryUpdate extends AppEngPacket
|
||||
( (GuiCraftConfirm) gs ).postUpdate( this.list, this.ref );
|
||||
}
|
||||
|
||||
if( gs instanceof GuiCraftingCPU )
|
||||
if( gs instanceof GuICraftingCPU )
|
||||
{
|
||||
( (GuiCraftingCPU) gs ).postUpdate( this.list, this.ref );
|
||||
( (GuICraftingCPU) gs ).postUpdate( this.list, this.ref );
|
||||
}
|
||||
|
||||
if( gs instanceof GuiMEMonitorable )
|
||||
|
||||
@@ -96,7 +96,7 @@ public class PacketMatterCannon extends AppEngPacket
|
||||
final World world = FMLClientHandler.instance().getClient().theWorld;
|
||||
for( int a = 1; a < this.len; a++ )
|
||||
{
|
||||
final MatterCannonFX fx = new MatterCannonFX( world, this.x + this.dx * a, this.y + this.dy * a, this.z + this.dz * a, Items.diamond );
|
||||
final MatterCannonFX fx = new MatterCannonFX( world, this.x + this.dx * a, this.y + this.dy * a, this.z + this.dz * a, Items.DIAMOND );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
@@ -62,7 +62,7 @@ public class PacketNewStorageDimension extends AppEngPacket
|
||||
{
|
||||
try
|
||||
{
|
||||
DimensionManager.registerDimension( this.newDim, AEConfig.instance.storageProviderID );
|
||||
DimensionManager.registerDimension( this.newDim, AppEng.instance().getRegistration().getStorageDimensionType() );
|
||||
}
|
||||
catch( final IllegalArgumentException iae )
|
||||
{
|
||||
|
||||
@@ -24,8 +24,8 @@ import io.netty.buffer.Unpooled;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
@@ -73,6 +73,7 @@ public class PacketPartPlacement extends AppEngPacket
|
||||
final EntityPlayerMP sender = (EntityPlayerMP) player;
|
||||
CommonHelper.proxy.updateRenderMode( sender );
|
||||
PartPlacement.setEyeHeight( this.eyeHeight );
|
||||
//TODO 1.9.4 - 2 hands! Just do something!
|
||||
PartPlacement.place( sender.getHeldItem(), new BlockPos( this.x, this.y, this.z ), EnumFacing.VALUES[this.face], sender, sender.worldObj, PartPlacement.PlaceType.INTERACT_FIRST_PASS, 0 );
|
||||
CommonHelper.proxy.updateRenderMode( null );
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -92,16 +92,16 @@ public class PacketTransitionEffect extends AppEngPacket
|
||||
{
|
||||
if( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) )
|
||||
{
|
||||
final EnergyFx fx = new EnergyFx( world, this.x + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), this.y + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), this.z + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), Items.diamond );
|
||||
final EnergyFx fx = new EnergyFx( world, this.x + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), this.y + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), this.z + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), Items.DIAMOND );
|
||||
|
||||
if( !this.mode )
|
||||
{
|
||||
fx.fromItem( this.d );
|
||||
}
|
||||
|
||||
fx.motionX = -0.1 * this.d.xOffset;
|
||||
fx.motionY = -0.1 * this.d.yOffset;
|
||||
fx.motionZ = -0.1 * this.d.zOffset;
|
||||
fx.setMotionX( -0.1f * this.d.xOffset);
|
||||
fx.setMotionY( -0.1f * this.d.yOffset);
|
||||
fx.setMotionZ( -0.1f * this.d.zOffset);
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public class PacketTransitionEffect extends AppEngPacket
|
||||
{
|
||||
final Block block = world.getBlockState( new BlockPos( (int) this.x, (int) this.y, (int) this.z ) ).getBlock();
|
||||
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound( new PositionedSoundRecord( new ResourceLocation( block.stepSound.getBreakSound() ), ( block.stepSound.getVolume() + 1.0F ) / 2.0F, block.stepSound.getFrequency() * 0.8F, (float) this.x + 0.5F, (float) this.y + 0.5F, (float) this.z + 0.5F ) );
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound( new PositionedSoundRecord( block.getSoundType().getBreakSound(), SoundCategory.BLOCKS, ( block.getSoundType().getVolume() + 1.0F ) / 2.0F, block.getSoundType().getPitch() * 0.8F, (float) this.x + 0.5F, (float) this.y + 0.5F, (float) this.z + 0.5F ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigurableObject;
|
||||
import appeng.client.gui.implementations.GuiCraftingCPU;
|
||||
import appeng.client.gui.implementations.GuICraftingCPU;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.implementations.ContainerCellWorkbench;
|
||||
import appeng.container.implementations.ContainerCraftConfirm;
|
||||
@@ -97,6 +97,7 @@ public class PacketValueConfig extends AppEngPacket
|
||||
{
|
||||
final Container c = player.openContainer;
|
||||
|
||||
//TODO 1.9.4 - 2 hands! Just do something!
|
||||
if( this.Name.equals( "Item" ) && player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IMouseWheelItem )
|
||||
{
|
||||
final ItemStack is = player.getHeldItem();
|
||||
@@ -249,9 +250,9 @@ public class PacketValueConfig extends AppEngPacket
|
||||
else if( this.Name.equals( "CraftingStatus" ) && this.Value.equals( "Clear" ) )
|
||||
{
|
||||
final GuiScreen gs = Minecraft.getMinecraft().currentScreen;
|
||||
if( gs instanceof GuiCraftingCPU )
|
||||
if( gs instanceof GuICraftingCPU )
|
||||
{
|
||||
( (GuiCraftingCPU) gs ).clearItems();
|
||||
( (GuICraftingCPU) gs ).clearItems();
|
||||
}
|
||||
}
|
||||
else if( c instanceof IConfigurableObject )
|
||||
|
||||
@@ -33,7 +33,7 @@ import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
import appeng.api.util.WorldCoord;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketNewStorageDimension;
|
||||
import appeng.hooks.TickHandler;
|
||||
@@ -88,7 +88,7 @@ final class DimensionData implements IWorldDimensionData, IOnWorldStartable, IOn
|
||||
{
|
||||
for( final Integer storageCellDimID : this.storageCellDimensionIDs )
|
||||
{
|
||||
DimensionManager.registerDimension( storageCellDimID, AEConfig.instance.storageProviderID );
|
||||
DimensionManager.registerDimension( storageCellDimID, AppEng.instance().getRegistration().getStorageDimensionType() );
|
||||
}
|
||||
|
||||
this.config.save();
|
||||
@@ -111,7 +111,7 @@ final class DimensionData implements IWorldDimensionData, IOnWorldStartable, IOn
|
||||
public void addStorageCell( final int newStorageCellID )
|
||||
{
|
||||
this.storageCellDimensionIDs.add( newStorageCellID );
|
||||
DimensionManager.registerDimension( newStorageCellID, AEConfig.instance.storageProviderID );
|
||||
DimensionManager.registerDimension( newStorageCellID, AppEng.instance().getRegistration().getStorageDimensionType() );
|
||||
|
||||
NetworkHandler.instance.sendToAll( new PacketNewStorageDimension( newStorageCellID ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user