Port to 1.11
This commit is contained in:
@@ -28,8 +28,6 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -134,10 +132,10 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
{
|
||||
if( trigger != null )
|
||||
{
|
||||
if( FluidContainerRegistry.isContainer( trigger ) )
|
||||
{
|
||||
return TunnelType.FLUID;
|
||||
}
|
||||
// if( FluidRegistry.isContainer( trigger ) )
|
||||
// {
|
||||
// return TunnelType.FLUID;
|
||||
// }
|
||||
|
||||
for( final ItemStack is : this.tunnels.keySet() )
|
||||
{
|
||||
@@ -159,7 +157,8 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
@Nullable
|
||||
private ItemStack getModItem( final String modID, final String name, final int meta )
|
||||
{
|
||||
final Item item = GameRegistry.findItem( modID, name );
|
||||
|
||||
final Item item = Item.getByNameOrId( modID + ":" + name );
|
||||
|
||||
if( item == null )
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
|
||||
|
||||
if( !this.isWirelessTerminal( item ) )
|
||||
{
|
||||
player.addChatMessage( PlayerMessages.DeviceNotWirelessTerminal.get() );
|
||||
player.sendMessage( PlayerMessages.DeviceNotWirelessTerminal.get() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
|
||||
final String unparsedKey = handler.getEncryptionKey( item );
|
||||
if( unparsedKey.isEmpty() )
|
||||
{
|
||||
player.addChatMessage( PlayerMessages.DeviceNotLinked.get() );
|
||||
player.sendMessage( PlayerMessages.DeviceNotLinked.get() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
|
||||
final ILocatable securityStation = AEApi.instance().registries().locatable().getLocatableBy( parsedKey );
|
||||
if( securityStation == null )
|
||||
{
|
||||
player.addChatMessage( PlayerMessages.StationCanNotBeLocated.get() );
|
||||
player.sendMessage( PlayerMessages.StationCanNotBeLocated.get() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
|
||||
}
|
||||
else
|
||||
{
|
||||
player.addChatMessage( PlayerMessages.DeviceNotPowered.get() );
|
||||
player.sendMessage( PlayerMessages.DeviceNotPowered.get() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
||||
if( ratio > 1 )
|
||||
{
|
||||
final ItemStack extra = is.copy();
|
||||
extra.stackSize = ratio - 1;
|
||||
extra.setCount( ratio - 1 );
|
||||
this.addRecipe( item, is, extra, (float) ( AEConfig.instance().getOreDoublePercentage() / 100.0 ), 8 );
|
||||
}
|
||||
else
|
||||
@@ -305,12 +305,12 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
||||
if( name.equals( d.getValue() ) )
|
||||
{
|
||||
final ItemStack is = item.copy();
|
||||
is.stackSize = 1;
|
||||
is.setCount( 1 );
|
||||
final int ratio = this.getDustToOreRatio( name );
|
||||
if( ratio > 1 )
|
||||
{
|
||||
final ItemStack extra = is.copy();
|
||||
extra.stackSize = ratio - 1;
|
||||
extra.setCount( ratio - 1 );
|
||||
this.addRecipe( d.getKey(), is, extra, (float) ( AEConfig.instance().getOreDoublePercentage() / 100.0 ), 8 );
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user