FIXME removals
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.block.networking;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import appeng.bootstrap.BlockRenderingCustomizer;
|
||||
import appeng.bootstrap.IBlockRendering;
|
||||
import appeng.bootstrap.IItemRendering;
|
||||
|
||||
// FIXME REMOVE
|
||||
public class BlockEnergyCellRendering extends BlockRenderingCustomizer {
|
||||
|
||||
private final ResourceLocation baseModel;
|
||||
|
||||
public BlockEnergyCellRendering(ResourceLocation baseModel) {
|
||||
this.baseModel = baseModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void customize(IBlockRendering rendering, IItemRendering itemRendering) {
|
||||
// Note: Since we use the block models, we dont need to register custom variants
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,6 @@ public class CableBusColor implements IBlockColor {
|
||||
@Override
|
||||
public int getColor(BlockState state, @Nullable ILightReader worldIn, @Nullable BlockPos pos, int color) {
|
||||
|
||||
// FIXME: Once COLOR becomes part of the block state, change this
|
||||
AEColor busColor = AEColor.TRANSPARENT;
|
||||
|
||||
if (worldIn != null && pos != null) {
|
||||
|
||||
@@ -34,12 +34,6 @@ public class CableBusRendering extends BlockRenderingCustomizer {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void customize(IBlockRendering rendering, IItemRendering itemRendering) {
|
||||
/*
|
||||
* FIXME this was previously
|
||||
*
|
||||
* @Override public boolean canRenderInLayer( BlockState state, BlockRenderLayer
|
||||
* layer ) { return true; }
|
||||
*/
|
||||
rendering.renderType(rt -> true);
|
||||
|
||||
rendering.blockColor(new CableBusColor());
|
||||
|
||||
@@ -51,7 +51,7 @@ public class GuiSkyChest extends AEBaseGui<ContainerSkyChest> {
|
||||
|
||||
@Override
|
||||
protected boolean enableSpaceClicking() {
|
||||
// FIXME return !Integrations.invTweaks().isEnabled();
|
||||
// NOTE: previously checked for inventory tweaks mod (which no longer exists)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,17 +36,17 @@ public class GuiScrollbar implements IScrollSource {
|
||||
private int minScroll = 0;
|
||||
private int currentScroll = 0;
|
||||
|
||||
public void draw(final AEBaseGui g) {
|
||||
public void draw(final AEBaseGui<?> g) {
|
||||
g.bindTexture("minecraft", "gui/container/creative_inventory/tabs.png");
|
||||
RenderSystem.color4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
if (this.getRange() == 0) {
|
||||
GuiUtils.drawTexturedModalRect(this.displayX, this.displayY, 232 + this.width, 0, this.width, 15,
|
||||
0 /* FIXME: this used the GUI's zIndex before */ );
|
||||
g.getBlitOffset());
|
||||
} else {
|
||||
final int offset = (this.currentScroll - this.minScroll) * (this.height - 15) / this.getRange();
|
||||
GuiUtils.drawTexturedModalRect(this.displayX, offset + this.displayY, 232, 0, this.width, 15,
|
||||
0 /* FIXME: this used the GUI's zIndex before */ );
|
||||
g.getBlitOffset());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,11 +18,18 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -52,6 +59,13 @@ import appeng.util.Platform;
|
||||
*/
|
||||
public class SlotRestrictedInput extends AppEngSlot {
|
||||
|
||||
private static final List<ResourceLocation> METAL_INGOT_TAGS = ImmutableList.of(
|
||||
new ResourceLocation("forge:ingots/copper"), new ResourceLocation("forge:ingots/tin"),
|
||||
new ResourceLocation("forge:ingots/iron"), new ResourceLocation("forge:ingots/gold"),
|
||||
new ResourceLocation("forge:ingots/lead"), new ResourceLocation("forge:ingots/bronze"),
|
||||
new ResourceLocation("forge:ingots/brass"), new ResourceLocation("forge:ingots/nickel"),
|
||||
new ResourceLocation("forge:ingots/aluminium"));
|
||||
|
||||
private final PlacableItemType which;
|
||||
private final PlayerInventory p;
|
||||
private boolean allowEdit = true;
|
||||
@@ -234,15 +248,11 @@ public class SlotRestrictedInput extends AppEngSlot {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (final String name : new String[] { "Copper", "Tin", "Obsidian", "Iron", "Lead", "Bronze", "Brass",
|
||||
"Nickel", "Aluminium" }) {
|
||||
// FIXME for( final ItemStack ingot : OreDictionary.getOres( "ingot" + name ) )
|
||||
// FIXME {
|
||||
// FIXME if( Platform.itemComparisons().isSameItem( i, ingot ) )
|
||||
// FIXME {
|
||||
// FIXME return true;
|
||||
// FIXME }
|
||||
// FIXME }
|
||||
Set<ResourceLocation> itemTags = i.getItem().getTags();
|
||||
for (ResourceLocation tagName : METAL_INGOT_TAGS) {
|
||||
if (itemTags.contains(tagName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -67,7 +67,6 @@ import appeng.block.networking.BlockCreativeEnergyCell;
|
||||
import appeng.block.networking.BlockDenseEnergyCell;
|
||||
import appeng.block.networking.BlockEnergyAcceptor;
|
||||
import appeng.block.networking.BlockEnergyCell;
|
||||
import appeng.block.networking.BlockEnergyCellRendering;
|
||||
import appeng.block.networking.BlockWireless;
|
||||
import appeng.block.networking.CableBusRendering;
|
||||
import appeng.block.networking.ControllerRendering;
|
||||
@@ -453,12 +452,11 @@ public final class ApiBlocks implements IBlocks {
|
||||
this.energyCell = registry.block("energy_cell", BlockEnergyCell::new).features(AEFeature.ENERGY_CELLS)
|
||||
.item(AEBaseBlockItemChargeable::new)
|
||||
.tileEntity(registry.tileEntity("energy_cell", TileEnergyCell.class, TileEnergyCell::new).build())
|
||||
.rendering(new BlockEnergyCellRendering(new ResourceLocation(AppEng.MOD_ID, "energy_cell"))).build();
|
||||
.build();
|
||||
this.energyCellDense = registry.block("dense_energy_cell", BlockDenseEnergyCell::new)
|
||||
.features(AEFeature.ENERGY_CELLS, AEFeature.DENSE_ENERGY_CELLS).item(AEBaseBlockItemChargeable::new)
|
||||
.tileEntity(registry
|
||||
.tileEntity("dense_energy_cell", TileDenseEnergyCell.class, TileDenseEnergyCell::new).build())
|
||||
.rendering(new BlockEnergyCellRendering(new ResourceLocation(AppEng.MOD_ID, "dense_energy_cell")))
|
||||
.build();
|
||||
this.energyCellCreative = registry.block("creative_energy_cell", BlockCreativeEnergyCell::new)
|
||||
.features(AEFeature.CREATIVE)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
package appeng.items.tools;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUseContext;
|
||||
@@ -131,7 +132,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench {
|
||||
final TileEntity te = w.getTileEntity(pos);
|
||||
if (!(te instanceof IGridHost)) {
|
||||
if (bs.rotate(w, pos, Rotation.CLOCKWISE_90) != bs) {
|
||||
bs.neighborChanged(w, pos, Platform.AIR_BLOCK, pos, false);
|
||||
bs.neighborChanged(w, pos, Blocks.AIR, pos, false);
|
||||
p.swingArm(hand);
|
||||
return !w.isRemote;
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
random.nextFloat() * 0.4F + 0.8F);
|
||||
|
||||
if (or.getBlockState() == null) {
|
||||
w.setBlockState(pos, Platform.AIR_BLOCK.getDefaultState(), 3);
|
||||
w.setBlockState(pos, Blocks.AIR.getDefaultState(), 3);
|
||||
} else {
|
||||
w.setBlockState(pos, or.getBlockState(), 3);
|
||||
}
|
||||
|
||||
@@ -24,10 +24,12 @@ import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.network.play.server.SChunkDataPacket;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.EmptyBlockReader;
|
||||
import net.minecraft.world.ITickList;
|
||||
import net.minecraft.world.NextTickListEntry;
|
||||
import net.minecraft.world.World;
|
||||
@@ -135,8 +137,7 @@ public class CachedPlane {
|
||||
this.myColumns[tePOS.getX() - minX][tePOS.getZ() - minZ].fillData(tePOS.getY(), details);
|
||||
|
||||
// don't skip air, just let the code replace it...
|
||||
if (details.state != null && details.state.getBlock() == Platform.AIR_BLOCK
|
||||
&& details.state.getMaterial().isReplaceable()) {
|
||||
if (details.state.isAir(EmptyBlockReader.INSTANCE, tePOS)) {
|
||||
w.removeBlock(tePOS, false);
|
||||
} else {
|
||||
this.myColumns[tePOS.getX() - minX][tePOS.getZ() - minZ].setSkip(tePOS.getY());
|
||||
@@ -370,7 +371,7 @@ public class CachedPlane {
|
||||
|
||||
private void setBlockState(final int y, BlockStorageData data) {
|
||||
if (data.state == CachedPlane.this.matrixBlockState) {
|
||||
data.state = Platform.AIR_BLOCK.getDefaultState();
|
||||
data.state = Blocks.AIR.getDefaultState();
|
||||
}
|
||||
final ChunkSection[] storage = this.c.getSections();
|
||||
final ChunkSection extendedBlockStorage = storage[y >> 4];
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.util.function.Function;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
@@ -171,11 +172,11 @@ public class StorageHelper {
|
||||
}
|
||||
|
||||
for (final WorldCoord wc : cDst.getUpdates()) {
|
||||
cSrc.getWorld().notifyNeighborsOfStateChange(wc.getPos(), Platform.AIR_BLOCK);
|
||||
cSrc.getWorld().notifyNeighborsOfStateChange(wc.getPos(), Blocks.AIR);
|
||||
}
|
||||
|
||||
for (final WorldCoord wc : cSrc.getUpdates()) {
|
||||
cSrc.getWorld().notifyNeighborsOfStateChange(wc.getPos(), Platform.AIR_BLOCK);
|
||||
cSrc.getWorld().notifyNeighborsOfStateChange(wc.getPos(), Blocks.AIR);
|
||||
}
|
||||
|
||||
this.transverseEdges(srcX - 1, srcY - 1, srcZ - 1, srcX + scaleX + 1, srcY + scaleY + 1, srcZ + scaleZ + 1,
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.util;
|
||||
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -31,7 +32,7 @@ public class BlockUpdate implements IWorldCallable<Boolean> {
|
||||
@Override
|
||||
public Boolean call(final World world) throws Exception {
|
||||
if (world.isBlockLoaded(this.pos)) {
|
||||
world.notifyNeighborsOfStateChange(this.pos, Platform.AIR_BLOCK);
|
||||
world.notifyNeighborsOfStateChange(this.pos, Blocks.AIR);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -123,9 +123,6 @@ import appeng.util.prioritylist.IPartitionList;
|
||||
*/
|
||||
public class Platform {
|
||||
|
||||
// FIXME get rid of this shit, there's CAVE_AIR now !!!
|
||||
public static final Block AIR_BLOCK = Blocks.AIR;
|
||||
|
||||
public static final int DEF_OFFSET = 16;
|
||||
|
||||
private static final boolean CLIENT_INSTALL = FMLEnvironment.dist.isClient();
|
||||
@@ -135,7 +132,6 @@ public class Platform {
|
||||
*/
|
||||
private static final Random RANDOM_GENERATOR = new Random();
|
||||
private static final WeakHashMap<World, PlayerEntity> FAKE_PLAYERS = new WeakHashMap<>();
|
||||
// private static Method getEntry;
|
||||
|
||||
private static final ItemComparisonHelper ITEM_COMPARISON_HELPER = new ItemComparisonHelper();
|
||||
|
||||
@@ -186,31 +182,6 @@ public class Platform {
|
||||
return df.format(p) + ' ' + level + unitName + (isRate ? "/t" : "");
|
||||
}
|
||||
|
||||
public static AEPartLocation crossProduct(final AEPartLocation forward, final AEPartLocation up) {
|
||||
final int west_x = forward.yOffset * up.zOffset - forward.zOffset * up.yOffset;
|
||||
final int west_y = forward.zOffset * up.xOffset - forward.xOffset * up.zOffset;
|
||||
final int west_z = forward.xOffset * up.yOffset - forward.yOffset * up.xOffset;
|
||||
|
||||
switch (west_x + west_y * 2 + west_z * 3) {
|
||||
case 1:
|
||||
return AEPartLocation.EAST;
|
||||
case -1:
|
||||
return AEPartLocation.WEST;
|
||||
|
||||
case 2:
|
||||
return AEPartLocation.UP;
|
||||
case -2:
|
||||
return AEPartLocation.DOWN;
|
||||
|
||||
case 3:
|
||||
return AEPartLocation.SOUTH;
|
||||
case -3:
|
||||
return AEPartLocation.NORTH;
|
||||
}
|
||||
|
||||
return AEPartLocation.INTERNAL;
|
||||
}
|
||||
|
||||
public static Direction crossProduct(final Direction forward, final Direction up) {
|
||||
final int west_x = forward.getYOffset() * up.getZOffset() - forward.getZOffset() * up.getYOffset();
|
||||
final int west_y = forward.getZOffset() * up.getXOffset() - forward.getXOffset() * up.getZOffset();
|
||||
@@ -386,7 +357,7 @@ public class Platform {
|
||||
}
|
||||
|
||||
final ResourceLocation n = ForgeRegistries.FLUIDS.getKey(fs.getFluidStack().getFluid());
|
||||
return n == null ? "** Null" : n.getNamespace(); // FIXME: Check if namespace == mod
|
||||
return n == null ? "** Null" : n.getNamespace();
|
||||
}
|
||||
|
||||
public static String getModName(String modId) {
|
||||
@@ -1126,7 +1097,11 @@ public class Platform {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
// // TODO wtf is this?
|
||||
/**
|
||||
* Gets the container item for the given item or EMPTY. A container item is what
|
||||
* remains when the item is used for crafting, i.E. the empty bucket for a
|
||||
* bucket of water.
|
||||
*/
|
||||
public static ItemStack getContainerItem(final ItemStack stackInSlot) {
|
||||
if (stackInSlot == null) {
|
||||
return ItemStack.EMPTY;
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.worldgen.meteorite;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.chunk.IChunk;
|
||||
@@ -69,7 +70,7 @@ public class ChunkOnly extends StandardWorld {
|
||||
if (this.range(pos)) {
|
||||
return this.target.getBlockState(new BlockPos(pos)).getBlock();
|
||||
}
|
||||
return Platform.AIR_BLOCK;
|
||||
return Blocks.AIR;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -64,7 +64,7 @@ public class Fallout {
|
||||
} else if (a > 0.5) {
|
||||
this.putter.put(w, pos, Blocks.GRAVEL.getDefaultState());
|
||||
} else {
|
||||
this.putter.put(w, pos, Platform.AIR_BLOCK.getDefaultState());
|
||||
this.putter.put(w, pos, Blocks.AIR.getDefaultState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public class StandardWorld implements IMeteoriteWorld {
|
||||
if (this.range(pos)) {
|
||||
return this.getWorld().getBlockState(new BlockPos(pos)).getBlock();
|
||||
}
|
||||
return Platform.AIR_BLOCK;
|
||||
return Blocks.AIR;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user