More FIXME fixes
This commit is contained in:
@@ -40,6 +40,8 @@ import net.minecraft.util.Direction;
|
|||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.BlockRayTraceResult;
|
import net.minecraft.util.math.BlockRayTraceResult;
|
||||||
|
import net.minecraft.util.text.ITextComponent;
|
||||||
|
import net.minecraft.util.text.StringTextComponent;
|
||||||
import net.minecraft.world.IBlockReader;
|
import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.IWorld;
|
import net.minecraft.world.IWorld;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@@ -185,11 +187,16 @@ public abstract class AEBaseTileBlock<T extends AEBaseTile> extends AEBaseBlock
|
|||||||
@Override
|
@Override
|
||||||
public void onBlockPlacedBy(final World w, final BlockPos pos, final BlockState state, final LivingEntity placer,
|
public void onBlockPlacedBy(final World w, final BlockPos pos, final BlockState state, final LivingEntity placer,
|
||||||
final ItemStack is) {
|
final ItemStack is) {
|
||||||
if (is.hasDisplayName()) {
|
// Inherit the item stack's display name, but only if it's a user defined string
|
||||||
final TileEntity te = this.getTileEntity(w, pos);
|
// rather
|
||||||
if (te instanceof AEBaseTile) {
|
// than a translation component, since our custom naming cannot handle
|
||||||
// FIXME: Check if this will make it translated
|
// untranslated
|
||||||
((AEBaseTile) w.getTileEntity(pos)).setName(is.getDisplayName().getString());
|
// I18N strings and we would translate it using the server's locale :-(
|
||||||
|
AEBaseTile te = this.getTileEntity(w, pos);
|
||||||
|
if (te != null && is.hasDisplayName()) {
|
||||||
|
ITextComponent displayName = is.getDisplayName();
|
||||||
|
if (displayName instanceof StringTextComponent) {
|
||||||
|
te.setName(((StringTextComponent) displayName).getText());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,23 +92,10 @@ public final class AppEng {
|
|||||||
public static final String MOD_ID = "appliedenergistics2";
|
public static final String MOD_ID = "appliedenergistics2";
|
||||||
public static final String MOD_NAME = "Applied Energistics 2";
|
public static final String MOD_NAME = "Applied Energistics 2";
|
||||||
|
|
||||||
// FIXME replicate this in mods.toml!
|
|
||||||
// FIXME private static final String FORGE_CURRENT_VERSION =
|
|
||||||
// ForgeVersion.getVersion();
|
|
||||||
// FIXME private static final String FORGE_MAX_VERSION = (
|
|
||||||
// ForgeVersion.majorVersion + 1 ) + ".0.0.0";
|
|
||||||
// FIXME public static final String MOD_DEPENDENCIES = "required-after:forge@["
|
|
||||||
// + FORGE_CURRENT_VERSION + "," + FORGE_MAX_VERSION + ");after:ctm@[" +
|
|
||||||
// CTM.VERSION + ",);";
|
|
||||||
|
|
||||||
private static AppEng INSTANCE;
|
private static AppEng INSTANCE;
|
||||||
|
|
||||||
private final Registration registration;
|
private final Registration registration;
|
||||||
|
|
||||||
/**
|
|
||||||
* determined in pre-init but used in init
|
|
||||||
*/
|
|
||||||
|
|
||||||
public AppEng() {
|
public AppEng() {
|
||||||
if (INSTANCE != null) {
|
if (INSTANCE != null) {
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
|
|||||||
@@ -168,9 +168,6 @@ public abstract class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicSt
|
|||||||
|
|
||||||
final ItemStack is = player.getHeldItem(hand);
|
final ItemStack is = player.getHeldItem(hand);
|
||||||
|
|
||||||
// UniqueIdentifier id = GameRegistry.findUniqueIdentifierFor( is.getItem() );
|
|
||||||
// AELog.info( "ID:" + id.toString() + " : " + is.getItemDamage() );
|
|
||||||
|
|
||||||
final TunnelType tt = AEApi.instance().registries().p2pTunnel().getTunnelTypeByItem(is);
|
final TunnelType tt = AEApi.instance().registries().p2pTunnel().getTunnelTypeByItem(is);
|
||||||
if (!is.isEmpty() && is.getItem() instanceof IMemoryCard) {
|
if (!is.isEmpty() && is.getItem() instanceof IMemoryCard) {
|
||||||
final IMemoryCard mc = (IMemoryCard) is.getItem();
|
final IMemoryCard mc = (IMemoryCard) is.getItem();
|
||||||
|
|||||||
Reference in New Issue
Block a user