The Great Renamening of 2020
This commit is contained in:
@@ -29,7 +29,7 @@ import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import appeng.api.features.AEFeature;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.AEBaseTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public final class AELog {
|
||||
@@ -301,7 +301,7 @@ public final class AELog {
|
||||
* @param aeBaseTile
|
||||
*/
|
||||
public static void blockUpdate(@Nonnull final BlockPos pos, @Nonnull BlockState currentState,
|
||||
@Nonnull BlockState newState, @Nonnull final AEBaseTile aeBaseTile) {
|
||||
@Nonnull BlockState newState, @Nonnull final AEBaseTileEntity aeBaseTile) {
|
||||
if (AEConfig.instance().isFeatureEnabled(AEFeature.UPDATE_LOGGING)) {
|
||||
info(BLOCK_UPDATE, aeBaseTile.getClass().getName(), pos, currentState, newState);
|
||||
}
|
||||
|
||||
@@ -164,12 +164,12 @@ public final class AppEng {
|
||||
|
||||
((ClientHelper) proxy).clientInit();
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityTinyTNTPrimed.TYPE, RenderTinyTNTPrimed::new);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySingularity.TYPE,
|
||||
RenderingRegistry.registerEntityRenderingHandler(TinyTNTPrimedEntity.TYPE, TinyTNTPrimedRenderer::new);
|
||||
RenderingRegistry.registerEntityRenderingHandler(SingularityEntity.TYPE,
|
||||
m -> new ItemRenderer(m, Minecraft.getInstance().getItemRenderer()));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGrowingCrystal.TYPE,
|
||||
RenderingRegistry.registerEntityRenderingHandler(GrowingCrystalEntity.TYPE,
|
||||
m -> new ItemRenderer(m, Minecraft.getInstance().getItemRenderer()));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChargedQuartz.TYPE,
|
||||
RenderingRegistry.registerEntityRenderingHandler(ChargedQuartzEntity.TYPE,
|
||||
m -> new ItemRenderer(m, Minecraft.getInstance().getItemRenderer()));
|
||||
|
||||
// TODO: Do not use the internal API
|
||||
|
||||
@@ -33,7 +33,7 @@ import appeng.api.parts.CableRenderMode;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.client.ActionKey;
|
||||
import appeng.client.EffectType;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
|
||||
public abstract class CommonHelper {
|
||||
|
||||
@@ -44,7 +44,7 @@ public abstract class CommonHelper {
|
||||
public abstract List<? extends PlayerEntity> getPlayers();
|
||||
|
||||
public abstract void sendToAllNearExcept(PlayerEntity p, double x, double y, double z, double dist, World w,
|
||||
AppEngPacket packet);
|
||||
BasePacket packet);
|
||||
|
||||
public abstract void spawnEffect(EffectType effect, World world, double posX, double posY, double posZ,
|
||||
Object extra);
|
||||
|
||||
@@ -29,18 +29,18 @@ import net.minecraft.item.Items;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import appeng.items.parts.ItemFacade;
|
||||
import appeng.items.parts.FacadeItem;
|
||||
|
||||
public final class FacadeItemGroup extends ItemGroup {
|
||||
|
||||
private final ItemFacade itemFacade;
|
||||
private final FacadeItem itemFacade;
|
||||
|
||||
private List<ItemStack> subTypes = null;
|
||||
|
||||
public FacadeItemGroup() {
|
||||
super("appliedenergistics2.facades");
|
||||
|
||||
itemFacade = (ItemFacade) Api.INSTANCE.definitions().items().facade().item();
|
||||
itemFacade = (FacadeItem) Api.INSTANCE.definitions().items().facade().item();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -98,7 +98,7 @@ import appeng.core.stats.PartItemPredicate;
|
||||
import appeng.fluids.client.gui.*;
|
||||
import appeng.fluids.container.*;
|
||||
import appeng.fluids.registries.BasicFluidCellGuiHandler;
|
||||
import appeng.items.parts.ItemFacade;
|
||||
import appeng.items.parts.FacadeItem;
|
||||
import appeng.me.cache.*;
|
||||
import appeng.recipes.conditions.FeaturesEnabled;
|
||||
import appeng.recipes.game.DisassembleRecipe;
|
||||
@@ -110,7 +110,7 @@ import appeng.recipes.handlers.InscriberRecipeSerializer;
|
||||
import appeng.server.AECommand;
|
||||
import appeng.spatial.StorageCellBiome;
|
||||
import appeng.spatial.StorageCellModDimension;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.AEBaseTileEntity;
|
||||
import appeng.tile.crafting.MolecularAssemblerRenderer;
|
||||
import appeng.worldgen.ChargedQuartzOreConfig;
|
||||
import appeng.worldgen.ChargedQuartzOreFeature;
|
||||
@@ -201,131 +201,131 @@ final class Registration {
|
||||
public void registerContainerTypes(RegistryEvent.Register<ContainerType<?>> event) {
|
||||
final IForgeRegistry<ContainerType<?>> registry = event.getRegistry();
|
||||
|
||||
ContainerCellWorkbench.TYPE = registerContainer(registry, "cellworkbench", ContainerCellWorkbench::fromNetwork,
|
||||
ContainerCellWorkbench::open);
|
||||
ContainerChest.TYPE = registerContainer(registry, "chest", ContainerChest::fromNetwork, ContainerChest::open);
|
||||
ContainerCondenser.TYPE = registerContainer(registry, "condenser", ContainerCondenser::fromNetwork,
|
||||
ContainerCondenser::open);
|
||||
ContainerCraftAmount.TYPE = registerContainer(registry, "craftamount", ContainerCraftAmount::fromNetwork,
|
||||
ContainerCraftAmount::open);
|
||||
ContainerCraftConfirm.TYPE = registerContainer(registry, "craftconfirm", ContainerCraftConfirm::fromNetwork,
|
||||
ContainerCraftConfirm::open);
|
||||
ContainerCraftingCPU.TYPE = registerContainer(registry, "craftingcpu", ContainerCraftingCPU::fromNetwork,
|
||||
ContainerCraftingCPU::open);
|
||||
ContainerCraftingStatus.TYPE = registerContainer(registry, "craftingstatus",
|
||||
ContainerCraftingStatus::fromNetwork, ContainerCraftingStatus::open);
|
||||
ContainerCraftingTerm.TYPE = registerContainer(registry, "craftingterm", ContainerCraftingTerm::fromNetwork,
|
||||
ContainerCraftingTerm::open);
|
||||
ContainerDrive.TYPE = registerContainer(registry, "drive", ContainerDrive::fromNetwork, ContainerDrive::open);
|
||||
ContainerFormationPlane.TYPE = registerContainer(registry, "formationplane",
|
||||
ContainerFormationPlane::fromNetwork, ContainerFormationPlane::open);
|
||||
ContainerGrinder.TYPE = registerContainer(registry, "grinder", ContainerGrinder::fromNetwork,
|
||||
ContainerGrinder::open);
|
||||
ContainerInscriber.TYPE = registerContainer(registry, "inscriber", ContainerInscriber::fromNetwork,
|
||||
ContainerInscriber::open);
|
||||
ContainerInterface.TYPE = registerContainer(registry, "interface", ContainerInterface::fromNetwork,
|
||||
ContainerInterface::open);
|
||||
ContainerInterfaceTerminal.TYPE = registerContainer(registry, "interfaceterminal",
|
||||
ContainerInterfaceTerminal::fromNetwork, ContainerInterfaceTerminal::open);
|
||||
ContainerIOPort.TYPE = registerContainer(registry, "ioport", ContainerIOPort::fromNetwork,
|
||||
ContainerIOPort::open);
|
||||
ContainerLevelEmitter.TYPE = registerContainer(registry, "levelemitter", ContainerLevelEmitter::fromNetwork,
|
||||
ContainerLevelEmitter::open);
|
||||
ContainerMolecularAssembler.TYPE = registerContainer(registry, "molecular_assembler",
|
||||
ContainerMolecularAssembler::fromNetwork, ContainerMolecularAssembler::open);
|
||||
ContainerMEMonitorable.TYPE = registerContainer(registry, "memonitorable", ContainerMEMonitorable::fromNetwork,
|
||||
ContainerMEMonitorable::open);
|
||||
ContainerMEPortableCell.TYPE = registerContainer(registry, "meportablecell",
|
||||
ContainerMEPortableCell::fromNetwork, ContainerMEPortableCell::open);
|
||||
ContainerNetworkStatus.TYPE = registerContainer(registry, "networkstatus", ContainerNetworkStatus::fromNetwork,
|
||||
ContainerNetworkStatus::open);
|
||||
ContainerNetworkTool.TYPE = registerContainer(registry, "networktool", ContainerNetworkTool::fromNetwork,
|
||||
ContainerNetworkTool::open);
|
||||
ContainerPatternTerm.TYPE = registerContainer(registry, "patternterm", ContainerPatternTerm::fromNetwork,
|
||||
ContainerPatternTerm::open);
|
||||
ContainerPriority.TYPE = registerContainer(registry, "priority", ContainerPriority::fromNetwork,
|
||||
ContainerPriority::open);
|
||||
ContainerQNB.TYPE = registerContainer(registry, "qnb", ContainerQNB::fromNetwork, ContainerQNB::open);
|
||||
ContainerQuartzKnife.TYPE = registerContainer(registry, "quartzknife", ContainerQuartzKnife::fromNetwork,
|
||||
ContainerQuartzKnife::open);
|
||||
ContainerSecurityStation.TYPE = registerContainer(registry, "securitystation",
|
||||
ContainerSecurityStation::fromNetwork, ContainerSecurityStation::open);
|
||||
ContainerSkyChest.TYPE = registerContainer(registry, "skychest", ContainerSkyChest::fromNetwork,
|
||||
ContainerSkyChest::open);
|
||||
ContainerSpatialIOPort.TYPE = registerContainer(registry, "spatialioport", ContainerSpatialIOPort::fromNetwork,
|
||||
ContainerSpatialIOPort::open);
|
||||
ContainerStorageBus.TYPE = registerContainer(registry, "storagebus", ContainerStorageBus::fromNetwork,
|
||||
ContainerStorageBus::open);
|
||||
ContainerUpgradeable.TYPE = registerContainer(registry, "upgradeable", ContainerUpgradeable::fromNetwork,
|
||||
ContainerUpgradeable::open);
|
||||
ContainerVibrationChamber.TYPE = registerContainer(registry, "vibrationchamber",
|
||||
ContainerVibrationChamber::fromNetwork, ContainerVibrationChamber::open);
|
||||
ContainerWireless.TYPE = registerContainer(registry, "wireless", ContainerWireless::fromNetwork,
|
||||
ContainerWireless::open);
|
||||
ContainerWirelessTerm.TYPE = registerContainer(registry, "wirelessterm", ContainerWirelessTerm::fromNetwork,
|
||||
ContainerWirelessTerm::open);
|
||||
CellWorkbenchContainer.TYPE = registerContainer(registry, "cellworkbench", CellWorkbenchContainer::fromNetwork,
|
||||
CellWorkbenchContainer::open);
|
||||
ChestContainer.TYPE = registerContainer(registry, "chest", ChestContainer::fromNetwork, ChestContainer::open);
|
||||
CondenserContainer.TYPE = registerContainer(registry, "condenser", CondenserContainer::fromNetwork,
|
||||
CondenserContainer::open);
|
||||
CraftAmountContainer.TYPE = registerContainer(registry, "craftamount", CraftAmountContainer::fromNetwork,
|
||||
CraftAmountContainer::open);
|
||||
CraftConfirmContainer.TYPE = registerContainer(registry, "craftconfirm", CraftConfirmContainer::fromNetwork,
|
||||
CraftConfirmContainer::open);
|
||||
CraftingCPUContainer.TYPE = registerContainer(registry, "craftingcpu", CraftingCPUContainer::fromNetwork,
|
||||
CraftingCPUContainer::open);
|
||||
CraftingStatusContainer.TYPE = registerContainer(registry, "craftingstatus",
|
||||
CraftingStatusContainer::fromNetwork, CraftingStatusContainer::open);
|
||||
CraftingTermContainer.TYPE = registerContainer(registry, "craftingterm", CraftingTermContainer::fromNetwork,
|
||||
CraftingTermContainer::open);
|
||||
DriveContainer.TYPE = registerContainer(registry, "drive", DriveContainer::fromNetwork, DriveContainer::open);
|
||||
FormationPlaneContainer.TYPE = registerContainer(registry, "formationplane",
|
||||
FormationPlaneContainer::fromNetwork, FormationPlaneContainer::open);
|
||||
GrinderContainer.TYPE = registerContainer(registry, "grinder", GrinderContainer::fromNetwork,
|
||||
GrinderContainer::open);
|
||||
InscriberContainer.TYPE = registerContainer(registry, "inscriber", InscriberContainer::fromNetwork,
|
||||
InscriberContainer::open);
|
||||
InterfaceContainer.TYPE = registerContainer(registry, "interface", InterfaceContainer::fromNetwork,
|
||||
InterfaceContainer::open);
|
||||
InterfaceTerminalContainer.TYPE = registerContainer(registry, "interfaceterminal",
|
||||
InterfaceTerminalContainer::fromNetwork, InterfaceTerminalContainer::open);
|
||||
IOPortContainer.TYPE = registerContainer(registry, "ioport", IOPortContainer::fromNetwork,
|
||||
IOPortContainer::open);
|
||||
LevelEmitterContainer.TYPE = registerContainer(registry, "levelemitter", LevelEmitterContainer::fromNetwork,
|
||||
LevelEmitterContainer::open);
|
||||
MolecularAssemblerContainer.TYPE = registerContainer(registry, "molecular_assembler",
|
||||
MolecularAssemblerContainer::fromNetwork, MolecularAssemblerContainer::open);
|
||||
MEMonitorableContainer.TYPE = registerContainer(registry, "memonitorable", MEMonitorableContainer::fromNetwork,
|
||||
MEMonitorableContainer::open);
|
||||
MEPortableCellContainer.TYPE = registerContainer(registry, "meportablecell",
|
||||
MEPortableCellContainer::fromNetwork, MEPortableCellContainer::open);
|
||||
NetworkStatusContainer.TYPE = registerContainer(registry, "networkstatus", NetworkStatusContainer::fromNetwork,
|
||||
NetworkStatusContainer::open);
|
||||
NetworkToolContainer.TYPE = registerContainer(registry, "networktool", NetworkToolContainer::fromNetwork,
|
||||
NetworkToolContainer::open);
|
||||
PatternTermContainer.TYPE = registerContainer(registry, "patternterm", PatternTermContainer::fromNetwork,
|
||||
PatternTermContainer::open);
|
||||
PriorityContainer.TYPE = registerContainer(registry, "priority", PriorityContainer::fromNetwork,
|
||||
PriorityContainer::open);
|
||||
QNBContainer.TYPE = registerContainer(registry, "qnb", QNBContainer::fromNetwork, QNBContainer::open);
|
||||
QuartzKnifeContainer.TYPE = registerContainer(registry, "quartzknife", QuartzKnifeContainer::fromNetwork,
|
||||
QuartzKnifeContainer::open);
|
||||
SecurityStationContainer.TYPE = registerContainer(registry, "securitystation",
|
||||
SecurityStationContainer::fromNetwork, SecurityStationContainer::open);
|
||||
SkyChestContainer.TYPE = registerContainer(registry, "skychest", SkyChestContainer::fromNetwork,
|
||||
SkyChestContainer::open);
|
||||
SpatialIOPortContainer.TYPE = registerContainer(registry, "spatialioport", SpatialIOPortContainer::fromNetwork,
|
||||
SpatialIOPortContainer::open);
|
||||
StorageBusContainer.TYPE = registerContainer(registry, "storagebus", StorageBusContainer::fromNetwork,
|
||||
StorageBusContainer::open);
|
||||
UpgradeableContainer.TYPE = registerContainer(registry, "upgradeable", UpgradeableContainer::fromNetwork,
|
||||
UpgradeableContainer::open);
|
||||
VibrationChamberContainer.TYPE = registerContainer(registry, "vibrationchamber",
|
||||
VibrationChamberContainer::fromNetwork, VibrationChamberContainer::open);
|
||||
WirelessContainer.TYPE = registerContainer(registry, "wireless", WirelessContainer::fromNetwork,
|
||||
WirelessContainer::open);
|
||||
WirelessTermContainer.TYPE = registerContainer(registry, "wirelessterm", WirelessTermContainer::fromNetwork,
|
||||
WirelessTermContainer::open);
|
||||
|
||||
ContainerFluidFormationPlane.TYPE = registerContainer(registry, "fluid_formation_plane",
|
||||
ContainerFluidFormationPlane::fromNetwork, ContainerFluidFormationPlane::open);
|
||||
ContainerFluidIO.TYPE = registerContainer(registry, "fluid_io", ContainerFluidIO::fromNetwork,
|
||||
ContainerFluidIO::open);
|
||||
ContainerFluidInterface.TYPE = registerContainer(registry, "fluid_interface",
|
||||
ContainerFluidInterface::fromNetwork, ContainerFluidInterface::open);
|
||||
ContainerFluidLevelEmitter.TYPE = registerContainer(registry, "fluid_level_emitter",
|
||||
ContainerFluidLevelEmitter::fromNetwork, ContainerFluidLevelEmitter::open);
|
||||
ContainerFluidStorageBus.TYPE = registerContainer(registry, "fluid_storage_bus",
|
||||
ContainerFluidStorageBus::fromNetwork, ContainerFluidStorageBus::open);
|
||||
ContainerFluidTerminal.TYPE = registerContainer(registry, "fluid_terminal", ContainerFluidTerminal::fromNetwork,
|
||||
ContainerFluidTerminal::open);
|
||||
FluidFormationPlaneContainer.TYPE = registerContainer(registry, "fluid_formation_plane",
|
||||
FluidFormationPlaneContainer::fromNetwork, FluidFormationPlaneContainer::open);
|
||||
FluidIOContainer.TYPE = registerContainer(registry, "fluid_io", FluidIOContainer::fromNetwork,
|
||||
FluidIOContainer::open);
|
||||
FluidInterfaceContainer.TYPE = registerContainer(registry, "fluid_interface",
|
||||
FluidInterfaceContainer::fromNetwork, FluidInterfaceContainer::open);
|
||||
FluidLevelEmitterContainer.TYPE = registerContainer(registry, "fluid_level_emitter",
|
||||
FluidLevelEmitterContainer::fromNetwork, FluidLevelEmitterContainer::open);
|
||||
FluidStorageBusContainer.TYPE = registerContainer(registry, "fluid_storage_bus",
|
||||
FluidStorageBusContainer::fromNetwork, FluidStorageBusContainer::open);
|
||||
FluidTerminalContainer.TYPE = registerContainer(registry, "fluid_terminal", FluidTerminalContainer::fromNetwork,
|
||||
FluidTerminalContainer::open);
|
||||
|
||||
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> {
|
||||
ScreenManager.registerFactory(ContainerGrinder.TYPE, GuiGrinder::new);
|
||||
ScreenManager.registerFactory(ContainerQNB.TYPE, GuiQNB::new);
|
||||
ScreenManager.registerFactory(ContainerSkyChest.TYPE, GuiSkyChest::new);
|
||||
ScreenManager.registerFactory(ContainerChest.TYPE, GuiChest::new);
|
||||
ScreenManager.registerFactory(ContainerWireless.TYPE, GuiWireless::new);
|
||||
ScreenManager.<ContainerMEMonitorable, GuiMEMonitorable<ContainerMEMonitorable>>registerFactory(
|
||||
ContainerMEMonitorable.TYPE, GuiMEMonitorable::new);
|
||||
ScreenManager.registerFactory(ContainerMEPortableCell.TYPE, GuiMEPortableCell::new);
|
||||
ScreenManager.registerFactory(ContainerWirelessTerm.TYPE, GuiWirelessTerm::new);
|
||||
ScreenManager.registerFactory(ContainerNetworkStatus.TYPE, GuiNetworkStatus::new);
|
||||
ScreenManager.<ContainerCraftingCPU, GuiCraftingCPU<ContainerCraftingCPU>>registerFactory(
|
||||
ContainerCraftingCPU.TYPE, GuiCraftingCPU::new);
|
||||
ScreenManager.registerFactory(ContainerNetworkTool.TYPE, GuiNetworkTool::new);
|
||||
ScreenManager.registerFactory(ContainerQuartzKnife.TYPE, GuiQuartzKnife::new);
|
||||
ScreenManager.registerFactory(ContainerDrive.TYPE, GuiDrive::new);
|
||||
ScreenManager.registerFactory(ContainerVibrationChamber.TYPE, GuiVibrationChamber::new);
|
||||
ScreenManager.registerFactory(ContainerCondenser.TYPE, GuiCondenser::new);
|
||||
ScreenManager.registerFactory(ContainerInterface.TYPE, GuiInterface::new);
|
||||
ScreenManager.registerFactory(ContainerFluidInterface.TYPE, GuiFluidInterface::new);
|
||||
ScreenManager.<ContainerUpgradeable, GuiUpgradeable<ContainerUpgradeable>>registerFactory(
|
||||
ContainerUpgradeable.TYPE, GuiUpgradeable::new);
|
||||
ScreenManager.registerFactory(ContainerFluidIO.TYPE, GuiFluidIO::new);
|
||||
ScreenManager.registerFactory(ContainerIOPort.TYPE, GuiIOPort::new);
|
||||
ScreenManager.registerFactory(ContainerStorageBus.TYPE, GuiStorageBus::new);
|
||||
ScreenManager.registerFactory(ContainerFluidStorageBus.TYPE, GuiFluidStorageBus::new);
|
||||
ScreenManager.registerFactory(ContainerFormationPlane.TYPE, GuiFormationPlane::new);
|
||||
ScreenManager.registerFactory(ContainerFluidFormationPlane.TYPE, GuiFluidFormationPlane::new);
|
||||
ScreenManager.registerFactory(ContainerPriority.TYPE, GuiPriority::new);
|
||||
ScreenManager.registerFactory(ContainerSecurityStation.TYPE, GuiSecurityStation::new);
|
||||
ScreenManager.registerFactory(ContainerCraftingTerm.TYPE, GuiCraftingTerm::new);
|
||||
ScreenManager.registerFactory(ContainerPatternTerm.TYPE, GuiPatternTerm::new);
|
||||
ScreenManager.registerFactory(ContainerFluidTerminal.TYPE, GuiFluidTerminal::new);
|
||||
ScreenManager.registerFactory(ContainerLevelEmitter.TYPE, GuiLevelEmitter::new);
|
||||
ScreenManager.registerFactory(ContainerFluidLevelEmitter.TYPE, GuiFluidLevelEmitter::new);
|
||||
ScreenManager.registerFactory(ContainerSpatialIOPort.TYPE, GuiSpatialIOPort::new);
|
||||
ScreenManager.registerFactory(ContainerInscriber.TYPE, GuiInscriber::new);
|
||||
ScreenManager.registerFactory(ContainerCellWorkbench.TYPE, GuiCellWorkbench::new);
|
||||
ScreenManager.registerFactory(ContainerMolecularAssembler.TYPE, GuiMolecularAssembler::new);
|
||||
ScreenManager.registerFactory(ContainerCraftAmount.TYPE, GuiCraftAmount::new);
|
||||
ScreenManager.registerFactory(ContainerCraftConfirm.TYPE, GuiCraftConfirm::new);
|
||||
ScreenManager.registerFactory(ContainerInterfaceTerminal.TYPE, GuiInterfaceTerminal::new);
|
||||
ScreenManager.registerFactory(ContainerCraftingStatus.TYPE, GuiCraftingStatus::new);
|
||||
ScreenManager.registerFactory(GrinderContainer.TYPE, GrinderScreen::new);
|
||||
ScreenManager.registerFactory(QNBContainer.TYPE, QNBScreen::new);
|
||||
ScreenManager.registerFactory(SkyChestContainer.TYPE, SkyChestScreen::new);
|
||||
ScreenManager.registerFactory(ChestContainer.TYPE, ChestScreen::new);
|
||||
ScreenManager.registerFactory(WirelessContainer.TYPE, WirelessScreen::new);
|
||||
ScreenManager.<MEMonitorableContainer, MEMonitorableScreen<MEMonitorableContainer>>registerFactory(
|
||||
MEMonitorableContainer.TYPE, MEMonitorableScreen::new);
|
||||
ScreenManager.registerFactory(MEPortableCellContainer.TYPE, MEPortableCellScreen::new);
|
||||
ScreenManager.registerFactory(WirelessTermContainer.TYPE, WirelessTermScreen::new);
|
||||
ScreenManager.registerFactory(NetworkStatusContainer.TYPE, NetworkStatusScreen::new);
|
||||
ScreenManager.<CraftingCPUContainer, CraftingCPUScreen<CraftingCPUContainer>>registerFactory(
|
||||
CraftingCPUContainer.TYPE, CraftingCPUScreen::new);
|
||||
ScreenManager.registerFactory(NetworkToolContainer.TYPE, NetworkToolScreen::new);
|
||||
ScreenManager.registerFactory(QuartzKnifeContainer.TYPE, QuartzKnifeScreen::new);
|
||||
ScreenManager.registerFactory(DriveContainer.TYPE, DriveScreen::new);
|
||||
ScreenManager.registerFactory(VibrationChamberContainer.TYPE, VibrationChamberScreen::new);
|
||||
ScreenManager.registerFactory(CondenserContainer.TYPE, CondenserScreen::new);
|
||||
ScreenManager.registerFactory(InterfaceContainer.TYPE, InterfaceScreen::new);
|
||||
ScreenManager.registerFactory(FluidInterfaceContainer.TYPE, FluidInterfaceScreen::new);
|
||||
ScreenManager.<UpgradeableContainer, UpgradeableScreen<UpgradeableContainer>>registerFactory(
|
||||
UpgradeableContainer.TYPE, UpgradeableScreen::new);
|
||||
ScreenManager.registerFactory(FluidIOContainer.TYPE, FluidIOScreen::new);
|
||||
ScreenManager.registerFactory(IOPortContainer.TYPE, IOPortScreen::new);
|
||||
ScreenManager.registerFactory(StorageBusContainer.TYPE, StorageBusScreen::new);
|
||||
ScreenManager.registerFactory(FluidStorageBusContainer.TYPE, FluidStorageBusScreen::new);
|
||||
ScreenManager.registerFactory(FormationPlaneContainer.TYPE, FormationPlaneScreen::new);
|
||||
ScreenManager.registerFactory(FluidFormationPlaneContainer.TYPE, FluidFormationPlaneScreen::new);
|
||||
ScreenManager.registerFactory(PriorityContainer.TYPE, PriorityScreen::new);
|
||||
ScreenManager.registerFactory(SecurityStationContainer.TYPE, SecurityStationScreen::new);
|
||||
ScreenManager.registerFactory(CraftingTermContainer.TYPE, CraftingTermScreen::new);
|
||||
ScreenManager.registerFactory(PatternTermContainer.TYPE, PatternTermScreen::new);
|
||||
ScreenManager.registerFactory(FluidTerminalContainer.TYPE, FluidTerminalScreen::new);
|
||||
ScreenManager.registerFactory(LevelEmitterContainer.TYPE, LevelEmitterScreen::new);
|
||||
ScreenManager.registerFactory(FluidLevelEmitterContainer.TYPE, FluidLevelEmitterScreen::new);
|
||||
ScreenManager.registerFactory(SpatialIOPortContainer.TYPE, SpatialIOPortScreen::new);
|
||||
ScreenManager.registerFactory(InscriberContainer.TYPE, InscriberScreen::new);
|
||||
ScreenManager.registerFactory(CellWorkbenchContainer.TYPE, CellWorkbenchScreen::new);
|
||||
ScreenManager.registerFactory(MolecularAssemblerContainer.TYPE, MolecularAssemblerScreen::new);
|
||||
ScreenManager.registerFactory(CraftAmountContainer.TYPE, CraftAmountScreen::new);
|
||||
ScreenManager.registerFactory(CraftConfirmContainer.TYPE, CraftConfirmScreen::new);
|
||||
ScreenManager.registerFactory(InterfaceTerminalContainer.TYPE, InterfaceTerminalScreen::new);
|
||||
ScreenManager.registerFactory(CraftingStatusContainer.TYPE, CraftingStatusScreen::new);
|
||||
});
|
||||
}
|
||||
|
||||
private <T extends AEBaseContainer> ContainerType<T> registerContainer(IForgeRegistry<ContainerType<?>> registry,
|
||||
String id, IContainerFactory<T> factory, ContainerOpener.Opener<T> opener) {
|
||||
String id, IContainerFactory<T> factory, ContainerOpener.Opener<T> opener) {
|
||||
ContainerType<T> type = IForgeContainerType.create(factory);
|
||||
type.setRegistryName(AppEng.MOD_ID, id);
|
||||
registry.register(type);
|
||||
@@ -339,7 +339,7 @@ final class Registration {
|
||||
GrinderRecipe.TYPE = new AERecipeType<>(GrinderRecipeSerializer.INSTANCE.getRegistryName());
|
||||
InscriberRecipe.TYPE = new AERecipeType<>(InscriberRecipeSerializer.INSTANCE.getRegistryName());
|
||||
|
||||
ItemFacade facadeItem = (ItemFacade) Api.INSTANCE.definitions().items().facade().item();
|
||||
FacadeItem facadeItem = (FacadeItem) Api.INSTANCE.definitions().items().facade().item();
|
||||
r.registerAll(DisassembleRecipe.SERIALIZER, GrinderRecipeSerializer.INSTANCE,
|
||||
InscriberRecipeSerializer.INSTANCE, FacadeRecipe.getSerializer(facadeItem),
|
||||
DisassembleRecipe.SERIALIZER);
|
||||
@@ -527,7 +527,7 @@ final class Registration {
|
||||
/*
|
||||
* Whitelist AE2
|
||||
*/
|
||||
mr.whiteListTileEntity(AEBaseTile.class);
|
||||
mr.whiteListTileEntity(AEBaseTileEntity.class);
|
||||
|
||||
/*
|
||||
* world gen
|
||||
|
||||
@@ -28,7 +28,6 @@ import net.minecraft.block.StairsBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
@@ -39,50 +38,50 @@ import appeng.api.definitions.ITileDefinition;
|
||||
import appeng.api.features.AEFeature;
|
||||
import appeng.block.AEBaseBlockItemChargeable;
|
||||
import appeng.block.crafting.AbstractCraftingUnitBlock.CraftingUnitType;
|
||||
import appeng.block.crafting.BlockCraftingMonitor;
|
||||
import appeng.block.crafting.BlockCraftingStorage;
|
||||
import appeng.block.crafting.BlockMolecularAssembler;
|
||||
import appeng.block.crafting.CraftingMonitorBlock;
|
||||
import appeng.block.crafting.CraftingStorageBlock;
|
||||
import appeng.block.crafting.MolecularAssemblerBlock;
|
||||
import appeng.block.crafting.CraftingUnitBlock;
|
||||
import appeng.block.crafting.ItemCraftingStorage;
|
||||
import appeng.block.grindstone.BlockCrank;
|
||||
import appeng.block.grindstone.BlockGrinder;
|
||||
import appeng.block.misc.BlockCellWorkbench;
|
||||
import appeng.block.misc.BlockCharger;
|
||||
import appeng.block.misc.BlockCondenser;
|
||||
import appeng.block.misc.BlockInscriber;
|
||||
import appeng.block.misc.BlockInterface;
|
||||
import appeng.block.misc.BlockLightDetector;
|
||||
import appeng.block.misc.BlockQuartzFixture;
|
||||
import appeng.block.misc.BlockQuartzGrowthAccelerator;
|
||||
import appeng.block.misc.BlockSecurityStation;
|
||||
import appeng.block.misc.BlockSkyCompass;
|
||||
import appeng.block.misc.BlockTinyTNT;
|
||||
import appeng.block.misc.BlockVibrationChamber;
|
||||
import appeng.block.crafting.CraftingStorageItem;
|
||||
import appeng.block.grindstone.CrankBlock;
|
||||
import appeng.block.grindstone.GrinderBlock;
|
||||
import appeng.block.misc.CellWorkbenchBlock;
|
||||
import appeng.block.misc.ChargerBlock;
|
||||
import appeng.block.misc.CondenserBlock;
|
||||
import appeng.block.misc.InscriberBlock;
|
||||
import appeng.block.misc.InterfaceBlock;
|
||||
import appeng.block.misc.LightDetectorBlock;
|
||||
import appeng.block.misc.QuartzFixtureBlock;
|
||||
import appeng.block.misc.QuartzGrowthAcceleratorBlock;
|
||||
import appeng.block.misc.SecurityStationBlock;
|
||||
import appeng.block.misc.SkyCompassBlock;
|
||||
import appeng.block.misc.TinyTNTBlock;
|
||||
import appeng.block.misc.VibrationChamberBlock;
|
||||
import appeng.block.misc.InscriberRendering;
|
||||
import appeng.block.misc.SecurityStationRendering;
|
||||
import appeng.block.misc.SkyCompassRendering;
|
||||
import appeng.block.networking.BlockCableBus;
|
||||
import appeng.block.networking.BlockController;
|
||||
import appeng.block.networking.BlockCreativeEnergyCell;
|
||||
import appeng.block.networking.BlockDenseEnergyCell;
|
||||
import appeng.block.networking.BlockEnergyAcceptor;
|
||||
import appeng.block.networking.BlockEnergyCell;
|
||||
import appeng.block.networking.BlockWireless;
|
||||
import appeng.block.networking.CableBusBlock;
|
||||
import appeng.block.networking.ControllerBlock;
|
||||
import appeng.block.networking.CreativeEnergyCellBlock;
|
||||
import appeng.block.networking.DenseEnergyCellBlock;
|
||||
import appeng.block.networking.EnergyAcceptorBlock;
|
||||
import appeng.block.networking.EnergyCellBlock;
|
||||
import appeng.block.networking.WirelessBlock;
|
||||
import appeng.block.networking.CableBusRendering;
|
||||
import appeng.block.networking.ControllerRendering;
|
||||
import appeng.block.networking.WirelessRendering;
|
||||
import appeng.block.paint.BlockPaint;
|
||||
import appeng.block.paint.PaintRendering;
|
||||
import appeng.block.qnb.BlockQuantumLinkChamber;
|
||||
import appeng.block.qnb.BlockQuantumRing;
|
||||
import appeng.block.paint.PaintSplotchesBlock;
|
||||
import appeng.block.paint.PaintSplotchesRendering;
|
||||
import appeng.block.qnb.QuantumLinkChamberBlock;
|
||||
import appeng.block.qnb.QuantumRingBlock;
|
||||
import appeng.block.qnb.QuantumBridgeRendering;
|
||||
import appeng.block.spatial.BlockMatrixFrame;
|
||||
import appeng.block.spatial.BlockSpatialIOPort;
|
||||
import appeng.block.spatial.BlockSpatialPylon;
|
||||
import appeng.block.storage.BlockChest;
|
||||
import appeng.block.storage.BlockDrive;
|
||||
import appeng.block.storage.BlockIOPort;
|
||||
import appeng.block.storage.BlockSkyChest;
|
||||
import appeng.block.spatial.MatrixFrameBlock;
|
||||
import appeng.block.spatial.SpatialIOPortBlock;
|
||||
import appeng.block.spatial.SpatialPylonBlock;
|
||||
import appeng.block.storage.ChestBlock;
|
||||
import appeng.block.storage.DriveBlock;
|
||||
import appeng.block.storage.IOPortBlock;
|
||||
import appeng.block.storage.SkyChestBlock;
|
||||
import appeng.block.storage.ChestRendering;
|
||||
import appeng.block.storage.DriveRendering;
|
||||
import appeng.bootstrap.BlockRenderingCustomizer;
|
||||
@@ -101,62 +100,61 @@ import appeng.client.render.spatial.SpatialPylonRendering;
|
||||
import appeng.client.render.tesr.CrankTESR;
|
||||
import appeng.client.render.tesr.DriveLedTileEntityRenderer;
|
||||
import appeng.client.render.tesr.SkyChestTESR;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.debug.BlockChunkloader;
|
||||
import appeng.debug.BlockCubeGenerator;
|
||||
import appeng.debug.BlockEnergyGenerator;
|
||||
import appeng.debug.BlockItemGen;
|
||||
import appeng.debug.BlockPhantomNode;
|
||||
import appeng.debug.TileChunkLoader;
|
||||
import appeng.debug.TileCubeGenerator;
|
||||
import appeng.debug.TileEnergyGenerator;
|
||||
import appeng.debug.TileItemGen;
|
||||
import appeng.debug.TilePhantomNode;
|
||||
import appeng.debug.ChunkLoaderBlock;
|
||||
import appeng.debug.CubeGeneratorBlock;
|
||||
import appeng.debug.EnergyGeneratorBlock;
|
||||
import appeng.debug.ItemGenBlock;
|
||||
import appeng.debug.PhantomNodeBlock;
|
||||
import appeng.debug.ChunkLoaderTileEntity;
|
||||
import appeng.debug.CubeGeneratorTileEntity;
|
||||
import appeng.debug.EnergyGeneratorTileEntity;
|
||||
import appeng.debug.ItemGenTileEntity;
|
||||
import appeng.debug.PhantomNodeTileEntity;
|
||||
import appeng.decorative.AEDecorativeBlock;
|
||||
import appeng.decorative.solid.BlockChargedQuartzOre;
|
||||
import appeng.decorative.solid.BlockQuartzGlass;
|
||||
import appeng.decorative.solid.BlockQuartzLamp;
|
||||
import appeng.decorative.solid.BlockQuartzOre;
|
||||
import appeng.decorative.solid.BlockQuartzPillar;
|
||||
import appeng.decorative.solid.BlockSkyStone;
|
||||
import appeng.decorative.solid.BlockSkyStone.SkystoneType;
|
||||
import appeng.entity.EntityTinyTNTPrimed;
|
||||
import appeng.fluids.block.BlockFluidInterface;
|
||||
import appeng.fluids.tile.TileFluidInterface;
|
||||
import appeng.hooks.DispenserBehaviorTinyTNT;
|
||||
import appeng.decorative.solid.ChargedQuartzOreBlock;
|
||||
import appeng.decorative.solid.QuartzGlassBlock;
|
||||
import appeng.decorative.solid.QuartzLampBlock;
|
||||
import appeng.decorative.solid.QuartzOreBlock;
|
||||
import appeng.decorative.solid.QuartzPillarBlock;
|
||||
import appeng.decorative.solid.SkyStoneBlock;
|
||||
import appeng.decorative.solid.SkyStoneBlock.SkystoneType;
|
||||
import appeng.entity.TinyTNTPrimedEntity;
|
||||
import appeng.fluids.block.FluidInterfaceBlock;
|
||||
import appeng.fluids.tile.FluidInterfaceTileEntity;
|
||||
import appeng.hooks.TinyTNTDispenseItemBehavior;
|
||||
import appeng.tile.crafting.MolecularAssemblerRenderer;
|
||||
import appeng.tile.crafting.TileCraftingMonitorTile;
|
||||
import appeng.tile.crafting.TileCraftingStorageTile;
|
||||
import appeng.tile.crafting.TileCraftingTile;
|
||||
import appeng.tile.crafting.TileMolecularAssembler;
|
||||
import appeng.tile.grindstone.TileCrank;
|
||||
import appeng.tile.grindstone.TileGrinder;
|
||||
import appeng.tile.misc.TileCellWorkbench;
|
||||
import appeng.tile.misc.TileCharger;
|
||||
import appeng.tile.misc.TileCondenser;
|
||||
import appeng.tile.misc.TileInscriber;
|
||||
import appeng.tile.misc.TileInterface;
|
||||
import appeng.tile.misc.TileLightDetector;
|
||||
import appeng.tile.misc.TilePaint;
|
||||
import appeng.tile.misc.TileQuartzGrowthAccelerator;
|
||||
import appeng.tile.misc.TileSecurityStation;
|
||||
import appeng.tile.misc.TileSkyCompass;
|
||||
import appeng.tile.misc.TileVibrationChamber;
|
||||
import appeng.tile.crafting.CraftingMonitorTileEntity;
|
||||
import appeng.tile.crafting.CraftingStorageTileEntity;
|
||||
import appeng.tile.crafting.CraftingTileEntity;
|
||||
import appeng.tile.crafting.MolecularAssemblerTileEntity;
|
||||
import appeng.tile.grindstone.CrankTileEntity;
|
||||
import appeng.tile.grindstone.GrinderTileEntity;
|
||||
import appeng.tile.misc.CellWorkbenchTileEntity;
|
||||
import appeng.tile.misc.ChargerTileEntity;
|
||||
import appeng.tile.misc.CondenserTileEntity;
|
||||
import appeng.tile.misc.InscriberTileEntity;
|
||||
import appeng.tile.misc.InterfaceTileEntity;
|
||||
import appeng.tile.misc.LightDetectorTileEntity;
|
||||
import appeng.tile.misc.PaintSplotchesTileEntity;
|
||||
import appeng.tile.misc.QuartzGrowthAcceleratorTileEntity;
|
||||
import appeng.tile.misc.SecurityStationTileEntity;
|
||||
import appeng.tile.misc.SkyCompassTileEntity;
|
||||
import appeng.tile.misc.VibrationChamberTileEntity;
|
||||
import appeng.tile.networking.CableBusTESR;
|
||||
import appeng.tile.networking.TileCableBus;
|
||||
import appeng.tile.networking.TileController;
|
||||
import appeng.tile.networking.TileCreativeEnergyCell;
|
||||
import appeng.tile.networking.TileDenseEnergyCell;
|
||||
import appeng.tile.networking.TileEnergyAcceptor;
|
||||
import appeng.tile.networking.TileEnergyCell;
|
||||
import appeng.tile.networking.TileWireless;
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
import appeng.tile.spatial.TileSpatialIOPort;
|
||||
import appeng.tile.spatial.TileSpatialPylon;
|
||||
import appeng.tile.storage.TileChest;
|
||||
import appeng.tile.storage.TileDrive;
|
||||
import appeng.tile.storage.TileIOPort;
|
||||
import appeng.tile.storage.TileSkyChest;
|
||||
import appeng.tile.networking.CableBusTileEntity;
|
||||
import appeng.tile.networking.ControllerTileEntity;
|
||||
import appeng.tile.networking.CreativeEnergyCellTileEntity;
|
||||
import appeng.tile.networking.DenseEnergyCellTileEntity;
|
||||
import appeng.tile.networking.EnergyAcceptorTileEntity;
|
||||
import appeng.tile.networking.EnergyCellTileEntity;
|
||||
import appeng.tile.networking.WirelessTileEntity;
|
||||
import appeng.tile.qnb.QuantumBridgeTileEntity;
|
||||
import appeng.tile.spatial.SpatialIOPortTileEntity;
|
||||
import appeng.tile.spatial.SpatialPylonTileEntity;
|
||||
import appeng.tile.storage.ChestTileEntity;
|
||||
import appeng.tile.storage.DriveTileEntity;
|
||||
import appeng.tile.storage.IOPortTileEntity;
|
||||
import appeng.tile.storage.SkyChestTileEntity;
|
||||
|
||||
/**
|
||||
* Internal implementation for the API blocks
|
||||
@@ -245,9 +243,9 @@ public final class ApiBlocks implements IBlocks {
|
||||
150);
|
||||
|
||||
public ApiBlocks(FeatureFactory registry) {
|
||||
this.quartzOre = registry.block("quartz_ore", () -> new BlockQuartzOre(QUARTZ_PROPERTIES))
|
||||
this.quartzOre = registry.block("quartz_ore", () -> new QuartzOreBlock(QUARTZ_PROPERTIES))
|
||||
.features(AEFeature.CERTUS_ORE).build();
|
||||
this.quartzOreCharged = registry.block("charged_quartz_ore", () -> new BlockChargedQuartzOre(QUARTZ_PROPERTIES))
|
||||
this.quartzOreCharged = registry.block("charged_quartz_ore", () -> new ChargedQuartzOreBlock(QUARTZ_PROPERTIES))
|
||||
.features(AEFeature.CERTUS_ORE, AEFeature.CHARGED_CERTUS_ORE).rendering(new BlockRenderingCustomizer() {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -255,16 +253,16 @@ public final class ApiBlocks implements IBlocks {
|
||||
rendering.renderType(RenderType.getCutout());
|
||||
}
|
||||
}).build();
|
||||
this.matrixFrame = registry.block("matrix_frame", BlockMatrixFrame::new).features(AEFeature.SPATIAL_IO).build();
|
||||
this.matrixFrame = registry.block("matrix_frame", MatrixFrameBlock::new).features(AEFeature.SPATIAL_IO).build();
|
||||
|
||||
FeatureFactory deco = registry.features(AEFeature.DECORATIVE_BLOCKS);
|
||||
this.quartzBlock = deco.block("quartz_block", () -> new AEDecorativeBlock(QUARTZ_PROPERTIES)).build();
|
||||
this.quartzPillar = deco.block("quartz_pillar", () -> new BlockQuartzPillar(QUARTZ_PROPERTIES)).build();
|
||||
this.quartzPillar = deco.block("quartz_pillar", () -> new QuartzPillarBlock(QUARTZ_PROPERTIES)).build();
|
||||
this.chiseledQuartzBlock = deco.block("chiseled_quartz_block", () -> new AEDecorativeBlock(QUARTZ_PROPERTIES))
|
||||
.build();
|
||||
|
||||
this.quartzGlass = registry.features(AEFeature.QUARTZ_GLASS)
|
||||
.block("quartz_glass", () -> new BlockQuartzGlass(defaultProps(Material.GLASS).notSolid()))
|
||||
.block("quartz_glass", () -> new QuartzGlassBlock(defaultProps(Material.GLASS).notSolid()))
|
||||
.rendering(new BlockRenderingCustomizer() {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -274,7 +272,7 @@ public final class ApiBlocks implements IBlocks {
|
||||
}).build();
|
||||
this.quartzVibrantGlass = deco
|
||||
.block("quartz_vibrant_glass",
|
||||
() -> new BlockQuartzLamp(defaultProps(Material.GLASS).lightValue(15).notSolid()))
|
||||
() -> new QuartzLampBlock(defaultProps(Material.GLASS).lightValue(15).notSolid()))
|
||||
.addFeatures(AEFeature.DECORATIVE_LIGHTS, AEFeature.QUARTZ_GLASS)
|
||||
.rendering(new BlockRenderingCustomizer() {
|
||||
@Override
|
||||
@@ -284,7 +282,7 @@ public final class ApiBlocks implements IBlocks {
|
||||
}
|
||||
}).build();
|
||||
|
||||
this.quartzFixture = registry.block("quartz_fixture", BlockQuartzFixture::new)
|
||||
this.quartzFixture = registry.block("quartz_fixture", QuartzFixtureBlock::new)
|
||||
.features(AEFeature.DECORATIVE_LIGHTS).rendering(new BlockRenderingCustomizer() {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -299,174 +297,174 @@ public final class ApiBlocks implements IBlocks {
|
||||
this.skyStoneBlock = registry
|
||||
.features(
|
||||
AEFeature.SKY_STONE)
|
||||
.block("sky_stone_block", () -> new BlockSkyStone(SkystoneType.STONE,
|
||||
.block("sky_stone_block", () -> new SkyStoneBlock(SkystoneType.STONE,
|
||||
defaultProps(Material.ROCK).hardnessAndResistance(50, 150).harvestLevel(3)))
|
||||
.build();
|
||||
|
||||
this.smoothSkyStoneBlock = registry.features(AEFeature.SKY_STONE)
|
||||
.block("smooth_sky_stone_block", () -> new BlockSkyStone(SkystoneType.BLOCK, SKYSTONE_PROPERTIES))
|
||||
.block("smooth_sky_stone_block", () -> new SkyStoneBlock(SkystoneType.BLOCK, SKYSTONE_PROPERTIES))
|
||||
.build();
|
||||
this.skyStoneBrick = deco
|
||||
.block("sky_stone_brick", () -> new BlockSkyStone(SkystoneType.BRICK, SKYSTONE_PROPERTIES))
|
||||
.block("sky_stone_brick", () -> new SkyStoneBlock(SkystoneType.BRICK, SKYSTONE_PROPERTIES))
|
||||
.addFeatures(AEFeature.SKY_STONE).build();
|
||||
this.skyStoneSmallBrick = deco
|
||||
.block("sky_stone_small_brick", () -> new BlockSkyStone(SkystoneType.SMALL_BRICK, SKYSTONE_PROPERTIES))
|
||||
.block("sky_stone_small_brick", () -> new SkyStoneBlock(SkystoneType.SMALL_BRICK, SKYSTONE_PROPERTIES))
|
||||
.addFeatures(AEFeature.SKY_STONE).build();
|
||||
|
||||
Block.Properties skyStoneChestProps = defaultProps(Material.ROCK).hardnessAndResistance(50, 150).notSolid();
|
||||
|
||||
TileEntityDefinition skyChestTile = registry.tileEntity("sky_chest", TileSkyChest.class, TileSkyChest::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<TileSkyChest>() {
|
||||
TileEntityDefinition skyChestTile = registry.tileEntity("sky_chest", SkyChestTileEntity.class, SkyChestTileEntity::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<SkyChestTileEntity>() {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void customize(TileEntityRendering<TileSkyChest> rendering) {
|
||||
public void customize(TileEntityRendering<SkyChestTileEntity> rendering) {
|
||||
rendering.tileEntityRenderer(SkyChestTESR::new);
|
||||
}
|
||||
}).build();
|
||||
this.skyStoneChest = registry
|
||||
.block("sky_stone_chest", () -> new BlockSkyChest(BlockSkyChest.SkyChestType.STONE, skyStoneChestProps))
|
||||
.block("sky_stone_chest", () -> new SkyChestBlock(SkyChestBlock.SkyChestType.STONE, skyStoneChestProps))
|
||||
.features(AEFeature.SKY_STONE, AEFeature.SKY_STONE_CHESTS).tileEntity(skyChestTile).build();
|
||||
this.smoothSkyStoneChest = registry
|
||||
.block("smooth_sky_stone_chest",
|
||||
() -> new BlockSkyChest(BlockSkyChest.SkyChestType.BLOCK, skyStoneChestProps))
|
||||
() -> new SkyChestBlock(SkyChestBlock.SkyChestType.BLOCK, skyStoneChestProps))
|
||||
.features(AEFeature.SKY_STONE, AEFeature.SKY_STONE_CHESTS).tileEntity(skyChestTile).build();
|
||||
|
||||
this.skyCompass = registry.block("sky_compass", () -> new BlockSkyCompass(defaultProps(Material.MISCELLANEOUS)))
|
||||
this.skyCompass = registry.block("sky_compass", () -> new SkyCompassBlock(defaultProps(Material.MISCELLANEOUS)))
|
||||
.features(AEFeature.METEORITE_COMPASS)
|
||||
.tileEntity(registry.tileEntity("sky_compass", TileSkyCompass.class, TileSkyCompass::new)
|
||||
.tileEntity(registry.tileEntity("sky_compass", SkyCompassTileEntity.class, SkyCompassTileEntity::new)
|
||||
.rendering(new SkyCompassRendering()).build())
|
||||
.build();
|
||||
this.grindstone = registry
|
||||
.block("grindstone", () -> new BlockGrinder(defaultProps(Material.ROCK).hardnessAndResistance(3.2f)))
|
||||
.block("grindstone", () -> new GrinderBlock(defaultProps(Material.ROCK).hardnessAndResistance(3.2f)))
|
||||
.features(AEFeature.GRIND_STONE)
|
||||
.tileEntity(registry.tileEntity("grindstone", TileGrinder.class, TileGrinder::new).build()).build();
|
||||
.tileEntity(registry.tileEntity("grindstone", GrinderTileEntity.class, GrinderTileEntity::new).build()).build();
|
||||
this.crank = registry
|
||||
.block("crank",
|
||||
() -> new BlockCrank(
|
||||
() -> new CrankBlock(
|
||||
defaultProps(Material.WOOD).harvestTool(ToolType.AXE).harvestLevel(0).notSolid()))
|
||||
.features(AEFeature.GRIND_STONE)
|
||||
.tileEntity(registry.tileEntity("crank", TileCrank.class, TileCrank::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<TileCrank>() {
|
||||
.tileEntity(registry.tileEntity("crank", CrankTileEntity.class, CrankTileEntity::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<CrankTileEntity>() {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void customize(TileEntityRendering<TileCrank> rendering) {
|
||||
public void customize(TileEntityRendering<CrankTileEntity> rendering) {
|
||||
rendering.tileEntityRenderer(CrankTESR::new);
|
||||
}
|
||||
}).build())
|
||||
.build();
|
||||
this.inscriber = registry.block("inscriber", () -> new BlockInscriber(defaultProps(Material.IRON).notSolid()))
|
||||
this.inscriber = registry.block("inscriber", () -> new InscriberBlock(defaultProps(Material.IRON).notSolid()))
|
||||
.features(AEFeature.INSCRIBER)
|
||||
.tileEntity(registry.tileEntity("inscriber", TileInscriber.class, TileInscriber::new)
|
||||
.tileEntity(registry.tileEntity("inscriber", InscriberTileEntity.class, InscriberTileEntity::new)
|
||||
.rendering(new InscriberRendering()).build())
|
||||
.build();
|
||||
this.wirelessAccessPoint = registry.block("wireless_access_point", BlockWireless::new)
|
||||
this.wirelessAccessPoint = registry.block("wireless_access_point", WirelessBlock::new)
|
||||
.features(AEFeature.WIRELESS_ACCESS_TERMINAL)
|
||||
.tileEntity(registry.tileEntity("wireless_access_point", TileWireless.class, TileWireless::new).build())
|
||||
.tileEntity(registry.tileEntity("wireless_access_point", WirelessTileEntity.class, WirelessTileEntity::new).build())
|
||||
.rendering(new WirelessRendering()).build();
|
||||
this.charger = registry.block("charger", BlockCharger::new).features(AEFeature.CHARGER)
|
||||
.tileEntity(registry.tileEntity("charger", TileCharger.class, TileCharger::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<TileCharger>() {
|
||||
this.charger = registry.block("charger", ChargerBlock::new).features(AEFeature.CHARGER)
|
||||
.tileEntity(registry.tileEntity("charger", ChargerTileEntity.class, ChargerTileEntity::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<ChargerTileEntity>() {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void customize(TileEntityRendering<TileCharger> rendering) {
|
||||
rendering.tileEntityRenderer(BlockCharger.createTesr());
|
||||
public void customize(TileEntityRendering<ChargerTileEntity> rendering) {
|
||||
rendering.tileEntityRenderer(ChargerBlock.createTesr());
|
||||
}
|
||||
}).build())
|
||||
.build();
|
||||
|
||||
EntityTinyTNTPrimed.TYPE = registry
|
||||
.<EntityTinyTNTPrimed>entity("tiny_tnt_primed", EntityTinyTNTPrimed::new, EntityClassification.MISC)
|
||||
TinyTNTPrimedEntity.TYPE = registry
|
||||
.<TinyTNTPrimedEntity>entity("tiny_tnt_primed", TinyTNTPrimedEntity::new, EntityClassification.MISC)
|
||||
.customize(p -> p.setTrackingRange(16).setUpdateInterval(4).setShouldReceiveVelocityUpdates(true))
|
||||
.build();
|
||||
|
||||
this.tinyTNT = registry
|
||||
.block("tiny_tnt",
|
||||
() -> new BlockTinyTNT(
|
||||
() -> new TinyTNTBlock(
|
||||
defaultProps(Material.TNT).sound(SoundType.GROUND).hardnessAndResistance(0).notSolid()))
|
||||
.features(AEFeature.TINY_TNT).bootstrap((block, item) -> (IInitComponent) () -> DispenserBlock
|
||||
.registerDispenseBehavior(item, new DispenserBehaviorTinyTNT()))
|
||||
.registerDispenseBehavior(item, new TinyTNTDispenseItemBehavior()))
|
||||
.build();
|
||||
this.securityStation = registry.block("security_station", BlockSecurityStation::new)
|
||||
this.securityStation = registry.block("security_station", SecurityStationBlock::new)
|
||||
.features(AEFeature.SECURITY).tileEntity(registry
|
||||
.tileEntity("security_station", TileSecurityStation.class, TileSecurityStation::new).build())
|
||||
.tileEntity("security_station", SecurityStationTileEntity.class, SecurityStationTileEntity::new).build())
|
||||
.rendering(new SecurityStationRendering()).build();
|
||||
|
||||
TileEntityDefinition quantumRingTile = registry
|
||||
.tileEntity("quantum_ring", TileQuantumBridge.class, TileQuantumBridge::new).build();
|
||||
this.quantumRing = registry.block("quantum_ring", BlockQuantumRing::new)
|
||||
.tileEntity("quantum_ring", QuantumBridgeTileEntity.class, QuantumBridgeTileEntity::new).build();
|
||||
this.quantumRing = registry.block("quantum_ring", QuantumRingBlock::new)
|
||||
.features(AEFeature.QUANTUM_NETWORK_BRIDGE).tileEntity(quantumRingTile)
|
||||
.rendering(new QuantumBridgeRendering()).build();
|
||||
this.quantumLink = registry.block("quantum_link", BlockQuantumLinkChamber::new)
|
||||
this.quantumLink = registry.block("quantum_link", QuantumLinkChamberBlock::new)
|
||||
.features(AEFeature.QUANTUM_NETWORK_BRIDGE).tileEntity(quantumRingTile)
|
||||
.rendering(new QuantumBridgeRendering()).build();
|
||||
this.spatialPylon = registry.block("spatial_pylon", BlockSpatialPylon::new).features(AEFeature.SPATIAL_IO)
|
||||
.tileEntity(registry.tileEntity("spatial_pylon", TileSpatialPylon.class, TileSpatialPylon::new).build())
|
||||
this.spatialPylon = registry.block("spatial_pylon", SpatialPylonBlock::new).features(AEFeature.SPATIAL_IO)
|
||||
.tileEntity(registry.tileEntity("spatial_pylon", SpatialPylonTileEntity.class, SpatialPylonTileEntity::new).build())
|
||||
.rendering(new SpatialPylonRendering()).build();
|
||||
this.spatialIOPort = registry.block("spatial_io_port", BlockSpatialIOPort::new).features(AEFeature.SPATIAL_IO)
|
||||
this.spatialIOPort = registry.block("spatial_io_port", SpatialIOPortBlock::new).features(AEFeature.SPATIAL_IO)
|
||||
.tileEntity(
|
||||
registry.tileEntity("spatial_io_port", TileSpatialIOPort.class, TileSpatialIOPort::new).build())
|
||||
registry.tileEntity("spatial_io_port", SpatialIOPortTileEntity.class, SpatialIOPortTileEntity::new).build())
|
||||
.build();
|
||||
this.controller = registry.block("controller", BlockController::new).features(AEFeature.CHANNELS)
|
||||
.tileEntity(registry.tileEntity("controller", TileController.class, TileController::new).build())
|
||||
this.controller = registry.block("controller", ControllerBlock::new).features(AEFeature.CHANNELS)
|
||||
.tileEntity(registry.tileEntity("controller", ControllerTileEntity.class, ControllerTileEntity::new).build())
|
||||
.rendering(new ControllerRendering()).build();
|
||||
this.drive = registry.block("drive", BlockDrive::new).features(AEFeature.STORAGE_CELLS, AEFeature.ME_DRIVE)
|
||||
.tileEntity(registry.tileEntity("drive", TileDrive.class, TileDrive::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<TileDrive>() {
|
||||
this.drive = registry.block("drive", DriveBlock::new).features(AEFeature.STORAGE_CELLS, AEFeature.ME_DRIVE)
|
||||
.tileEntity(registry.tileEntity("drive", DriveTileEntity.class, DriveTileEntity::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<DriveTileEntity>() {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void customize(TileEntityRendering<TileDrive> rendering) {
|
||||
public void customize(TileEntityRendering<DriveTileEntity> rendering) {
|
||||
rendering.tileEntityRenderer(DriveLedTileEntityRenderer::new);
|
||||
}
|
||||
}).build())
|
||||
.rendering(new DriveRendering()).build();
|
||||
this.chest = registry.block("chest", BlockChest::new).features(AEFeature.STORAGE_CELLS, AEFeature.ME_CHEST)
|
||||
.tileEntity(registry.tileEntity("chest", TileChest.class, TileChest::new).build())
|
||||
this.chest = registry.block("chest", ChestBlock::new).features(AEFeature.STORAGE_CELLS, AEFeature.ME_CHEST)
|
||||
.tileEntity(registry.tileEntity("chest", ChestTileEntity.class, ChestTileEntity::new).build())
|
||||
.rendering(new ChestRendering()).build();
|
||||
this.iface = registry.block("interface", BlockInterface::new).features(AEFeature.INTERFACE)
|
||||
.tileEntity(registry.tileEntity("interface", TileInterface.class, TileInterface::new).build()).build();
|
||||
this.fluidIface = registry.block("fluid_interface", BlockFluidInterface::new)
|
||||
this.iface = registry.block("interface", InterfaceBlock::new).features(AEFeature.INTERFACE)
|
||||
.tileEntity(registry.tileEntity("interface", InterfaceTileEntity.class, InterfaceTileEntity::new).build()).build();
|
||||
this.fluidIface = registry.block("fluid_interface", FluidInterfaceBlock::new)
|
||||
.features(AEFeature.FLUID_INTERFACE).tileEntity(registry
|
||||
.tileEntity("fluid_interface", TileFluidInterface.class, TileFluidInterface::new).build())
|
||||
.tileEntity("fluid_interface", FluidInterfaceTileEntity.class, FluidInterfaceTileEntity::new).build())
|
||||
.build();
|
||||
this.cellWorkbench = registry.block("cell_workbench", BlockCellWorkbench::new).features(AEFeature.STORAGE_CELLS)
|
||||
this.cellWorkbench = registry.block("cell_workbench", CellWorkbenchBlock::new).features(AEFeature.STORAGE_CELLS)
|
||||
.tileEntity(
|
||||
registry.tileEntity("cell_workbench", TileCellWorkbench.class, TileCellWorkbench::new).build())
|
||||
registry.tileEntity("cell_workbench", CellWorkbenchTileEntity.class, CellWorkbenchTileEntity::new).build())
|
||||
.build();
|
||||
this.iOPort = registry.block("io_port", BlockIOPort::new).features(AEFeature.STORAGE_CELLS, AEFeature.IO_PORT)
|
||||
.tileEntity(registry.tileEntity("io_port", TileIOPort.class, TileIOPort::new).build()).build();
|
||||
this.condenser = registry.block("condenser", BlockCondenser::new).features(AEFeature.CONDENSER)
|
||||
.tileEntity(registry.tileEntity("condenser", TileCondenser.class, TileCondenser::new).build()).build();
|
||||
this.energyAcceptor = registry.block("energy_acceptor", BlockEnergyAcceptor::new)
|
||||
this.iOPort = registry.block("io_port", IOPortBlock::new).features(AEFeature.STORAGE_CELLS, AEFeature.IO_PORT)
|
||||
.tileEntity(registry.tileEntity("io_port", IOPortTileEntity.class, IOPortTileEntity::new).build()).build();
|
||||
this.condenser = registry.block("condenser", CondenserBlock::new).features(AEFeature.CONDENSER)
|
||||
.tileEntity(registry.tileEntity("condenser", CondenserTileEntity.class, CondenserTileEntity::new).build()).build();
|
||||
this.energyAcceptor = registry.block("energy_acceptor", EnergyAcceptorBlock::new)
|
||||
.features(AEFeature.ENERGY_ACCEPTOR).tileEntity(registry
|
||||
.tileEntity("energy_acceptor", TileEnergyAcceptor.class, TileEnergyAcceptor::new).build())
|
||||
.tileEntity("energy_acceptor", EnergyAcceptorTileEntity.class, EnergyAcceptorTileEntity::new).build())
|
||||
.build();
|
||||
this.vibrationChamber = registry.block("vibration_chamber", BlockVibrationChamber::new)
|
||||
this.vibrationChamber = registry.block("vibration_chamber", VibrationChamberBlock::new)
|
||||
.features(AEFeature.POWER_GEN)
|
||||
.tileEntity(registry
|
||||
.tileEntity("vibration_chamber", TileVibrationChamber.class, TileVibrationChamber::new).build())
|
||||
.tileEntity("vibration_chamber", VibrationChamberTileEntity.class, VibrationChamberTileEntity::new).build())
|
||||
.build();
|
||||
this.quartzGrowthAccelerator = registry.block("quartz_growth_accelerator", BlockQuartzGrowthAccelerator::new)
|
||||
.tileEntity(registry.tileEntity("quartz_growth_accelerator", TileQuartzGrowthAccelerator.class,
|
||||
TileQuartzGrowthAccelerator::new).build())
|
||||
this.quartzGrowthAccelerator = registry.block("quartz_growth_accelerator", QuartzGrowthAcceleratorBlock::new)
|
||||
.tileEntity(registry.tileEntity("quartz_growth_accelerator", QuartzGrowthAcceleratorTileEntity.class,
|
||||
QuartzGrowthAcceleratorTileEntity::new).build())
|
||||
.features(AEFeature.CRYSTAL_GROWTH_ACCELERATOR).build();
|
||||
this.energyCell = registry.block("energy_cell", BlockEnergyCell::new).features(AEFeature.ENERGY_CELLS)
|
||||
this.energyCell = registry.block("energy_cell", EnergyCellBlock::new).features(AEFeature.ENERGY_CELLS)
|
||||
.item(AEBaseBlockItemChargeable::new)
|
||||
.tileEntity(registry.tileEntity("energy_cell", TileEnergyCell.class, TileEnergyCell::new).build())
|
||||
.tileEntity(registry.tileEntity("energy_cell", EnergyCellTileEntity.class, EnergyCellTileEntity::new).build())
|
||||
.build();
|
||||
this.energyCellDense = registry.block("dense_energy_cell", BlockDenseEnergyCell::new)
|
||||
this.energyCellDense = registry.block("dense_energy_cell", DenseEnergyCellBlock::new)
|
||||
.features(AEFeature.ENERGY_CELLS, AEFeature.DENSE_ENERGY_CELLS).item(AEBaseBlockItemChargeable::new)
|
||||
.tileEntity(registry
|
||||
.tileEntity("dense_energy_cell", TileDenseEnergyCell.class, TileDenseEnergyCell::new).build())
|
||||
.tileEntity("dense_energy_cell", DenseEnergyCellTileEntity.class, DenseEnergyCellTileEntity::new).build())
|
||||
.build();
|
||||
this.energyCellCreative = registry.block("creative_energy_cell", BlockCreativeEnergyCell::new)
|
||||
this.energyCellCreative = registry.block("creative_energy_cell", CreativeEnergyCellBlock::new)
|
||||
.features(AEFeature.CREATIVE)
|
||||
.tileEntity(registry
|
||||
.tileEntity("creative_energy_cell", TileCreativeEnergyCell.class, TileCreativeEnergyCell::new)
|
||||
.tileEntity("creative_energy_cell", CreativeEnergyCellTileEntity.class, CreativeEnergyCellTileEntity::new)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
TileEntityDefinition craftingUnit = registry
|
||||
.tileEntity("crafting_unit", TileCraftingTile.class, TileCraftingTile::new).build();
|
||||
.tileEntity("crafting_unit", CraftingTileEntity.class, CraftingTileEntity::new).build();
|
||||
|
||||
FeatureFactory crafting = registry.features(AEFeature.CRAFTING_CPU);
|
||||
Block.Properties craftingBlockProps = defaultProps(Material.IRON);
|
||||
@@ -479,34 +477,34 @@ public final class ApiBlocks implements IBlocks {
|
||||
.rendering(new CraftingCubeRendering()).tileEntity(craftingUnit).build();
|
||||
|
||||
TileEntityDefinition craftingStorage = registry
|
||||
.tileEntity("crafting_storage", TileCraftingStorageTile.class, TileCraftingStorageTile::new).build();
|
||||
.tileEntity("crafting_storage", CraftingStorageTileEntity.class, CraftingStorageTileEntity::new).build();
|
||||
this.craftingStorage1k = crafting
|
||||
.block("1k_crafting_storage",
|
||||
() -> new BlockCraftingStorage(craftingBlockProps, CraftingUnitType.STORAGE_1K))
|
||||
.item(ItemCraftingStorage::new).tileEntity(craftingStorage).rendering(new CraftingCubeRendering())
|
||||
() -> new CraftingStorageBlock(craftingBlockProps, CraftingUnitType.STORAGE_1K))
|
||||
.item(CraftingStorageItem::new).tileEntity(craftingStorage).rendering(new CraftingCubeRendering())
|
||||
.build();
|
||||
this.craftingStorage4k = crafting
|
||||
.block("4k_crafting_storage",
|
||||
() -> new BlockCraftingStorage(craftingBlockProps, CraftingUnitType.STORAGE_4K))
|
||||
.item(ItemCraftingStorage::new).tileEntity(craftingStorage).rendering(new CraftingCubeRendering())
|
||||
() -> new CraftingStorageBlock(craftingBlockProps, CraftingUnitType.STORAGE_4K))
|
||||
.item(CraftingStorageItem::new).tileEntity(craftingStorage).rendering(new CraftingCubeRendering())
|
||||
.build();
|
||||
this.craftingStorage16k = crafting
|
||||
.block("16k_crafting_storage",
|
||||
() -> new BlockCraftingStorage(craftingBlockProps, CraftingUnitType.STORAGE_16K))
|
||||
.item(ItemCraftingStorage::new).tileEntity(craftingStorage).rendering(new CraftingCubeRendering())
|
||||
() -> new CraftingStorageBlock(craftingBlockProps, CraftingUnitType.STORAGE_16K))
|
||||
.item(CraftingStorageItem::new).tileEntity(craftingStorage).rendering(new CraftingCubeRendering())
|
||||
.build();
|
||||
this.craftingStorage64k = crafting
|
||||
.block("64k_crafting_storage",
|
||||
() -> new BlockCraftingStorage(craftingBlockProps, CraftingUnitType.STORAGE_64K))
|
||||
.item(ItemCraftingStorage::new).tileEntity(craftingStorage).rendering(new CraftingCubeRendering())
|
||||
() -> new CraftingStorageBlock(craftingBlockProps, CraftingUnitType.STORAGE_64K))
|
||||
.item(CraftingStorageItem::new).tileEntity(craftingStorage).rendering(new CraftingCubeRendering())
|
||||
.build();
|
||||
this.craftingMonitor = crafting.block("crafting_monitor", () -> new BlockCraftingMonitor(craftingBlockProps))
|
||||
this.craftingMonitor = crafting.block("crafting_monitor", () -> new CraftingMonitorBlock(craftingBlockProps))
|
||||
.tileEntity(registry
|
||||
.tileEntity("crafting_monitor", TileCraftingMonitorTile.class, TileCraftingMonitorTile::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<TileCraftingMonitorTile>() {
|
||||
.tileEntity("crafting_monitor", CraftingMonitorTileEntity.class, CraftingMonitorTileEntity::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<CraftingMonitorTileEntity>() {
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Override
|
||||
public void customize(TileEntityRendering<TileCraftingMonitorTile> rendering) {
|
||||
public void customize(TileEntityRendering<CraftingMonitorTileEntity> rendering) {
|
||||
rendering.tileEntityRenderer(CraftingMonitorTESR::new);
|
||||
}
|
||||
}).build())
|
||||
@@ -526,7 +524,7 @@ public final class ApiBlocks implements IBlocks {
|
||||
}).build();
|
||||
|
||||
this.molecularAssembler = registry
|
||||
.block("molecular_assembler", () -> new BlockMolecularAssembler(defaultProps(Material.IRON).notSolid()))
|
||||
.block("molecular_assembler", () -> new MolecularAssemblerBlock(defaultProps(Material.IRON).notSolid()))
|
||||
.features(AEFeature.MOLECULAR_ASSEMBLER).rendering(new BlockRenderingCustomizer() {
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Override
|
||||
@@ -535,20 +533,20 @@ public final class ApiBlocks implements IBlocks {
|
||||
}
|
||||
})
|
||||
.tileEntity(registry
|
||||
.tileEntity("molecular_assembler", TileMolecularAssembler.class, TileMolecularAssembler::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<TileMolecularAssembler>() {
|
||||
.tileEntity("molecular_assembler", MolecularAssemblerTileEntity.class, MolecularAssemblerTileEntity::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<MolecularAssemblerTileEntity>() {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void customize(TileEntityRendering<TileMolecularAssembler> rendering) {
|
||||
public void customize(TileEntityRendering<MolecularAssemblerTileEntity> rendering) {
|
||||
rendering.tileEntityRenderer(MolecularAssemblerRenderer::new);
|
||||
}
|
||||
}).build())
|
||||
.build();
|
||||
|
||||
this.lightDetector = registry.block("light_detector", BlockLightDetector::new)
|
||||
this.lightDetector = registry.block("light_detector", LightDetectorBlock::new)
|
||||
.features(AEFeature.LIGHT_DETECTOR)
|
||||
.tileEntity(
|
||||
registry.tileEntity("light_detector", TileLightDetector.class, TileLightDetector::new).build())
|
||||
registry.tileEntity("light_detector", LightDetectorTileEntity.class, LightDetectorTileEntity::new).build())
|
||||
.rendering(new BlockRenderingCustomizer() {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -556,9 +554,9 @@ public final class ApiBlocks implements IBlocks {
|
||||
rendering.renderType(RenderType.getCutout());
|
||||
}
|
||||
}).build();
|
||||
this.paint = registry.block("paint", BlockPaint::new).features(AEFeature.PAINT_BALLS)
|
||||
.tileEntity(registry.tileEntity("paint", TilePaint.class, TilePaint::new).build())
|
||||
.rendering(new PaintRendering()).build();
|
||||
this.paint = registry.block("paint", PaintSplotchesBlock::new).features(AEFeature.PAINT_BALLS)
|
||||
.tileEntity(registry.tileEntity("paint", PaintSplotchesTileEntity.class, PaintSplotchesTileEntity::new).build())
|
||||
.rendering(new PaintSplotchesRendering()).build();
|
||||
|
||||
this.skyStoneStairs = deco
|
||||
.block("sky_stone_stairs",
|
||||
@@ -594,12 +592,12 @@ public final class ApiBlocks implements IBlocks {
|
||||
() -> new StairsBlock(this.quartzPillar().block()::getDefaultState, QUARTZ_PROPERTIES))
|
||||
.addFeatures(AEFeature.CERTUS).build();
|
||||
|
||||
this.multiPart = registry.block("cable_bus", BlockCableBus::new).rendering(new CableBusRendering())
|
||||
.tileEntity(registry.tileEntity("cable_bus", TileCableBus.class, TileCableBus::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<TileCableBus>() {
|
||||
this.multiPart = registry.block("cable_bus", CableBusBlock::new).rendering(new CableBusRendering())
|
||||
.tileEntity(registry.tileEntity("cable_bus", CableBusTileEntity.class, CableBusTileEntity::new)
|
||||
.rendering(new TileEntityRenderingCustomizer<CableBusTileEntity>() {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void customize(TileEntityRendering<TileCableBus> rendering) {
|
||||
public void customize(TileEntityRendering<CableBusTileEntity> rendering) {
|
||||
rendering.tileEntityRenderer(CableBusTESR::new);
|
||||
}
|
||||
}).build())
|
||||
@@ -623,27 +621,27 @@ public final class ApiBlocks implements IBlocks {
|
||||
this.quartzPillarSlab = deco.block("quartz_pillar_slab", () -> new SlabBlock(QUARTZ_PROPERTIES))
|
||||
.addFeatures(AEFeature.CERTUS).build();
|
||||
|
||||
this.itemGen = registry.block("debug_item_gen", BlockItemGen::new)
|
||||
this.itemGen = registry.block("debug_item_gen", ItemGenBlock::new)
|
||||
.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE)
|
||||
.tileEntity(registry.tileEntity("debug_item_gen", TileItemGen.class, TileItemGen::new).build()).build();
|
||||
this.chunkLoader = registry.block("debug_chunk_loader", BlockChunkloader::new)
|
||||
.tileEntity(registry.tileEntity("debug_item_gen", ItemGenTileEntity.class, ItemGenTileEntity::new).build()).build();
|
||||
this.chunkLoader = registry.block("debug_chunk_loader", ChunkLoaderBlock::new)
|
||||
.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE)
|
||||
.tileEntity(
|
||||
registry.tileEntity("debug_chunk_loader", TileChunkLoader.class, TileChunkLoader::new).build())
|
||||
registry.tileEntity("debug_chunk_loader", ChunkLoaderTileEntity.class, ChunkLoaderTileEntity::new).build())
|
||||
.build();
|
||||
this.phantomNode = registry.block("debug_phantom_node", BlockPhantomNode::new)
|
||||
this.phantomNode = registry.block("debug_phantom_node", PhantomNodeBlock::new)
|
||||
.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE)
|
||||
.tileEntity(
|
||||
registry.tileEntity("debug_phantom_node", TilePhantomNode.class, TilePhantomNode::new).build())
|
||||
registry.tileEntity("debug_phantom_node", PhantomNodeTileEntity.class, PhantomNodeTileEntity::new).build())
|
||||
.build();
|
||||
this.cubeGenerator = registry.block("debug_cube_gen", BlockCubeGenerator::new)
|
||||
this.cubeGenerator = registry.block("debug_cube_gen", CubeGeneratorBlock::new)
|
||||
.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE)
|
||||
.tileEntity(
|
||||
registry.tileEntity("debug_cube_gen", TileCubeGenerator.class, TileCubeGenerator::new).build())
|
||||
registry.tileEntity("debug_cube_gen", CubeGeneratorTileEntity.class, CubeGeneratorTileEntity::new).build())
|
||||
.build();
|
||||
this.energyGenerator = registry.block("debug_energy_gen", BlockEnergyGenerator::new)
|
||||
this.energyGenerator = registry.block("debug_energy_gen", EnergyGeneratorBlock::new)
|
||||
.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE).tileEntity(registry
|
||||
.tileEntity("debug_energy_gen", TileEnergyGenerator.class, TileEnergyGenerator::new).build())
|
||||
.tileEntity("debug_energy_gen", EnergyGeneratorTileEntity.class, EnergyGeneratorTileEntity::new).build())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,44 +34,44 @@ import appeng.bootstrap.FeatureFactory;
|
||||
import appeng.core.features.ActivityState;
|
||||
import appeng.core.features.ColoredItemDefinition;
|
||||
import appeng.core.features.ItemStackSrc;
|
||||
import appeng.debug.ToolDebugCard;
|
||||
import appeng.debug.ToolDebugPartPlacer;
|
||||
import appeng.debug.ToolEraser;
|
||||
import appeng.debug.ToolMeteoritePlacer;
|
||||
import appeng.debug.ToolReplicatorCard;
|
||||
import appeng.entity.EntityGrowingCrystal;
|
||||
import appeng.debug.DebugCardItem;
|
||||
import appeng.debug.DebugPartPlacerItem;
|
||||
import appeng.debug.EraserItem;
|
||||
import appeng.debug.MeteoritePlacerItem;
|
||||
import appeng.debug.ReplicatorCardItem;
|
||||
import appeng.entity.GrowingCrystalEntity;
|
||||
import appeng.fluids.items.BasicFluidStorageCell;
|
||||
import appeng.fluids.items.FluidDummyItem;
|
||||
import appeng.fluids.items.FluidDummyItemRendering;
|
||||
import appeng.hooks.DispenserBlockTool;
|
||||
import appeng.hooks.DispenserMatterCannon;
|
||||
import appeng.hooks.BlockToolDispenseItemBehavior;
|
||||
import appeng.hooks.MatterCannonDispenseItemBehavior;
|
||||
import appeng.items.materials.MaterialType;
|
||||
import appeng.items.misc.ItemCrystalSeed;
|
||||
import appeng.items.misc.ItemEncodedPattern;
|
||||
import appeng.items.misc.ItemPaintBall;
|
||||
import appeng.items.misc.ItemPaintBallRendering;
|
||||
import appeng.items.parts.ItemFacade;
|
||||
import appeng.items.storage.BasicItemStorageCell;
|
||||
import appeng.items.storage.ItemCreativeStorageCell;
|
||||
import appeng.items.storage.ItemSpatialStorageCell;
|
||||
import appeng.items.storage.ItemViewCell;
|
||||
import appeng.items.tools.ToolBiometricCard;
|
||||
import appeng.items.tools.ToolMemoryCard;
|
||||
import appeng.items.tools.ToolNetworkTool;
|
||||
import appeng.items.tools.powered.ToolChargedStaff;
|
||||
import appeng.items.tools.powered.ToolColorApplicator;
|
||||
import appeng.items.tools.powered.ToolColorApplicatorRendering;
|
||||
import appeng.items.tools.powered.ToolEntropyManipulator;
|
||||
import appeng.items.tools.powered.ToolMatterCannon;
|
||||
import appeng.items.tools.powered.ToolPortableCell;
|
||||
import appeng.items.tools.powered.ToolWirelessTerminal;
|
||||
import appeng.items.tools.quartz.ToolQuartzAxe;
|
||||
import appeng.items.tools.quartz.ToolQuartzCuttingKnife;
|
||||
import appeng.items.tools.quartz.ToolQuartzHoe;
|
||||
import appeng.items.tools.quartz.ToolQuartzPickaxe;
|
||||
import appeng.items.tools.quartz.ToolQuartzSpade;
|
||||
import appeng.items.tools.quartz.ToolQuartzSword;
|
||||
import appeng.items.tools.quartz.ToolQuartzWrench;
|
||||
import appeng.items.misc.CrystalSeedItem;
|
||||
import appeng.items.misc.EncodedPatternItem;
|
||||
import appeng.items.misc.PaintBallItem;
|
||||
import appeng.items.misc.PaintBallItemRendering;
|
||||
import appeng.items.parts.FacadeItem;
|
||||
import appeng.items.storage.BasicStorageCellItem;
|
||||
import appeng.items.storage.CreativeStorageCellItem;
|
||||
import appeng.items.storage.SpatialStorageCellItem;
|
||||
import appeng.items.storage.ViewCellItem;
|
||||
import appeng.items.tools.BiometricCardItem;
|
||||
import appeng.items.tools.MemoryCardItem;
|
||||
import appeng.items.tools.NetworkToolItem;
|
||||
import appeng.items.tools.powered.ChargedStaffItem;
|
||||
import appeng.items.tools.powered.ColorApplicatorItem;
|
||||
import appeng.items.tools.powered.ColorApplicatorItemRendering;
|
||||
import appeng.items.tools.powered.EntropyManipulatorItem;
|
||||
import appeng.items.tools.powered.MatterCannonItem;
|
||||
import appeng.items.tools.powered.PortableCellItem;
|
||||
import appeng.items.tools.powered.WirelessTerminalItem;
|
||||
import appeng.items.tools.quartz.QuartzAxeItem;
|
||||
import appeng.items.tools.quartz.QuartzCuttingKnifeItem;
|
||||
import appeng.items.tools.quartz.QuartzHoeItem;
|
||||
import appeng.items.tools.quartz.QuartzPickaxeItem;
|
||||
import appeng.items.tools.quartz.QuartzSpadeItem;
|
||||
import appeng.items.tools.quartz.QuartzSwordItem;
|
||||
import appeng.items.tools.quartz.QuartzWrenchItem;
|
||||
|
||||
/**
|
||||
* Internal implementation for the API items
|
||||
@@ -142,83 +142,83 @@ public final class ApiItems implements IItems {
|
||||
public ApiItems(FeatureFactory registry, ApiMaterials materials) {
|
||||
FeatureFactory certusTools = registry.features(AEFeature.CERTUS_QUARTZ_TOOLS);
|
||||
this.certusQuartzAxe = certusTools
|
||||
.item("certus_quartz_axe", props -> new ToolQuartzAxe(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
.item("certus_quartz_axe", props -> new QuartzAxeItem(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.TOOLS).addFeatures(AEFeature.QUARTZ_AXE).build();
|
||||
this.certusQuartzHoe = certusTools
|
||||
.item("certus_quartz_hoe", props -> new ToolQuartzHoe(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
.item("certus_quartz_hoe", props -> new QuartzHoeItem(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.TOOLS).addFeatures(AEFeature.QUARTZ_HOE).build();
|
||||
this.certusQuartzShovel = certusTools
|
||||
.item("certus_quartz_shovel", props -> new ToolQuartzSpade(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
.item("certus_quartz_shovel", props -> new QuartzSpadeItem(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.TOOLS).addFeatures(AEFeature.QUARTZ_SPADE).build();
|
||||
this.certusQuartzPick = certusTools
|
||||
.item("certus_quartz_pickaxe", props -> new ToolQuartzPickaxe(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
.item("certus_quartz_pickaxe", props -> new QuartzPickaxeItem(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.TOOLS).addFeatures(AEFeature.QUARTZ_PICKAXE).build();
|
||||
this.certusQuartzSword = certusTools
|
||||
.item("certus_quartz_sword", props -> new ToolQuartzSword(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
.item("certus_quartz_sword", props -> new QuartzSwordItem(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.COMBAT).addFeatures(AEFeature.QUARTZ_SWORD).build();
|
||||
this.certusQuartzWrench = certusTools.item("certus_quartz_wrench", ToolQuartzWrench::new)
|
||||
this.certusQuartzWrench = certusTools.item("certus_quartz_wrench", QuartzWrenchItem::new)
|
||||
.itemGroup(ItemGroup.TOOLS).props(props -> props.maxStackSize(1)).addFeatures(AEFeature.QUARTZ_WRENCH)
|
||||
.build();
|
||||
this.certusQuartzKnife = certusTools
|
||||
.item("certus_quartz_cutting_knife",
|
||||
props -> new ToolQuartzCuttingKnife(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
props -> new QuartzCuttingKnifeItem(props, AEFeature.CERTUS_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.TOOLS).props(props -> props.maxStackSize(1).maxDamage(50).setNoRepair())
|
||||
.addFeatures(AEFeature.QUARTZ_KNIFE).build();
|
||||
|
||||
FeatureFactory netherTools = registry.features(AEFeature.NETHER_QUARTZ_TOOLS);
|
||||
this.netherQuartzAxe = netherTools
|
||||
.item("nether_quartz_axe", props -> new ToolQuartzAxe(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
.item("nether_quartz_axe", props -> new QuartzAxeItem(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.TOOLS).addFeatures(AEFeature.QUARTZ_AXE).build();
|
||||
this.netherQuartzHoe = netherTools
|
||||
.item("nether_quartz_hoe", props -> new ToolQuartzHoe(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
.item("nether_quartz_hoe", props -> new QuartzHoeItem(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.TOOLS).addFeatures(AEFeature.QUARTZ_HOE).build();
|
||||
this.netherQuartzShovel = netherTools
|
||||
.item("nether_quartz_shovel", props -> new ToolQuartzSpade(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
.item("nether_quartz_shovel", props -> new QuartzSpadeItem(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.TOOLS).addFeatures(AEFeature.QUARTZ_SPADE).build();
|
||||
this.netherQuartzPick = netherTools
|
||||
.item("nether_quartz_pickaxe", props -> new ToolQuartzPickaxe(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
.item("nether_quartz_pickaxe", props -> new QuartzPickaxeItem(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.TOOLS).addFeatures(AEFeature.QUARTZ_PICKAXE).build();
|
||||
this.netherQuartzSword = netherTools
|
||||
.item("nether_quartz_sword", props -> new ToolQuartzSword(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
.item("nether_quartz_sword", props -> new QuartzSwordItem(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.COMBAT).addFeatures(AEFeature.QUARTZ_SWORD).build();
|
||||
this.netherQuartzWrench = netherTools.item("nether_quartz_wrench", ToolQuartzWrench::new)
|
||||
this.netherQuartzWrench = netherTools.item("nether_quartz_wrench", QuartzWrenchItem::new)
|
||||
.itemGroup(ItemGroup.TOOLS).props(props -> props.maxStackSize(1)).addFeatures(AEFeature.QUARTZ_WRENCH)
|
||||
.build();
|
||||
this.netherQuartzKnife = netherTools
|
||||
.item("nether_quartz_cutting_knife",
|
||||
props -> new ToolQuartzCuttingKnife(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
props -> new QuartzCuttingKnifeItem(props, AEFeature.NETHER_QUARTZ_TOOLS))
|
||||
.itemGroup(ItemGroup.TOOLS).props(props -> props.maxStackSize(1).maxDamage(50).setNoRepair())
|
||||
.addFeatures(AEFeature.QUARTZ_KNIFE).build();
|
||||
|
||||
Consumer<Item.Properties> chargedDefaults = props -> props.maxStackSize(1).maxDamage(32).setNoRepair();
|
||||
|
||||
FeatureFactory powerTools = registry.features(AEFeature.POWERED_TOOLS);
|
||||
this.entropyManipulator = powerTools.item("entropy_manipulator", ToolEntropyManipulator::new)
|
||||
this.entropyManipulator = powerTools.item("entropy_manipulator", EntropyManipulatorItem::new)
|
||||
.props(chargedDefaults).addFeatures(AEFeature.ENTROPY_MANIPULATOR)
|
||||
.dispenserBehavior(DispenserBlockTool::new).build();
|
||||
this.wirelessTerminal = powerTools.item("wireless_terminal", ToolWirelessTerminal::new).props(chargedDefaults)
|
||||
.dispenserBehavior(BlockToolDispenseItemBehavior::new).build();
|
||||
this.wirelessTerminal = powerTools.item("wireless_terminal", WirelessTerminalItem::new).props(chargedDefaults)
|
||||
.addFeatures(AEFeature.WIRELESS_ACCESS_TERMINAL).build();
|
||||
this.chargedStaff = powerTools.item("charged_staff", ToolChargedStaff::new).props(chargedDefaults)
|
||||
this.chargedStaff = powerTools.item("charged_staff", ChargedStaffItem::new).props(chargedDefaults)
|
||||
.addFeatures(AEFeature.CHARGED_STAFF).build();
|
||||
this.massCannon = powerTools.item("matter_cannon", ToolMatterCannon::new).props(chargedDefaults)
|
||||
.addFeatures(AEFeature.MATTER_CANNON).dispenserBehavior(DispenserMatterCannon::new).build();
|
||||
this.portableCell = powerTools.item("portable_cell", ToolPortableCell::new).props(chargedDefaults)
|
||||
this.massCannon = powerTools.item("matter_cannon", MatterCannonItem::new).props(chargedDefaults)
|
||||
.addFeatures(AEFeature.MATTER_CANNON).dispenserBehavior(MatterCannonDispenseItemBehavior::new).build();
|
||||
this.portableCell = powerTools.item("portable_cell", PortableCellItem::new).props(chargedDefaults)
|
||||
.addFeatures(AEFeature.PORTABLE_CELL, AEFeature.STORAGE_CELLS).build();
|
||||
this.colorApplicator = powerTools.item("color_applicator", ToolColorApplicator::new).props(chargedDefaults)
|
||||
.addFeatures(AEFeature.COLOR_APPLICATOR).dispenserBehavior(DispenserBlockTool::new)
|
||||
.rendering(new ToolColorApplicatorRendering()).build();
|
||||
this.colorApplicator = powerTools.item("color_applicator", ColorApplicatorItem::new).props(chargedDefaults)
|
||||
.addFeatures(AEFeature.COLOR_APPLICATOR).dispenserBehavior(BlockToolDispenseItemBehavior::new)
|
||||
.rendering(new ColorApplicatorItemRendering()).build();
|
||||
|
||||
this.biometricCard = registry.item("biometric_card", ToolBiometricCard::new)
|
||||
this.biometricCard = registry.item("biometric_card", BiometricCardItem::new)
|
||||
.props(props -> props.maxStackSize(1)).features(AEFeature.SECURITY).build();
|
||||
this.memoryCard = registry.item("memory_card", ToolMemoryCard::new).props(props -> props.maxStackSize(1))
|
||||
this.memoryCard = registry.item("memory_card", MemoryCardItem::new).props(props -> props.maxStackSize(1))
|
||||
.features(AEFeature.MEMORY_CARD).build();
|
||||
this.networkTool = registry.item("network_tool", ToolNetworkTool::new)
|
||||
this.networkTool = registry.item("network_tool", NetworkToolItem::new)
|
||||
.props(props -> props.maxStackSize(1).addToolType(ToolType.get("wrench"), 0))
|
||||
.features(AEFeature.NETWORK_TOOL).build();
|
||||
|
||||
this.cellCreative = registry.item("creative_storage_cell", ItemCreativeStorageCell::new)
|
||||
this.cellCreative = registry.item("creative_storage_cell", CreativeStorageCellItem::new)
|
||||
.props(props -> props.maxStackSize(1)).features(AEFeature.STORAGE_CELLS, AEFeature.CREATIVE).build();
|
||||
this.viewCell = registry.item("view_cell", ItemViewCell::new).props(props -> props.maxStackSize(1))
|
||||
this.viewCell = registry.item("view_cell", ViewCellItem::new).props(props -> props.maxStackSize(1))
|
||||
.features(AEFeature.VIEW_CELL).build();
|
||||
|
||||
Consumer<Item.Properties> storageCellProps = p -> p.maxStackSize(1);
|
||||
@@ -226,19 +226,19 @@ public final class ApiItems implements IItems {
|
||||
FeatureFactory storageCells = registry.features(AEFeature.STORAGE_CELLS);
|
||||
this.cell1k = storageCells
|
||||
.item("1k_storage_cell",
|
||||
props -> new BasicItemStorageCell(props, MaterialType.ITEM_1K_CELL_COMPONENT, 1))
|
||||
props -> new BasicStorageCellItem(props, MaterialType.ITEM_1K_CELL_COMPONENT, 1))
|
||||
.props(storageCellProps).build();
|
||||
this.cell4k = storageCells
|
||||
.item("4k_storage_cell",
|
||||
props -> new BasicItemStorageCell(props, MaterialType.ITEM_4K_CELL_COMPONENT, 4))
|
||||
props -> new BasicStorageCellItem(props, MaterialType.ITEM_4K_CELL_COMPONENT, 4))
|
||||
.props(storageCellProps).build();
|
||||
this.cell16k = storageCells
|
||||
.item("16k_storage_cell",
|
||||
props -> new BasicItemStorageCell(props, MaterialType.ITEM_16K_CELL_COMPONENT, 16))
|
||||
props -> new BasicStorageCellItem(props, MaterialType.ITEM_16K_CELL_COMPONENT, 16))
|
||||
.props(storageCellProps).build();
|
||||
this.cell64k = storageCells
|
||||
.item("64k_storage_cell",
|
||||
props -> new BasicItemStorageCell(props, MaterialType.ITEM_64K_CELL_COMPONENT, 64))
|
||||
props -> new BasicStorageCellItem(props, MaterialType.ITEM_64K_CELL_COMPONENT, 64))
|
||||
.props(storageCellProps).build();
|
||||
|
||||
this.fluidCell1k = storageCells
|
||||
@@ -260,47 +260,47 @@ public final class ApiItems implements IItems {
|
||||
|
||||
FeatureFactory spatialCells = registry.features(AEFeature.SPATIAL_IO);
|
||||
this.spatialCell2 = spatialCells
|
||||
.item("2_cubed_spatial_storage_cell", props -> new ItemSpatialStorageCell(props, 2))
|
||||
.item("2_cubed_spatial_storage_cell", props -> new SpatialStorageCellItem(props, 2))
|
||||
.props(storageCellProps).build();
|
||||
this.spatialCell16 = spatialCells
|
||||
.item("16_cubed_spatial_storage_cell", props -> new ItemSpatialStorageCell(props, 16))
|
||||
.item("16_cubed_spatial_storage_cell", props -> new SpatialStorageCellItem(props, 16))
|
||||
.props(storageCellProps).build();
|
||||
this.spatialCell128 = spatialCells
|
||||
.item("128_cubed_spatial_storage_cell", props -> new ItemSpatialStorageCell(props, 128))
|
||||
.item("128_cubed_spatial_storage_cell", props -> new SpatialStorageCellItem(props, 128))
|
||||
.props(storageCellProps).build();
|
||||
|
||||
this.facade = registry.item("facade", ItemFacade::new).features(AEFeature.FACADES).build();
|
||||
this.facade = registry.item("facade", FacadeItem::new).features(AEFeature.FACADES).build();
|
||||
|
||||
this.certusCrystalSeed = registry
|
||||
.item("certus_crystal_seed",
|
||||
props -> new ItemCrystalSeed(props, materials.purifiedCertusQuartzCrystal().item()))
|
||||
props -> new CrystalSeedItem(props, materials.purifiedCertusQuartzCrystal().item()))
|
||||
.features(AEFeature.CRYSTAL_SEEDS).build();
|
||||
this.fluixCrystalSeed = registry
|
||||
.item("fluix_crystal_seed",
|
||||
props -> new ItemCrystalSeed(props, materials.purifiedFluixCrystal().item()))
|
||||
props -> new CrystalSeedItem(props, materials.purifiedFluixCrystal().item()))
|
||||
.features(AEFeature.CRYSTAL_SEEDS).build();
|
||||
this.netherQuartzSeed = registry
|
||||
.item("nether_quartz_seed",
|
||||
props -> new ItemCrystalSeed(props, materials.purifiedNetherQuartzCrystal().item()))
|
||||
props -> new CrystalSeedItem(props, materials.purifiedNetherQuartzCrystal().item()))
|
||||
.features(AEFeature.CRYSTAL_SEEDS).build();
|
||||
|
||||
EntityGrowingCrystal.TYPE = registry
|
||||
.<EntityGrowingCrystal>entity("growing_crystal", EntityGrowingCrystal::new, EntityClassification.MISC)
|
||||
GrowingCrystalEntity.TYPE = registry
|
||||
.<GrowingCrystalEntity>entity("growing_crystal", GrowingCrystalEntity::new, EntityClassification.MISC)
|
||||
.customize(builder -> builder.size(0.25F, 0.25F)).build();
|
||||
|
||||
// rv1
|
||||
this.encodedPattern = registry.item("encoded_pattern", ItemEncodedPattern::new)
|
||||
this.encodedPattern = registry.item("encoded_pattern", EncodedPatternItem::new)
|
||||
.props(props -> props.maxStackSize(1)).features(AEFeature.PATTERNS).build();
|
||||
|
||||
this.coloredPaintBall = createPaintBalls(registry, "_paint_ball", false);
|
||||
this.coloredLumenPaintBall = createPaintBalls(registry, "_lumen_paint_ball", true);
|
||||
|
||||
FeatureFactory debugTools = registry.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE);
|
||||
this.toolEraser = debugTools.item("debug_eraser", ToolEraser::new).build();
|
||||
this.toolMeteoritePlacer = debugTools.item("debug_meteorite_placer", ToolMeteoritePlacer::new).build();
|
||||
this.toolDebugCard = debugTools.item("debug_card", ToolDebugCard::new).build();
|
||||
this.toolReplicatorCard = debugTools.item("debug_replicator_card", ToolReplicatorCard::new).build();
|
||||
debugTools.item("debug_part_placer", ToolDebugPartPlacer::new).build();
|
||||
this.toolEraser = debugTools.item("debug_eraser", EraserItem::new).build();
|
||||
this.toolMeteoritePlacer = debugTools.item("debug_meteorite_placer", MeteoritePlacerItem::new).build();
|
||||
this.toolDebugCard = debugTools.item("debug_card", DebugCardItem::new).build();
|
||||
this.toolReplicatorCard = debugTools.item("debug_replicator_card", ReplicatorCardItem::new).build();
|
||||
debugTools.item("debug_part_placer", DebugPartPlacerItem::new).build();
|
||||
|
||||
this.dummyFluidItem = registry.item("dummy_fluid_item", FluidDummyItem::new)
|
||||
.rendering(new FluidDummyItemRendering()).build();
|
||||
@@ -314,8 +314,8 @@ public final class ApiItems implements IItems {
|
||||
}
|
||||
|
||||
String id = color.registryPrefix + idSuffix;
|
||||
IItemDefinition paintBall = registry.item(id, props -> new ItemPaintBall(props, color, lumen))
|
||||
.features(AEFeature.PAINT_BALLS).rendering(new ItemPaintBallRendering(color, lumen)).build();
|
||||
IItemDefinition paintBall = registry.item(id, props -> new PaintBallItem(props, color, lumen))
|
||||
.features(AEFeature.PAINT_BALLS).rendering(new PaintBallItemRendering(color, lumen)).build();
|
||||
colors.add(color, new ItemStackSrc(paintBall.item(), ActivityState.Enabled));
|
||||
}
|
||||
return colors;
|
||||
|
||||
@@ -28,9 +28,9 @@ import appeng.api.features.AEFeature;
|
||||
import appeng.bootstrap.FeatureFactory;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.features.MaterialStackSrc;
|
||||
import appeng.entity.EntityChargedQuartz;
|
||||
import appeng.entity.EntitySingularity;
|
||||
import appeng.items.materials.ItemMaterial;
|
||||
import appeng.entity.ChargedQuartzEntity;
|
||||
import appeng.entity.SingularityEntity;
|
||||
import appeng.items.materials.MaterialItem;
|
||||
import appeng.items.materials.MaterialType;
|
||||
|
||||
/**
|
||||
@@ -118,14 +118,14 @@ public final class ApiMaterials implements IMaterials {
|
||||
public ApiMaterials(FeatureFactory registry) {
|
||||
this.registry = registry;
|
||||
|
||||
EntitySingularity.TYPE = registry
|
||||
.<EntitySingularity>entity("singularity", EntitySingularity::new, EntityClassification.MISC)
|
||||
SingularityEntity.TYPE = registry
|
||||
.<SingularityEntity>entity("singularity", SingularityEntity::new, EntityClassification.MISC)
|
||||
.customize(builder -> builder.size(0.2f, 0.2f).setTrackingRange(16).setUpdateInterval(4)
|
||||
.setShouldReceiveVelocityUpdates(true))
|
||||
.build();
|
||||
|
||||
EntityChargedQuartz.TYPE = registry
|
||||
.<EntityChargedQuartz>entity("charged_quartz", EntityChargedQuartz::new, EntityClassification.MISC)
|
||||
ChargedQuartzEntity.TYPE = registry
|
||||
.<ChargedQuartzEntity>entity("charged_quartz", ChargedQuartzEntity::new, EntityClassification.MISC)
|
||||
.customize(builder -> builder.size(0.2f, 0.2f).setTrackingRange(16).setUpdateInterval(4)
|
||||
.setShouldReceiveVelocityUpdates(true))
|
||||
.build();
|
||||
@@ -192,7 +192,7 @@ public final class ApiMaterials implements IMaterials {
|
||||
private IItemDefinition createMaterial(final MaterialType mat) {
|
||||
Preconditions.checkState(!mat.isRegistered(), "Cannot create the same material twice.");
|
||||
|
||||
IItemDefinition def = registry.item(mat.getId(), props -> new ItemMaterial(props, mat))
|
||||
IItemDefinition def = registry.item(mat.getId(), props -> new MaterialItem(props, mat))
|
||||
.features(mat.getFeature().toArray(new AEFeature[0])).build();
|
||||
|
||||
boolean enabled = true;
|
||||
|
||||
@@ -35,50 +35,50 @@ import appeng.core.features.ActivityState;
|
||||
import appeng.core.features.ColoredItemDefinition;
|
||||
import appeng.core.features.ItemStackSrc;
|
||||
import appeng.core.features.registries.PartModels;
|
||||
import appeng.fluids.parts.PartFluidAnnihilationPlane;
|
||||
import appeng.fluids.parts.PartFluidExportBus;
|
||||
import appeng.fluids.parts.PartFluidFormationPlane;
|
||||
import appeng.fluids.parts.PartFluidImportBus;
|
||||
import appeng.fluids.parts.PartFluidInterface;
|
||||
import appeng.fluids.parts.PartFluidLevelEmitter;
|
||||
import appeng.fluids.parts.PartFluidStorageBus;
|
||||
import appeng.fluids.parts.PartFluidTerminal;
|
||||
import appeng.fluids.parts.FluidAnnihilationPlanePart;
|
||||
import appeng.fluids.parts.FluidExportBusPart;
|
||||
import appeng.fluids.parts.FluidFormationPlanePart;
|
||||
import appeng.fluids.parts.FluidImportBusPart;
|
||||
import appeng.fluids.parts.FluidInterfacePart;
|
||||
import appeng.fluids.parts.FluidLevelEmitterPart;
|
||||
import appeng.fluids.parts.FluidStorageBusPart;
|
||||
import appeng.fluids.parts.FluidTerminalPart;
|
||||
import appeng.items.parts.ColoredPartItem;
|
||||
import appeng.items.parts.ItemPart;
|
||||
import appeng.items.parts.ItemPartRendering;
|
||||
import appeng.items.parts.PartItem;
|
||||
import appeng.items.parts.PartItemRendering;
|
||||
import appeng.items.parts.PartType;
|
||||
import appeng.parts.automation.PartAnnihilationPlane;
|
||||
import appeng.parts.automation.PartExportBus;
|
||||
import appeng.parts.automation.PartFormationPlane;
|
||||
import appeng.parts.automation.PartIdentityAnnihilationPlane;
|
||||
import appeng.parts.automation.PartImportBus;
|
||||
import appeng.parts.automation.PartLevelEmitter;
|
||||
import appeng.parts.misc.PartCableAnchor;
|
||||
import appeng.parts.misc.PartInterface;
|
||||
import appeng.parts.misc.PartInvertedToggleBus;
|
||||
import appeng.parts.misc.PartStorageBus;
|
||||
import appeng.parts.misc.PartToggleBus;
|
||||
import appeng.parts.networking.PartCableCovered;
|
||||
import appeng.parts.networking.PartCableGlass;
|
||||
import appeng.parts.networking.PartCableSmart;
|
||||
import appeng.parts.networking.PartDenseCableCovered;
|
||||
import appeng.parts.networking.PartDenseCableSmart;
|
||||
import appeng.parts.networking.PartQuartzFiber;
|
||||
import appeng.parts.p2p.PartP2PFEPower;
|
||||
import appeng.parts.p2p.PartP2PFluids;
|
||||
import appeng.parts.p2p.PartP2PItems;
|
||||
import appeng.parts.p2p.PartP2PLight;
|
||||
import appeng.parts.p2p.PartP2PRedstone;
|
||||
import appeng.parts.p2p.PartP2PTunnelME;
|
||||
import appeng.parts.reporting.PartConversionMonitor;
|
||||
import appeng.parts.reporting.PartCraftingTerminal;
|
||||
import appeng.parts.reporting.PartDarkPanel;
|
||||
import appeng.parts.reporting.PartInterfaceTerminal;
|
||||
import appeng.parts.reporting.PartPanel;
|
||||
import appeng.parts.reporting.PartPatternTerminal;
|
||||
import appeng.parts.reporting.PartSemiDarkPanel;
|
||||
import appeng.parts.reporting.PartStorageMonitor;
|
||||
import appeng.parts.reporting.PartTerminal;
|
||||
import appeng.parts.automation.AnnihilationPlanePart;
|
||||
import appeng.parts.automation.ExportBusPart;
|
||||
import appeng.parts.automation.FormationPlanePart;
|
||||
import appeng.parts.automation.IdentityAnnihilationPlanePart;
|
||||
import appeng.parts.automation.ImportBusPart;
|
||||
import appeng.parts.automation.LevelEmitterPart;
|
||||
import appeng.parts.misc.CableAnchorPart;
|
||||
import appeng.parts.misc.InterfacePart;
|
||||
import appeng.parts.misc.InvertedToggleBusPart;
|
||||
import appeng.parts.misc.StorageBusPart;
|
||||
import appeng.parts.misc.ToggleBusPart;
|
||||
import appeng.parts.networking.CoveredCablePart;
|
||||
import appeng.parts.networking.GlassCablePart;
|
||||
import appeng.parts.networking.SmartCablePart;
|
||||
import appeng.parts.networking.CoveredDenseCablePart;
|
||||
import appeng.parts.networking.SmartDenseCablePart;
|
||||
import appeng.parts.networking.QuartzFiberPart;
|
||||
import appeng.parts.p2p.FEP2PTunnelPart;
|
||||
import appeng.parts.p2p.FluidP2PTunnelPart;
|
||||
import appeng.parts.p2p.ItemP2PTunnelPart;
|
||||
import appeng.parts.p2p.LightP2PTunnelPart;
|
||||
import appeng.parts.p2p.RedstoneP2PTunnelPart;
|
||||
import appeng.parts.p2p.MEP2PTunnelPart;
|
||||
import appeng.parts.reporting.ConversionMonitorPart;
|
||||
import appeng.parts.reporting.CraftingTerminalPart;
|
||||
import appeng.parts.reporting.DarkPanelPart;
|
||||
import appeng.parts.reporting.InterfaceTerminalPart;
|
||||
import appeng.parts.reporting.PanelPart;
|
||||
import appeng.parts.reporting.PatternTerminalPart;
|
||||
import appeng.parts.reporting.SemiDarkPanelPart;
|
||||
import appeng.parts.reporting.StorageMonitorPart;
|
||||
import appeng.parts.reporting.TerminalPart;
|
||||
|
||||
/**
|
||||
* Internal implementation for the API parts
|
||||
@@ -130,70 +130,70 @@ public final class ApiParts implements IParts {
|
||||
registerPartModels(partModels);
|
||||
|
||||
this.cableSmart = constructColoredDefinition(registry, "smart_cable", PartType.CABLE_SMART,
|
||||
PartCableSmart::new);
|
||||
SmartCablePart::new);
|
||||
this.cableCovered = constructColoredDefinition(registry, "covered_cable", PartType.CABLE_COVERED,
|
||||
PartCableCovered::new);
|
||||
CoveredCablePart::new);
|
||||
this.cableGlass = constructColoredDefinition(registry, "glass_cable", PartType.CABLE_GLASS,
|
||||
PartCableGlass::new);
|
||||
GlassCablePart::new);
|
||||
this.cableDenseCovered = constructColoredDefinition(registry, "covered_dense_cable",
|
||||
PartType.CABLE_DENSE_COVERED, PartDenseCableCovered::new);
|
||||
PartType.CABLE_DENSE_COVERED, CoveredDenseCablePart::new);
|
||||
this.cableDenseSmart = constructColoredDefinition(registry, "smart_dense_cable", PartType.CABLE_DENSE_SMART,
|
||||
PartDenseCableSmart::new);
|
||||
this.quartzFiber = createPart(registry, "quartz_fiber", PartType.QUARTZ_FIBER, PartQuartzFiber::new);
|
||||
this.toggleBus = createPart(registry, "toggle_bus", PartType.TOGGLE_BUS, PartToggleBus::new);
|
||||
SmartDenseCablePart::new);
|
||||
this.quartzFiber = createPart(registry, "quartz_fiber", PartType.QUARTZ_FIBER, QuartzFiberPart::new);
|
||||
this.toggleBus = createPart(registry, "toggle_bus", PartType.TOGGLE_BUS, ToggleBusPart::new);
|
||||
this.invertedToggleBus = createPart(registry, "inverted_toggle_bus", PartType.INVERTED_TOGGLE_BUS,
|
||||
PartInvertedToggleBus::new);
|
||||
this.cableAnchor = createPart(registry, "cable_anchor", PartType.CABLE_ANCHOR, PartCableAnchor::new);
|
||||
this.monitor = createPart(registry, "monitor", PartType.MONITOR, PartPanel::new);
|
||||
InvertedToggleBusPart::new);
|
||||
this.cableAnchor = createPart(registry, "cable_anchor", PartType.CABLE_ANCHOR, CableAnchorPart::new);
|
||||
this.monitor = createPart(registry, "monitor", PartType.MONITOR, PanelPart::new);
|
||||
this.semiDarkMonitor = createPart(registry, "semi_dark_monitor", PartType.SEMI_DARK_MONITOR,
|
||||
PartSemiDarkPanel::new);
|
||||
this.darkMonitor = createPart(registry, "dark_monitor", PartType.DARK_MONITOR, PartDarkPanel::new);
|
||||
this.storageBus = createPart(registry, "storage_bus", PartType.STORAGE_BUS, PartStorageBus::new);
|
||||
SemiDarkPanelPart::new);
|
||||
this.darkMonitor = createPart(registry, "dark_monitor", PartType.DARK_MONITOR, DarkPanelPart::new);
|
||||
this.storageBus = createPart(registry, "storage_bus", PartType.STORAGE_BUS, StorageBusPart::new);
|
||||
this.fluidStorageBus = createPart(registry, "fluid_storage_bus", PartType.FLUID_STORAGE_BUS,
|
||||
PartFluidStorageBus::new);
|
||||
this.importBus = createPart(registry, "import_bus", PartType.IMPORT_BUS, PartImportBus::new);
|
||||
FluidStorageBusPart::new);
|
||||
this.importBus = createPart(registry, "import_bus", PartType.IMPORT_BUS, ImportBusPart::new);
|
||||
this.fluidImportBus = createPart(registry, "fluid_import_bus", PartType.FLUID_IMPORT_BUS,
|
||||
PartFluidImportBus::new);
|
||||
this.exportBus = createPart(registry, "export_bus", PartType.EXPORT_BUS, PartExportBus::new);
|
||||
FluidImportBusPart::new);
|
||||
this.exportBus = createPart(registry, "export_bus", PartType.EXPORT_BUS, ExportBusPart::new);
|
||||
this.fluidExportBus = createPart(registry, "fluid_export_bus", PartType.FLUID_EXPORT_BUS,
|
||||
PartFluidExportBus::new);
|
||||
this.levelEmitter = createPart(registry, "level_emitter", PartType.LEVEL_EMITTER, PartLevelEmitter::new);
|
||||
FluidExportBusPart::new);
|
||||
this.levelEmitter = createPart(registry, "level_emitter", PartType.LEVEL_EMITTER, LevelEmitterPart::new);
|
||||
this.fluidLevelEmitter = createPart(registry, "fluid_level_emitter", PartType.FLUID_LEVEL_EMITTER,
|
||||
PartFluidLevelEmitter::new);
|
||||
FluidLevelEmitterPart::new);
|
||||
this.annihilationPlane = createPart(registry, "annihilation_plane", PartType.ANNIHILATION_PLANE,
|
||||
PartAnnihilationPlane::new);
|
||||
AnnihilationPlanePart::new);
|
||||
this.identityAnnihilationPlane = createPart(registry, "identity_annihilation_plane",
|
||||
PartType.IDENTITY_ANNIHILATION_PLANE, PartIdentityAnnihilationPlane::new);
|
||||
PartType.IDENTITY_ANNIHILATION_PLANE, IdentityAnnihilationPlanePart::new);
|
||||
this.fluidAnnihilationPlane = createPart(registry, "fluid_annihilation_plane",
|
||||
PartType.FLUID_ANNIHILATION_PLANE, PartFluidAnnihilationPlane::new);
|
||||
PartType.FLUID_ANNIHILATION_PLANE, FluidAnnihilationPlanePart::new);
|
||||
this.formationPlane = createPart(registry, "formation_plane", PartType.FORMATION_PLANE,
|
||||
PartFormationPlane::new);
|
||||
FormationPlanePart::new);
|
||||
this.fluidFormationPlane = createPart(registry, "fluid_formation_plane", PartType.FLUID_FORMATION_PLANE,
|
||||
PartFluidFormationPlane::new);
|
||||
FluidFormationPlanePart::new);
|
||||
this.patternTerminal = createPart(registry, "pattern_terminal", PartType.PATTERN_TERMINAL,
|
||||
PartPatternTerminal::new);
|
||||
PatternTerminalPart::new);
|
||||
this.craftingTerminal = createPart(registry, "crafting_terminal", PartType.CRAFTING_TERMINAL,
|
||||
PartCraftingTerminal::new);
|
||||
this.terminal = createPart(registry, "terminal", PartType.TERMINAL, PartTerminal::new);
|
||||
CraftingTerminalPart::new);
|
||||
this.terminal = createPart(registry, "terminal", PartType.TERMINAL, TerminalPart::new);
|
||||
this.storageMonitor = createPart(registry, "storage_monitor", PartType.STORAGE_MONITOR,
|
||||
PartStorageMonitor::new);
|
||||
StorageMonitorPart::new);
|
||||
this.conversionMonitor = createPart(registry, "conversion_monitor", PartType.CONVERSION_MONITOR,
|
||||
PartConversionMonitor::new);
|
||||
this.iface = createPart(registry, "cable_interface", PartType.INTERFACE, PartInterface::new);
|
||||
ConversionMonitorPart::new);
|
||||
this.iface = createPart(registry, "cable_interface", PartType.INTERFACE, InterfacePart::new);
|
||||
this.fluidIface = createPart(registry, "cable_fluid_interface", PartType.FLUID_INTERFACE,
|
||||
PartFluidInterface::new);
|
||||
this.p2PTunnelME = createPart(registry, "me_p2p_tunnel", PartType.P2P_TUNNEL_ME, PartP2PTunnelME::new);
|
||||
FluidInterfacePart::new);
|
||||
this.p2PTunnelME = createPart(registry, "me_p2p_tunnel", PartType.P2P_TUNNEL_ME, MEP2PTunnelPart::new);
|
||||
this.p2PTunnelRedstone = createPart(registry, "redstone_p2p_tunnel", PartType.P2P_TUNNEL_REDSTONE,
|
||||
PartP2PRedstone::new);
|
||||
this.p2PTunnelItems = createPart(registry, "item_p2p_tunnel", PartType.P2P_TUNNEL_ITEM, PartP2PItems::new);
|
||||
this.p2PTunnelFluids = createPart(registry, "fluid_p2p_tunnel", PartType.P2P_TUNNEL_FLUID, PartP2PFluids::new);
|
||||
RedstoneP2PTunnelPart::new);
|
||||
this.p2PTunnelItems = createPart(registry, "item_p2p_tunnel", PartType.P2P_TUNNEL_ITEM, ItemP2PTunnelPart::new);
|
||||
this.p2PTunnelFluids = createPart(registry, "fluid_p2p_tunnel", PartType.P2P_TUNNEL_FLUID, FluidP2PTunnelPart::new);
|
||||
this.p2PTunnelEU = null; // FIXME createPart( "ic2_p2p_tunnel", PartType.P2P_TUNNEL_IC2,
|
||||
// PartP2PIC2Power::new);
|
||||
this.p2PTunnelFE = createPart(registry, "fe_p2p_tunnel", PartType.P2P_TUNNEL_FE, PartP2PFEPower::new);
|
||||
this.p2PTunnelLight = createPart(registry, "light_p2p_tunnel", PartType.P2P_TUNNEL_LIGHT, PartP2PLight::new);
|
||||
this.p2PTunnelFE = createPart(registry, "fe_p2p_tunnel", PartType.P2P_TUNNEL_FE, FEP2PTunnelPart::new);
|
||||
this.p2PTunnelLight = createPart(registry, "light_p2p_tunnel", PartType.P2P_TUNNEL_LIGHT, LightP2PTunnelPart::new);
|
||||
this.interfaceTerminal = createPart(registry, "interface_terminal", PartType.INTERFACE_TERMINAL,
|
||||
PartInterfaceTerminal::new);
|
||||
this.fluidTerminal = createPart(registry, "fluid_terminal", PartType.FLUID_TERMINAL, PartFluidTerminal::new);
|
||||
InterfaceTerminalPart::new);
|
||||
this.fluidTerminal = createPart(registry, "fluid_terminal", PartType.FLUID_TERMINAL, FluidTerminalPart::new);
|
||||
}
|
||||
|
||||
private void registerPartModels(PartModels partModels) {
|
||||
@@ -212,8 +212,8 @@ public final class ApiParts implements IParts {
|
||||
|
||||
private <T extends IPart> IItemDefinition createPart(FeatureFactory registry, String id, PartType type,
|
||||
Function<ItemStack, T> factory) {
|
||||
return registry.item(id, props -> new ItemPart<>(props, type, factory)).itemGroup(CreativeTab.INSTANCE)
|
||||
.rendering(new ItemPartRendering()).build();
|
||||
return registry.item(id, props -> new PartItem<>(props, type, factory)).itemGroup(CreativeTab.INSTANCE)
|
||||
.rendering(new PartItemRendering()).build();
|
||||
}
|
||||
|
||||
private <T extends IPart> AEColoredItemDefinition constructColoredDefinition(FeatureFactory registry,
|
||||
@@ -224,7 +224,7 @@ public final class ApiParts implements IParts {
|
||||
String id = color.registryPrefix + '_' + idSuffix;
|
||||
|
||||
IItemDefinition itemDef = registry.item(id, props -> new ColoredPartItem<>(props, type, factory, color))
|
||||
.itemGroup(CreativeTab.INSTANCE).rendering(new ItemPartRendering(color)).build();
|
||||
.itemGroup(CreativeTab.INSTANCE).rendering(new PartItemRendering(color)).build();
|
||||
|
||||
definition.add(color, new ItemStackSrc(itemDef.item(), ActivityState.Enabled));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import appeng.api.features.IWirelessTermHandler;
|
||||
import appeng.api.features.IWirelessTermRegistry;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerWirelessTerm;
|
||||
import appeng.container.implementations.WirelessTermContainer;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
import appeng.util.Platform;
|
||||
|
||||
@@ -96,7 +96,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry {
|
||||
}
|
||||
|
||||
if (handler.hasPower(player, 0.5, item)) {
|
||||
ContainerOpener.openContainer(ContainerWirelessTerm.TYPE, player, ContainerLocator.forHand(player, hand));
|
||||
ContainerOpener.openContainer(WirelessTermContainer.TYPE, player, ContainerLocator.forHand(player, hand));
|
||||
} else {
|
||||
player.sendMessage(PlayerMessages.DeviceNotPowered.get());
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerMEMonitorable;
|
||||
import appeng.container.implementations.MEMonitorableContainer;
|
||||
|
||||
public class BasicItemCellGuiHandler implements ICellGuiHandler {
|
||||
@Override
|
||||
@@ -26,7 +26,7 @@ public class BasicItemCellGuiHandler implements ICellGuiHandler {
|
||||
@Override
|
||||
public void openChestGui(final PlayerEntity player, final IChestOrDrive chest, final ICellHandler cellHandler,
|
||||
final IMEInventoryHandler inv, final ItemStack is, final IStorageChannel chan) {
|
||||
ContainerOpener.openContainer(ContainerMEMonitorable.TYPE, player,
|
||||
ContainerOpener.openContainer(MEMonitorableContainer.TYPE, player,
|
||||
ContainerLocator.forTileEntitySide((TileEntity) chest, chest.getUp()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,21 +26,21 @@ import appeng.api.storage.ICellInventoryHandler;
|
||||
import appeng.api.storage.ISaveProvider;
|
||||
import appeng.api.storage.IStorageChannel;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.items.storage.ItemCreativeStorageCell;
|
||||
import appeng.items.storage.CreativeStorageCellItem;
|
||||
import appeng.me.storage.CreativeCellInventory;
|
||||
|
||||
public final class CreativeCellHandler implements ICellHandler {
|
||||
|
||||
@Override
|
||||
public boolean isCell(final ItemStack is) {
|
||||
return !is.isEmpty() && is.getItem() instanceof ItemCreativeStorageCell;
|
||||
return !is.isEmpty() && is.getItem() instanceof CreativeStorageCellItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICellInventoryHandler getCellInventory(final ItemStack is, final ISaveProvider container,
|
||||
final IStorageChannel channel) {
|
||||
if (channel == AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class) && !is.isEmpty()
|
||||
&& is.getItem() instanceof ItemCreativeStorageCell) {
|
||||
&& is.getItem() instanceof CreativeStorageCellItem) {
|
||||
return CreativeCellInventory.getCell(is);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.util.JSONUtils;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
import appeng.items.parts.ItemPart;
|
||||
import appeng.items.parts.PartItem;
|
||||
import appeng.items.parts.PartType;
|
||||
|
||||
public class PartItemPredicate extends ItemPredicate {
|
||||
@@ -38,8 +38,8 @@ public class PartItemPredicate extends ItemPredicate {
|
||||
|
||||
@Override
|
||||
public boolean test(ItemStack item) {
|
||||
if (item.getItem() instanceof ItemPart) {
|
||||
ItemPart<?> itemPart = (ItemPart<?>) item.getItem();
|
||||
if (item.getItem() instanceof PartItem) {
|
||||
PartItem<?> itemPart = (PartItem<?>) item.getItem();
|
||||
return itemPart.getType() == partType;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -1,105 +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.core.sync;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.core.sync.packets.*;
|
||||
|
||||
public class AppEngPacketHandlerBase {
|
||||
private static final Map<Class<? extends AppEngPacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<>();
|
||||
|
||||
public enum PacketTypes {
|
||||
PACKET_COMPASS_REQUEST(PacketCompassRequest.class, PacketCompassRequest::new),
|
||||
|
||||
PACKET_COMPASS_RESPONSE(PacketCompassResponse.class, PacketCompassResponse::new),
|
||||
|
||||
PACKET_INVENTORY_ACTION(PacketInventoryAction.class, PacketInventoryAction::new),
|
||||
|
||||
PACKET_ME_INVENTORY_UPDATE(PacketMEInventoryUpdate.class, PacketMEInventoryUpdate::new),
|
||||
|
||||
PACKET_ME_FLUID_INVENTORY_UPDATE(PacketMEFluidInventoryUpdate.class, PacketMEFluidInventoryUpdate::new),
|
||||
|
||||
PACKET_CONFIG_BUTTON(PacketConfigButton.class, PacketConfigButton::new),
|
||||
|
||||
PACKET_PART_PLACEMENT(PacketPartPlacement.class, PacketPartPlacement::new),
|
||||
|
||||
PACKET_LIGHTNING(PacketLightning.class, PacketLightning::new),
|
||||
|
||||
PACKET_MATTER_CANNON(PacketMatterCannon.class, PacketMatterCannon::new),
|
||||
|
||||
PACKET_MOCK_EXPLOSION(PacketMockExplosion.class, PacketMockExplosion::new),
|
||||
|
||||
PACKET_VALUE_CONFIG(PacketValueConfig.class, PacketValueConfig::new),
|
||||
|
||||
PACKET_ITEM_TRANSITION_EFFECT(PacketItemTransitionEffect.class, PacketItemTransitionEffect::new),
|
||||
|
||||
PACKET_BLOCK_TRANSITION_EFFECT(PacketBlockTransitionEffect.class, PacketBlockTransitionEffect::new),
|
||||
|
||||
PACKET_PROGRESS_VALUE(PacketProgressBar.class, PacketProgressBar::new),
|
||||
|
||||
PACKET_CLICK(PacketClick.class, PacketClick::new),
|
||||
|
||||
PACKET_SWITCH_GUIS(PacketSwitchGuis.class, PacketSwitchGuis::new),
|
||||
|
||||
PACKET_SWAP_SLOTS(PacketSwapSlots.class, PacketSwapSlots::new),
|
||||
|
||||
PACKET_PATTERN_SLOT(PacketPatternSlot.class, PacketPatternSlot::new),
|
||||
|
||||
PACKET_RECIPE_JEI(PacketJEIRecipe.class, PacketJEIRecipe::new),
|
||||
|
||||
PACKET_TARGET_ITEM(PacketTargetItemStack.class, PacketTargetItemStack::new),
|
||||
|
||||
PACKET_TARGET_FLUID(PacketTargetFluidStack.class, PacketTargetFluidStack::new),
|
||||
|
||||
PACKET_CRAFTING_REQUEST(PacketCraftRequest.class, PacketCraftRequest::new),
|
||||
|
||||
PACKET_ASSEMBLER_ANIMATION(PacketAssemblerAnimation.class, PacketAssemblerAnimation::new),
|
||||
|
||||
PACKET_COMPRESSED_NBT(PacketCompressedNBT.class, PacketCompressedNBT::new),
|
||||
|
||||
PACKET_PAINTED_ENTITY(PacketPaintedEntity.class, PacketPaintedEntity::new),
|
||||
|
||||
PACKET_FLUID_TANK(PacketFluidSlot.class, PacketFluidSlot::new);
|
||||
|
||||
private final Function<PacketBuffer, AppEngPacket> factory;
|
||||
|
||||
PacketTypes(Class<? extends AppEngPacket> packetClass, Function<PacketBuffer, AppEngPacket> factory) {
|
||||
this.factory = factory;
|
||||
|
||||
REVERSE_LOOKUP.put(packetClass, this);
|
||||
}
|
||||
|
||||
public static PacketTypes getPacket(final int id) {
|
||||
return (values())[id];
|
||||
}
|
||||
|
||||
static PacketTypes getID(final Class<? extends AppEngPacket> c) {
|
||||
return REVERSE_LOOKUP.get(c);
|
||||
}
|
||||
|
||||
public AppEngPacket parsePacket(final PacketBuffer in) throws IllegalArgumentException {
|
||||
return this.factory.apply(in);
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -31,7 +31,7 @@ import appeng.core.AELog;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
|
||||
public abstract class AppEngPacket {
|
||||
public abstract class BasePacket {
|
||||
private PacketBuffer p;
|
||||
|
||||
public void serverPacketData(final INetworkInfo manager, final PlayerEntity player) {
|
||||
@@ -40,7 +40,7 @@ public abstract class AppEngPacket {
|
||||
}
|
||||
|
||||
public final int getPacketID() {
|
||||
return AppEngPacketHandlerBase.PacketTypes.getID(this.getClass()).ordinal();
|
||||
return PacketHandlerBase.PacketTypes.getID(this.getClass()).ordinal();
|
||||
}
|
||||
|
||||
public void clientPacketData(final INetworkInfo network, final PlayerEntity player) {
|
||||
@@ -1,31 +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.core.sync;
|
||||
|
||||
public enum GuiHostType {
|
||||
ITEM_OR_WORLD, ITEM, WORLD;
|
||||
|
||||
public boolean isItem() {
|
||||
return this != WORLD;
|
||||
}
|
||||
|
||||
boolean isTile() {
|
||||
return this != ITEM;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* 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.core.sync;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
import appeng.core.sync.packets.*;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
public class PacketHandlerBase {
|
||||
private static final Map<Class<? extends BasePacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<>();
|
||||
|
||||
public enum PacketTypes {
|
||||
PACKET_COMPASS_REQUEST(CompassRequestPacket.class, CompassRequestPacket::new),
|
||||
|
||||
PACKET_COMPASS_RESPONSE(CompassResponsePacket.class, CompassResponsePacket::new),
|
||||
|
||||
PACKET_INVENTORY_ACTION(InventoryActionPacket.class, InventoryActionPacket::new),
|
||||
|
||||
PACKET_ME_INVENTORY_UPDATE(MEInventoryUpdatePacket.class, MEInventoryUpdatePacket::new),
|
||||
|
||||
PACKET_ME_FLUID_INVENTORY_UPDATE(MEFluidInventoryUpdatePacket.class, MEFluidInventoryUpdatePacket::new),
|
||||
|
||||
PACKET_CONFIG_BUTTON(ConfigButtonPacket.class, ConfigButtonPacket::new),
|
||||
|
||||
PACKET_PART_PLACEMENT(PartPlacementPacket.class, PartPlacementPacket::new),
|
||||
|
||||
PACKET_LIGHTNING(LightningPacket.class, LightningPacket::new),
|
||||
|
||||
PACKET_MATTER_CANNON(MatterCannonPacket.class, MatterCannonPacket::new),
|
||||
|
||||
PACKET_MOCK_EXPLOSION(MockExplosionPacket.class, MockExplosionPacket::new),
|
||||
|
||||
PACKET_VALUE_CONFIG(ConfigValuePacket.class, ConfigValuePacket::new),
|
||||
|
||||
PACKET_ITEM_TRANSITION_EFFECT(ItemTransitionEffectPacket.class, ItemTransitionEffectPacket::new),
|
||||
|
||||
PACKET_BLOCK_TRANSITION_EFFECT(BlockTransitionEffectPacket.class, BlockTransitionEffectPacket::new),
|
||||
|
||||
PACKET_PROGRESS_VALUE(ProgressBarPacket.class, ProgressBarPacket::new),
|
||||
|
||||
PACKET_CLICK(ClickPacket.class, ClickPacket::new),
|
||||
|
||||
PACKET_SWITCH_GUIS(SwitchGuisPacket.class, SwitchGuisPacket::new),
|
||||
|
||||
PACKET_SWAP_SLOTS(SwapSlotsPacket.class, SwapSlotsPacket::new),
|
||||
|
||||
PACKET_PATTERN_SLOT(PatternSlotPacket.class, PatternSlotPacket::new),
|
||||
|
||||
PACKET_RECIPE_JEI(JEIRecipePacket.class, JEIRecipePacket::new),
|
||||
|
||||
PACKET_TARGET_ITEM(TargetItemStackPacket.class, TargetItemStackPacket::new),
|
||||
|
||||
PACKET_TARGET_FLUID(TargetFluidStackPacket.class, TargetFluidStackPacket::new),
|
||||
|
||||
PACKET_CRAFTING_REQUEST(CraftRequestPacket.class, CraftRequestPacket::new),
|
||||
|
||||
PACKET_ASSEMBLER_ANIMATION(AssemblerAnimationPacket.class, AssemblerAnimationPacket::new),
|
||||
|
||||
PACKET_COMPRESSED_NBT(CompressedNBTPacket.class, CompressedNBTPacket::new),
|
||||
|
||||
PACKET_PAINTED_ENTITY(PaintedEntityPacket.class, PaintedEntityPacket::new),
|
||||
|
||||
PACKET_FLUID_TANK(FluidSlotPacket.class, FluidSlotPacket::new);
|
||||
|
||||
private final Function<PacketBuffer, BasePacket> factory;
|
||||
|
||||
PacketTypes(Class<? extends BasePacket> packetClass, Function<PacketBuffer, BasePacket> factory) {
|
||||
this.factory = factory;
|
||||
|
||||
REVERSE_LOOKUP.put(packetClass, this);
|
||||
}
|
||||
|
||||
public static PacketTypes getPacket(final int id) {
|
||||
return (values())[id];
|
||||
}
|
||||
|
||||
static PacketTypes getID(final Class<? extends BasePacket> c) {
|
||||
return REVERSE_LOOKUP.get(c);
|
||||
}
|
||||
|
||||
public BasePacket parsePacket(final PacketBuffer in) throws IllegalArgumentException {
|
||||
return this.factory.apply(in);
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -24,17 +24,17 @@ import net.minecraft.network.INetHandler;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.AppEngPacketHandlerBase;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.PacketHandlerBase;
|
||||
|
||||
public class AppEngClientPacketHandler extends AppEngPacketHandlerBase implements IPacketHandler {
|
||||
public class ClientPacketHandler extends PacketHandlerBase implements IPacketHandler {
|
||||
|
||||
@Override
|
||||
public void onPacketData(final INetworkInfo manager, final INetHandler handler, final PacketBuffer packet,
|
||||
final PlayerEntity player) {
|
||||
try {
|
||||
final int packetType = packet.readInt();
|
||||
final AppEngPacket pack = PacketTypes.getPacket(packetType).parsePacket(packet);
|
||||
final BasePacket pack = PacketTypes.getPacket(packetType).parsePacket(packet);
|
||||
pack.clientPacketData(manager, Minecraft.getInstance().player);
|
||||
} catch (final IllegalArgumentException e) {
|
||||
AELog.debug(e);
|
||||
@@ -36,7 +36,7 @@ import net.minecraftforge.fml.network.NetworkEvent;
|
||||
import net.minecraftforge.fml.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.network.event.EventNetworkChannel;
|
||||
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
|
||||
public class NetworkHandler {
|
||||
private static NetworkHandler instance;
|
||||
@@ -52,7 +52,7 @@ public class NetworkHandler {
|
||||
.eventNetworkChannel();
|
||||
ec.registerObject(this);
|
||||
|
||||
this.clientHandler = DistExecutor.unsafeRunForDist(() -> AppEngClientPacketHandler::new, () -> () -> null);
|
||||
this.clientHandler = DistExecutor.unsafeRunForDist(() -> ClientPacketHandler::new, () -> () -> null);
|
||||
this.serverHandler = this.createServerSide();
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class NetworkHandler {
|
||||
|
||||
private IPacketHandler createServerSide() {
|
||||
try {
|
||||
return new AppEngServerPacketHandler();
|
||||
return new ServerPacketHandler();
|
||||
} catch (final Throwable t) {
|
||||
return null;
|
||||
}
|
||||
@@ -109,26 +109,26 @@ public class NetworkHandler {
|
||||
return this.myChannelName;
|
||||
}
|
||||
|
||||
public void sendToAll(final AppEngPacket message) {
|
||||
public void sendToAll(final BasePacket message) {
|
||||
getServer().getPlayerList().sendPacketToAllPlayers(message.toPacket(NetworkDirection.PLAY_TO_CLIENT));
|
||||
}
|
||||
|
||||
public void sendTo(final AppEngPacket message, final ServerPlayerEntity player) {
|
||||
public void sendTo(final BasePacket message, final ServerPlayerEntity player) {
|
||||
player.connection.sendPacket(message.toPacket(NetworkDirection.PLAY_TO_CLIENT));
|
||||
}
|
||||
|
||||
public void sendToAllAround(final AppEngPacket message, final TargetPoint point) {
|
||||
public void sendToAllAround(final BasePacket message, final TargetPoint point) {
|
||||
IPacket<?> pkt = message.toPacket(NetworkDirection.PLAY_TO_CLIENT);
|
||||
getServer().getPlayerList().sendToAllNearExcept(point.excluded, point.x, point.y, point.z, point.r2, point.dim,
|
||||
pkt);
|
||||
}
|
||||
|
||||
public void sendToDimension(final AppEngPacket message, final DimensionType dim) {
|
||||
public void sendToDimension(final BasePacket message, final DimensionType dim) {
|
||||
getServer().getPlayerList().sendPacketToAllPlayersInDimension(message.toPacket(NetworkDirection.PLAY_TO_CLIENT),
|
||||
dim);
|
||||
}
|
||||
|
||||
public void sendToServer(final AppEngPacket message) {
|
||||
public void sendToServer(final BasePacket message) {
|
||||
Minecraft.getInstance().getConnection().sendPacket(message.toPacket(NetworkDirection.PLAY_TO_SERVER));
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -23,17 +23,17 @@ import net.minecraft.network.INetHandler;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.AppEngPacketHandlerBase;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.PacketHandlerBase;
|
||||
|
||||
public final class AppEngServerPacketHandler extends AppEngPacketHandlerBase implements IPacketHandler {
|
||||
public final class ServerPacketHandler extends PacketHandlerBase implements IPacketHandler {
|
||||
|
||||
@Override
|
||||
public void onPacketData(final INetworkInfo manager, final INetHandler handler, final PacketBuffer packet,
|
||||
final PlayerEntity player) {
|
||||
try {
|
||||
final int packetType = packet.readInt();
|
||||
final AppEngPacket pack = PacketTypes.getPacket(packetType).parsePacket(packet);
|
||||
final BasePacket pack = PacketTypes.getPacket(packetType).parsePacket(packet);
|
||||
pack.serverPacketData(manager, player);
|
||||
} catch (final IllegalArgumentException e) {
|
||||
AELog.debug(e);
|
||||
+7
-7
@@ -28,26 +28,26 @@ import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.tile.crafting.AssemblerAnimationStatus;
|
||||
import appeng.tile.crafting.TileMolecularAssembler;
|
||||
import appeng.tile.crafting.MolecularAssemblerTileEntity;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
public class PacketAssemblerAnimation extends AppEngPacket {
|
||||
public class AssemblerAnimationPacket extends BasePacket {
|
||||
|
||||
private final BlockPos pos;
|
||||
public final byte rate;
|
||||
public final IAEItemStack is;
|
||||
|
||||
public PacketAssemblerAnimation(final PacketBuffer stream) {
|
||||
public AssemblerAnimationPacket(final PacketBuffer stream) {
|
||||
this.pos = stream.readBlockPos();
|
||||
this.rate = stream.readByte();
|
||||
this.is = AEItemStack.fromPacket(stream);
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketAssemblerAnimation(final BlockPos pos, final byte rate, final IAEItemStack is) {
|
||||
public AssemblerAnimationPacket(final BlockPos pos, final byte rate, final IAEItemStack is) {
|
||||
|
||||
final PacketBuffer data = new PacketBuffer(Unpooled.buffer());
|
||||
|
||||
@@ -64,8 +64,8 @@ public class PacketAssemblerAnimation extends AppEngPacket {
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void clientPacketData(final INetworkInfo network, final PlayerEntity player) {
|
||||
TileEntity te = player.getEntityWorld().getTileEntity(pos);
|
||||
if (te instanceof TileMolecularAssembler) {
|
||||
TileMolecularAssembler ma = (TileMolecularAssembler) te;
|
||||
if (te instanceof MolecularAssemblerTileEntity) {
|
||||
MolecularAssemblerTileEntity ma = (MolecularAssemblerTileEntity) te;
|
||||
ma.setAnimationStatus(new AssemblerAnimationStatus(rate, is.asItemStackRepresentation()));
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -41,7 +41,7 @@ import appeng.api.util.AEPartLocation;
|
||||
import appeng.client.render.effects.EnergyParticleData;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.util.Platform;
|
||||
|
||||
@@ -49,7 +49,7 @@ import appeng.util.Platform;
|
||||
* Plays the block breaking or fluid pickup sound and a transition particle
|
||||
* effect into the supplied direction. Used primarily by annihilation planes.
|
||||
*/
|
||||
public class PacketBlockTransitionEffect extends AppEngPacket {
|
||||
public class BlockTransitionEffectPacket extends BasePacket {
|
||||
|
||||
private final BlockPos pos;
|
||||
private final BlockState blockState;
|
||||
@@ -60,8 +60,8 @@ public class PacketBlockTransitionEffect extends AppEngPacket {
|
||||
BLOCK, FLUID, NONE
|
||||
}
|
||||
|
||||
public PacketBlockTransitionEffect(BlockPos pos, BlockState blockState, AEPartLocation direction,
|
||||
SoundMode soundMode) {
|
||||
public BlockTransitionEffectPacket(BlockPos pos, BlockState blockState, AEPartLocation direction,
|
||||
SoundMode soundMode) {
|
||||
this.pos = pos;
|
||||
this.blockState = blockState;
|
||||
this.direction = direction;
|
||||
@@ -81,7 +81,7 @@ public class PacketBlockTransitionEffect extends AppEngPacket {
|
||||
this.configureWrite(data);
|
||||
}
|
||||
|
||||
public PacketBlockTransitionEffect(final PacketBuffer stream) {
|
||||
public BlockTransitionEffectPacket(final PacketBuffer stream) {
|
||||
|
||||
this.pos = stream.readBlockPos();
|
||||
int blockStateId = stream.readInt();
|
||||
+19
-19
@@ -36,16 +36,16 @@ import appeng.api.definitions.IComparableDefinition;
|
||||
import appeng.api.definitions.IItems;
|
||||
import appeng.api.implementations.items.IMemoryCard;
|
||||
import appeng.api.implementations.items.MemoryCardMessages;
|
||||
import appeng.block.networking.BlockCableBus;
|
||||
import appeng.block.networking.CableBusBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerNetworkTool;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.container.implementations.NetworkToolContainer;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.items.tools.ToolNetworkTool;
|
||||
import appeng.items.tools.powered.ToolColorApplicator;
|
||||
import appeng.items.tools.NetworkToolItem;
|
||||
import appeng.items.tools.powered.ColorApplicatorItem;
|
||||
|
||||
public class PacketClick extends AppEngPacket {
|
||||
public class ClickPacket extends BasePacket {
|
||||
|
||||
private final int x;
|
||||
private final int y;
|
||||
@@ -57,7 +57,7 @@ public class PacketClick extends AppEngPacket {
|
||||
private Hand hand;
|
||||
private final boolean leftClick;
|
||||
|
||||
public PacketClick(final PacketBuffer stream) {
|
||||
public ClickPacket(final PacketBuffer stream) {
|
||||
this.x = stream.readInt();
|
||||
this.y = stream.readInt();
|
||||
this.z = stream.readInt();
|
||||
@@ -75,23 +75,23 @@ public class PacketClick extends AppEngPacket {
|
||||
}
|
||||
|
||||
// API for when a block was right clicked
|
||||
public PacketClick(ItemUseContext context) {
|
||||
public ClickPacket(ItemUseContext context) {
|
||||
this(context.getPos(), context.getFace(), context.getPos().getX(), context.getPos().getY(),
|
||||
context.getPos().getZ(), context.getHand());
|
||||
}
|
||||
|
||||
// API for when an item in hand was right-clicked, with no block context
|
||||
public PacketClick(Hand hand) {
|
||||
public ClickPacket(Hand hand) {
|
||||
this(BlockPos.ZERO, null, 0, 0, 0, hand);
|
||||
}
|
||||
|
||||
private PacketClick(final BlockPos pos, final Direction side, final float hitX, final float hitY, final float hitZ,
|
||||
final Hand hand) {
|
||||
private ClickPacket(final BlockPos pos, final Direction side, final float hitX, final float hitY, final float hitZ,
|
||||
final Hand hand) {
|
||||
this(pos, side, hitX, hitY, hitZ, hand, false);
|
||||
}
|
||||
|
||||
public PacketClick(final BlockPos pos, final Direction side, final float hitX, final float hitY, final float hitZ,
|
||||
final Hand hand, boolean leftClick) {
|
||||
public ClickPacket(final BlockPos pos, final Direction side, final float hitX, final float hitY, final float hitZ,
|
||||
final Hand hand, boolean leftClick) {
|
||||
|
||||
final PacketBuffer data = new PacketBuffer(Unpooled.buffer());
|
||||
|
||||
@@ -129,14 +129,14 @@ public class PacketClick extends AppEngPacket {
|
||||
|
||||
if (this.leftClick) {
|
||||
final Block block = player.world.getBlockState(pos).getBlock();
|
||||
if (block instanceof BlockCableBus) {
|
||||
((BlockCableBus) block).onBlockClickPacket(player.world, pos, player, this.hand,
|
||||
if (block instanceof CableBusBlock) {
|
||||
((CableBusBlock) block).onBlockClickPacket(player.world, pos, player, this.hand,
|
||||
new Vec3d(this.hitX, this.hitY, this.hitZ));
|
||||
}
|
||||
} else {
|
||||
if (!is.isEmpty()) {
|
||||
if (is.getItem() instanceof ToolNetworkTool) {
|
||||
final ToolNetworkTool tnt = (ToolNetworkTool) is.getItem();
|
||||
if (is.getItem() instanceof NetworkToolItem) {
|
||||
final NetworkToolItem tnt = (NetworkToolItem) is.getItem();
|
||||
|
||||
if (hasBlockContext()) {
|
||||
// Reconstruct an item use context
|
||||
@@ -144,7 +144,7 @@ public class PacketClick extends AppEngPacket {
|
||||
new BlockRayTraceResult(new Vec3d(hitX, hitY, hitZ), side, pos, false));
|
||||
tnt.serverSideToolLogic(useContext);
|
||||
} else {
|
||||
ContainerOpener.openContainer(ContainerNetworkTool.TYPE, player,
|
||||
ContainerOpener.openContainer(NetworkToolContainer.TYPE, player,
|
||||
ContainerLocator.forHand(player, hand));
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ public class PacketClick extends AppEngPacket {
|
||||
}
|
||||
|
||||
else if (maybeColorApplicator.isSameAs(is)) {
|
||||
final ToolColorApplicator mem = (ToolColorApplicator) is.getItem();
|
||||
final ColorApplicatorItem mem = (ColorApplicatorItem) is.getItem();
|
||||
mem.cycleColors(is, mem.getColor(is), 1);
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -25,13 +25,13 @@ import net.minecraft.entity.player.ServerPlayerEntity;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.worlddata.WorldData;
|
||||
import appeng.services.compass.ICompassCallback;
|
||||
|
||||
public class PacketCompassRequest extends AppEngPacket implements ICompassCallback {
|
||||
public class CompassRequestPacket extends BasePacket implements ICompassCallback {
|
||||
|
||||
final long attunement;
|
||||
final int cx;
|
||||
@@ -40,7 +40,7 @@ public class PacketCompassRequest extends AppEngPacket implements ICompassCallba
|
||||
|
||||
private PlayerEntity talkBackTo;
|
||||
|
||||
public PacketCompassRequest(final PacketBuffer stream) {
|
||||
public CompassRequestPacket(final PacketBuffer stream) {
|
||||
this.attunement = stream.readLong();
|
||||
this.cx = stream.readInt();
|
||||
this.cz = stream.readInt();
|
||||
@@ -48,7 +48,7 @@ public class PacketCompassRequest extends AppEngPacket implements ICompassCallba
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketCompassRequest(final long attunement, final int cx, final int cz, final int cdy) {
|
||||
public CompassRequestPacket(final long attunement, final int cx, final int cz, final int cdy) {
|
||||
|
||||
final PacketBuffer data = new PacketBuffer(Unpooled.buffer());
|
||||
|
||||
@@ -64,7 +64,7 @@ public class PacketCompassRequest extends AppEngPacket implements ICompassCallba
|
||||
@Override
|
||||
public void calculatedDirection(final boolean hasResult, final boolean spin, final double radians,
|
||||
final double dist) {
|
||||
NetworkHandler.instance().sendTo(new PacketCompassResponse(this, hasResult, spin, radians),
|
||||
NetworkHandler.instance().sendTo(new CompassResponsePacket(this, hasResult, spin, radians),
|
||||
(ServerPlayerEntity) this.talkBackTo);
|
||||
}
|
||||
|
||||
+5
-5
@@ -23,12 +23,12 @@ import io.netty.buffer.Unpooled;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.hooks.CompassManager;
|
||||
import appeng.hooks.CompassResult;
|
||||
|
||||
public class PacketCompassResponse extends AppEngPacket {
|
||||
public class CompassResponsePacket extends BasePacket {
|
||||
|
||||
private final long attunement;
|
||||
private final int cx;
|
||||
@@ -37,7 +37,7 @@ public class PacketCompassResponse extends AppEngPacket {
|
||||
|
||||
private CompassResult cr;
|
||||
|
||||
public PacketCompassResponse(final PacketBuffer stream) {
|
||||
public CompassResponsePacket(final PacketBuffer stream) {
|
||||
this.attunement = stream.readLong();
|
||||
this.cx = stream.readInt();
|
||||
this.cz = stream.readInt();
|
||||
@@ -47,8 +47,8 @@ public class PacketCompassResponse extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketCompassResponse(final PacketCompassRequest req, final boolean hasResult, final boolean spin,
|
||||
final double radians) {
|
||||
public CompassResponsePacket(final CompassRequestPacket req, final boolean hasResult, final boolean spin,
|
||||
final double radians) {
|
||||
|
||||
final PacketBuffer data = new PacketBuffer(Unpooled.buffer());
|
||||
|
||||
+8
-8
@@ -37,12 +37,12 @@ import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.client.gui.implementations.GuiInterfaceTerminal;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.client.gui.implementations.InterfaceTerminalScreen;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
//TODO, this is pointless, NBT is already compressed when written to a PacketBuffer.
|
||||
public class PacketCompressedNBT extends AppEngPacket {
|
||||
public class CompressedNBTPacket extends BasePacket {
|
||||
|
||||
// input.
|
||||
private final CompoundNBT in;
|
||||
@@ -50,7 +50,7 @@ public class PacketCompressedNBT extends AppEngPacket {
|
||||
private final PacketBuffer data;
|
||||
private final GZIPOutputStream compressFrame;
|
||||
|
||||
public PacketCompressedNBT(final PacketBuffer stream) {
|
||||
public CompressedNBTPacket(final PacketBuffer stream) {
|
||||
this.data = null;
|
||||
this.compressFrame = null;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class PacketCompressedNBT extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketCompressedNBT(final CompoundNBT din) throws IOException {
|
||||
public CompressedNBTPacket(final CompoundNBT din) throws IOException {
|
||||
|
||||
this.data = new PacketBuffer(Unpooled.buffer(2048));
|
||||
this.data.writeInt(this.getPacketID());
|
||||
@@ -83,7 +83,7 @@ public class PacketCompressedNBT extends AppEngPacket {
|
||||
|
||||
@Override
|
||||
public void write(final int value) {
|
||||
PacketCompressedNBT.this.data.writeByte(value);
|
||||
CompressedNBTPacket.this.data.writeByte(value);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -98,8 +98,8 @@ public class PacketCompressedNBT extends AppEngPacket {
|
||||
public void clientPacketData(final INetworkInfo network, final PlayerEntity player) {
|
||||
final Screen gs = Minecraft.getInstance().currentScreen;
|
||||
|
||||
if (gs instanceof GuiInterfaceTerminal) {
|
||||
((GuiInterfaceTerminal) gs).postUpdate(this.in);
|
||||
if (gs instanceof InterfaceTerminalScreen) {
|
||||
((InterfaceTerminalScreen) gs).postUpdate(this.in);
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -30,21 +30,21 @@ import appeng.api.config.Settings;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigurableObject;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.util.EnumCycler;
|
||||
|
||||
public final class PacketConfigButton extends AppEngPacket {
|
||||
public final class ConfigButtonPacket extends BasePacket {
|
||||
private final Settings option;
|
||||
private final boolean rotationDirection;
|
||||
|
||||
public PacketConfigButton(final PacketBuffer stream) {
|
||||
public ConfigButtonPacket(final PacketBuffer stream) {
|
||||
this.option = Settings.values()[stream.readInt()];
|
||||
this.rotationDirection = stream.readBoolean();
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketConfigButton(final Settings option, final boolean rotationDirection) {
|
||||
public ConfigButtonPacket(final Settings option, final boolean rotationDirection) {
|
||||
this.option = option;
|
||||
this.rotationDirection = rotationDirection;
|
||||
|
||||
+52
-52
@@ -18,6 +18,8 @@
|
||||
|
||||
package appeng.core.sync.packets;
|
||||
|
||||
import appeng.client.gui.implementations.CraftingCPUScreen;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -32,37 +34,35 @@ 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.container.AEBaseContainer;
|
||||
import appeng.container.implementations.ContainerCellWorkbench;
|
||||
import appeng.container.implementations.ContainerCraftConfirm;
|
||||
import appeng.container.implementations.ContainerCraftingCPU;
|
||||
import appeng.container.implementations.ContainerCraftingStatus;
|
||||
import appeng.container.implementations.ContainerLevelEmitter;
|
||||
import appeng.container.implementations.ContainerNetworkTool;
|
||||
import appeng.container.implementations.ContainerPatternTerm;
|
||||
import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.container.implementations.ContainerQuartzKnife;
|
||||
import appeng.container.implementations.ContainerSecurityStation;
|
||||
import appeng.container.implementations.ContainerStorageBus;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.container.implementations.CellWorkbenchContainer;
|
||||
import appeng.container.implementations.CraftConfirmContainer;
|
||||
import appeng.container.implementations.CraftingCPUContainer;
|
||||
import appeng.container.implementations.CraftingStatusContainer;
|
||||
import appeng.container.implementations.LevelEmitterContainer;
|
||||
import appeng.container.implementations.NetworkToolContainer;
|
||||
import appeng.container.implementations.PatternTermContainer;
|
||||
import appeng.container.implementations.PriorityContainer;
|
||||
import appeng.container.implementations.QuartzKnifeContainer;
|
||||
import appeng.container.implementations.SecurityStationContainer;
|
||||
import appeng.container.implementations.StorageBusContainer;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.fluids.container.ContainerFluidLevelEmitter;
|
||||
import appeng.fluids.container.ContainerFluidStorageBus;
|
||||
import appeng.fluids.container.FluidLevelEmitterContainer;
|
||||
import appeng.fluids.container.FluidStorageBusContainer;
|
||||
import appeng.helpers.IMouseWheelItem;
|
||||
|
||||
public class PacketValueConfig extends AppEngPacket {
|
||||
public class ConfigValuePacket extends BasePacket {
|
||||
|
||||
private final String Name;
|
||||
private final String Value;
|
||||
|
||||
public PacketValueConfig(final PacketBuffer stream) {
|
||||
public ConfigValuePacket(final PacketBuffer stream) {
|
||||
this.Name = stream.readString();
|
||||
this.Value = stream.readString();
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketValueConfig(final String name, final String value) {
|
||||
public ConfigValuePacket(final String name, final String value) {
|
||||
this.Name = name;
|
||||
this.Value = value;
|
||||
|
||||
@@ -98,35 +98,35 @@ public class PacketValueConfig extends AppEngPacket {
|
||||
final ItemStack is = player.getHeldItem(hand);
|
||||
final IMouseWheelItem si = (IMouseWheelItem) is.getItem();
|
||||
si.onWheel(is, this.Value.equals("WheelUp"));
|
||||
} else if (this.Name.equals("Terminal.Cpu") && c instanceof ContainerCraftingStatus) {
|
||||
final ContainerCraftingStatus qk = (ContainerCraftingStatus) c;
|
||||
} else if (this.Name.equals("Terminal.Cpu") && c instanceof CraftingStatusContainer) {
|
||||
final CraftingStatusContainer qk = (CraftingStatusContainer) c;
|
||||
qk.cycleCpu(this.Value.equals("Next"));
|
||||
} else if (this.Name.equals("Terminal.Cpu") && c instanceof ContainerCraftConfirm) {
|
||||
final ContainerCraftConfirm qk = (ContainerCraftConfirm) c;
|
||||
} else if (this.Name.equals("Terminal.Cpu") && c instanceof CraftConfirmContainer) {
|
||||
final CraftConfirmContainer qk = (CraftConfirmContainer) c;
|
||||
qk.cycleCpu(this.Value.equals("Next"));
|
||||
} else if (this.Name.equals("Terminal.Start") && c instanceof ContainerCraftConfirm) {
|
||||
final ContainerCraftConfirm qk = (ContainerCraftConfirm) c;
|
||||
} else if (this.Name.equals("Terminal.Start") && c instanceof CraftConfirmContainer) {
|
||||
final CraftConfirmContainer qk = (CraftConfirmContainer) c;
|
||||
qk.startJob();
|
||||
} else if (this.Name.equals("TileCrafting.Cancel") && c instanceof ContainerCraftingCPU) {
|
||||
final ContainerCraftingCPU qk = (ContainerCraftingCPU) c;
|
||||
} else if (this.Name.equals("TileCrafting.Cancel") && c instanceof CraftingCPUContainer) {
|
||||
final CraftingCPUContainer qk = (CraftingCPUContainer) c;
|
||||
qk.cancelCrafting();
|
||||
} else if (this.Name.equals("QuartzKnife.Name") && c instanceof ContainerQuartzKnife) {
|
||||
final ContainerQuartzKnife qk = (ContainerQuartzKnife) c;
|
||||
} else if (this.Name.equals("QuartzKnife.Name") && c instanceof QuartzKnifeContainer) {
|
||||
final QuartzKnifeContainer qk = (QuartzKnifeContainer) c;
|
||||
qk.setName(this.Value);
|
||||
} else if (this.Name.equals("TileSecurityStation.ToggleOption") && c instanceof ContainerSecurityStation) {
|
||||
final ContainerSecurityStation sc = (ContainerSecurityStation) c;
|
||||
} else if (this.Name.equals("TileSecurityStation.ToggleOption") && c instanceof SecurityStationContainer) {
|
||||
final SecurityStationContainer sc = (SecurityStationContainer) c;
|
||||
sc.toggleSetting(this.Value, player);
|
||||
} else if (this.Name.equals("PriorityHost.Priority") && c instanceof ContainerPriority) {
|
||||
final ContainerPriority pc = (ContainerPriority) c;
|
||||
} else if (this.Name.equals("PriorityHost.Priority") && c instanceof PriorityContainer) {
|
||||
final PriorityContainer pc = (PriorityContainer) c;
|
||||
pc.setPriority(Integer.parseInt(this.Value), player);
|
||||
} else if (this.Name.equals("LevelEmitter.Value") && c instanceof ContainerLevelEmitter) {
|
||||
final ContainerLevelEmitter lvc = (ContainerLevelEmitter) c;
|
||||
} else if (this.Name.equals("LevelEmitter.Value") && c instanceof LevelEmitterContainer) {
|
||||
final LevelEmitterContainer lvc = (LevelEmitterContainer) c;
|
||||
lvc.setLevel(Long.parseLong(this.Value), player);
|
||||
} else if (this.Name.equals("FluidLevelEmitter.Value") && c instanceof ContainerFluidLevelEmitter) {
|
||||
final ContainerFluidLevelEmitter lvc = (ContainerFluidLevelEmitter) c;
|
||||
} else if (this.Name.equals("FluidLevelEmitter.Value") && c instanceof FluidLevelEmitterContainer) {
|
||||
final FluidLevelEmitterContainer lvc = (FluidLevelEmitterContainer) c;
|
||||
lvc.setLevel(Long.parseLong(this.Value), player);
|
||||
} else if (this.Name.startsWith("PatternTerminal.") && c instanceof ContainerPatternTerm) {
|
||||
final ContainerPatternTerm cpt = (ContainerPatternTerm) c;
|
||||
} else if (this.Name.startsWith("PatternTerminal.") && c instanceof PatternTermContainer) {
|
||||
final PatternTermContainer cpt = (PatternTermContainer) c;
|
||||
if (this.Name.equals("PatternTerminal.CraftMode")) {
|
||||
cpt.getPatternTerminal().setCraftingRecipe(this.Value.equals("1"));
|
||||
} else if (this.Name.equals("PatternTerminal.Encode")) {
|
||||
@@ -139,21 +139,21 @@ public class PacketValueConfig extends AppEngPacket {
|
||||
} else if (this.Name.startsWith("StorageBus.")) {
|
||||
if (this.Name.equals("StorageBus.Action")) {
|
||||
if (this.Value.equals("Partition")) {
|
||||
if (c instanceof ContainerStorageBus) {
|
||||
((ContainerStorageBus) c).partition();
|
||||
} else if (c instanceof ContainerFluidStorageBus) {
|
||||
((ContainerFluidStorageBus) c).partition();
|
||||
if (c instanceof StorageBusContainer) {
|
||||
((StorageBusContainer) c).partition();
|
||||
} else if (c instanceof FluidStorageBusContainer) {
|
||||
((FluidStorageBusContainer) c).partition();
|
||||
}
|
||||
} else if (this.Value.equals("Clear")) {
|
||||
if (c instanceof ContainerStorageBus) {
|
||||
((ContainerStorageBus) c).clear();
|
||||
} else if (c instanceof ContainerFluidStorageBus) {
|
||||
((ContainerFluidStorageBus) c).clear();
|
||||
if (c instanceof StorageBusContainer) {
|
||||
((StorageBusContainer) c).clear();
|
||||
} else if (c instanceof FluidStorageBusContainer) {
|
||||
((FluidStorageBusContainer) c).clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (this.Name.startsWith("CellWorkbench.") && c instanceof ContainerCellWorkbench) {
|
||||
final ContainerCellWorkbench ccw = (ContainerCellWorkbench) c;
|
||||
} else if (this.Name.startsWith("CellWorkbench.") && c instanceof CellWorkbenchContainer) {
|
||||
final CellWorkbenchContainer ccw = (CellWorkbenchContainer) c;
|
||||
if (this.Name.equals("CellWorkbench.Action")) {
|
||||
if (this.Value.equals("CopyMode")) {
|
||||
ccw.nextWorkBenchCopyMode();
|
||||
@@ -165,9 +165,9 @@ public class PacketValueConfig extends AppEngPacket {
|
||||
} else if (this.Name.equals("CellWorkbench.Fuzzy")) {
|
||||
ccw.setFuzzy(FuzzyMode.valueOf(this.Value));
|
||||
}
|
||||
} else if (c instanceof ContainerNetworkTool) {
|
||||
} else if (c instanceof NetworkToolContainer) {
|
||||
if (this.Name.equals("NetworkTool") && this.Value.equals("Toggle")) {
|
||||
((ContainerNetworkTool) c).toggleFacadeMode();
|
||||
((NetworkToolContainer) c).toggleFacadeMode();
|
||||
}
|
||||
} else if (c instanceof IConfigurableObject) {
|
||||
final IConfigManager cm = ((IConfigurableObject) c).getConfigManager();
|
||||
@@ -198,8 +198,8 @@ public class PacketValueConfig extends AppEngPacket {
|
||||
((AEBaseContainer) c).stringSync(Integer.parseInt(this.Name.substring(8)), this.Value);
|
||||
} else if (this.Name.equals("CraftingStatus") && this.Value.equals("Clear")) {
|
||||
final Screen gs = Minecraft.getInstance().currentScreen;
|
||||
if (gs instanceof GuiCraftingCPU) {
|
||||
((GuiCraftingCPU<?>) gs).clearItems();
|
||||
if (gs instanceof CraftingCPUScreen) {
|
||||
((CraftingCPUScreen<?>) gs).clearItems();
|
||||
}
|
||||
} else if (c instanceof IConfigurableObject) {
|
||||
final IConfigManager cm = ((IConfigurableObject) c).getConfigManager();
|
||||
+11
-11
@@ -32,23 +32,23 @@ import appeng.api.networking.crafting.ICraftingJob;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerCraftAmount;
|
||||
import appeng.container.implementations.ContainerCraftConfirm;
|
||||
import appeng.container.implementations.CraftAmountContainer;
|
||||
import appeng.container.implementations.CraftConfirmContainer;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
public class PacketCraftRequest extends AppEngPacket {
|
||||
public class CraftRequestPacket extends BasePacket {
|
||||
|
||||
private final long amount;
|
||||
private final boolean heldShift;
|
||||
|
||||
public PacketCraftRequest(final PacketBuffer stream) {
|
||||
public CraftRequestPacket(final PacketBuffer stream) {
|
||||
this.heldShift = stream.readBoolean();
|
||||
this.amount = stream.readLong();
|
||||
}
|
||||
|
||||
public PacketCraftRequest(final int craftAmt, final boolean shift) {
|
||||
public CraftRequestPacket(final int craftAmt, final boolean shift) {
|
||||
this.amount = craftAmt;
|
||||
this.heldShift = shift;
|
||||
|
||||
@@ -63,8 +63,8 @@ public class PacketCraftRequest extends AppEngPacket {
|
||||
|
||||
@Override
|
||||
public void serverPacketData(final INetworkInfo manager, final PlayerEntity player) {
|
||||
if (player.openContainer instanceof ContainerCraftAmount) {
|
||||
final ContainerCraftAmount cca = (ContainerCraftAmount) player.openContainer;
|
||||
if (player.openContainer instanceof CraftAmountContainer) {
|
||||
final CraftAmountContainer cca = (CraftAmountContainer) player.openContainer;
|
||||
final Object target = cca.getTarget();
|
||||
if (target instanceof IActionHost) {
|
||||
final IActionHost ah = (IActionHost) target;
|
||||
@@ -88,10 +88,10 @@ public class PacketCraftRequest extends AppEngPacket {
|
||||
|
||||
final ContainerLocator locator = cca.getLocator();
|
||||
if (locator != null) {
|
||||
ContainerOpener.openContainer(ContainerCraftConfirm.TYPE, player, locator);
|
||||
ContainerOpener.openContainer(CraftConfirmContainer.TYPE, player, locator);
|
||||
|
||||
if (player.openContainer instanceof ContainerCraftConfirm) {
|
||||
final ContainerCraftConfirm ccc = (ContainerCraftConfirm) player.openContainer;
|
||||
if (player.openContainer instanceof CraftConfirmContainer) {
|
||||
final CraftConfirmContainer ccc = (CraftConfirmContainer) player.openContainer;
|
||||
ccc.setAutoStart(this.heldShift);
|
||||
ccc.setJob(futureJob);
|
||||
cca.detectAndSendChanges();
|
||||
+4
-4
@@ -29,15 +29,15 @@ import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.fluids.container.IFluidSyncContainer;
|
||||
import appeng.fluids.util.AEFluidStack;
|
||||
|
||||
public class PacketFluidSlot extends AppEngPacket {
|
||||
public class FluidSlotPacket extends BasePacket {
|
||||
private final Map<Integer, IAEFluidStack> list;
|
||||
|
||||
public PacketFluidSlot(final PacketBuffer stream) {
|
||||
public FluidSlotPacket(final PacketBuffer stream) {
|
||||
this.list = new HashMap<>();
|
||||
CompoundNBT tag = stream.readCompoundTag();
|
||||
|
||||
@@ -47,7 +47,7 @@ public class PacketFluidSlot extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketFluidSlot(final Map<Integer, IAEFluidStack> list) {
|
||||
public FluidSlotPacket(final Map<Integer, IAEFluidStack> list) {
|
||||
this.list = list;
|
||||
final CompoundNBT sendTag = new CompoundNBT();
|
||||
for (Map.Entry<Integer, IAEFluidStack> fs : list.entrySet()) {
|
||||
+9
-9
@@ -29,22 +29,22 @@ import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerCraftAmount;
|
||||
import appeng.container.implementations.CraftAmountContainer;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.helpers.InventoryAction;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
public class PacketInventoryAction extends AppEngPacket {
|
||||
public class InventoryActionPacket extends BasePacket {
|
||||
|
||||
private final InventoryAction action;
|
||||
private final int slot;
|
||||
private final long id;
|
||||
private final IAEItemStack slotItem;
|
||||
|
||||
public PacketInventoryAction(final PacketBuffer stream) {
|
||||
public InventoryActionPacket(final PacketBuffer stream) {
|
||||
this.action = InventoryAction.values()[stream.readInt()];
|
||||
this.slot = stream.readInt();
|
||||
this.id = stream.readLong();
|
||||
@@ -57,7 +57,7 @@ public class PacketInventoryAction extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketInventoryAction(final InventoryAction action, final int slot, final IAEItemStack slotItem) {
|
||||
public InventoryActionPacket(final InventoryAction action, final int slot, final IAEItemStack slotItem) {
|
||||
|
||||
if (Platform.isClient()) {
|
||||
throw new IllegalStateException("invalid packet, client cannot post inv actions with stacks.");
|
||||
@@ -86,7 +86,7 @@ public class PacketInventoryAction extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketInventoryAction(final InventoryAction action, final int slot, final long id) {
|
||||
public InventoryActionPacket(final InventoryAction action, final int slot, final long id) {
|
||||
this.action = action;
|
||||
this.slot = slot;
|
||||
this.id = id;
|
||||
@@ -111,10 +111,10 @@ public class PacketInventoryAction extends AppEngPacket {
|
||||
if (this.action == InventoryAction.AUTO_CRAFT) {
|
||||
final ContainerLocator locator = baseContainer.getLocator();
|
||||
if (locator != null) {
|
||||
ContainerOpener.openContainer(ContainerCraftAmount.TYPE, player, locator);
|
||||
ContainerOpener.openContainer(CraftAmountContainer.TYPE, player, locator);
|
||||
|
||||
if (sender.openContainer instanceof ContainerCraftAmount) {
|
||||
final ContainerCraftAmount cca = (ContainerCraftAmount) sender.openContainer;
|
||||
if (sender.openContainer instanceof CraftAmountContainer) {
|
||||
final CraftAmountContainer cca = (CraftAmountContainer) sender.openContainer;
|
||||
|
||||
if (baseContainer.getTargetStack() != null) {
|
||||
cca.getCraftingItem().putStack(baseContainer.getTargetStack().asItemStackRepresentation());
|
||||
+4
-4
@@ -30,7 +30,7 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.client.render.effects.EnergyParticleData;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.util.Platform;
|
||||
|
||||
@@ -38,14 +38,14 @@ import appeng.util.Platform;
|
||||
* Plays a transition particle effect into the supplied direction. Used
|
||||
* primarily by annihilation planes.
|
||||
*/
|
||||
public class PacketItemTransitionEffect extends AppEngPacket {
|
||||
public class ItemTransitionEffectPacket extends BasePacket {
|
||||
|
||||
private final double x;
|
||||
private final double y;
|
||||
private final double z;
|
||||
private final AEPartLocation d;
|
||||
|
||||
public PacketItemTransitionEffect(double x, double y, double z, AEPartLocation direction) {
|
||||
public ItemTransitionEffectPacket(double x, double y, double z, AEPartLocation direction) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
@@ -62,7 +62,7 @@ public class PacketItemTransitionEffect extends AppEngPacket {
|
||||
this.configureWrite(data);
|
||||
}
|
||||
|
||||
public PacketItemTransitionEffect(final PacketBuffer stream) {
|
||||
public ItemTransitionEffectPacket(final PacketBuffer stream) {
|
||||
this.x = stream.readFloat();
|
||||
this.y = stream.readFloat();
|
||||
this.z = stream.readFloat();
|
||||
+6
-6
@@ -41,10 +41,10 @@ import appeng.api.networking.storage.IStorageGrid;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.helpers.IContainerCraftingPacket;
|
||||
import appeng.items.storage.ItemViewCell;
|
||||
import appeng.items.storage.ViewCellItem;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.helpers.ItemHandlerUtil;
|
||||
import appeng.util.inv.AdaptorItemHandler;
|
||||
@@ -52,11 +52,11 @@ import appeng.util.inv.WrapperInvItemHandler;
|
||||
import appeng.util.item.AEItemStack;
|
||||
import appeng.util.prioritylist.IPartitionList;
|
||||
|
||||
public class PacketJEIRecipe extends AppEngPacket {
|
||||
public class JEIRecipePacket extends BasePacket {
|
||||
|
||||
private ItemStack[][] recipe;
|
||||
|
||||
public PacketJEIRecipe(final PacketBuffer stream) {
|
||||
public JEIRecipePacket(final PacketBuffer stream) {
|
||||
final CompoundNBT comp = stream.readCompoundTag();
|
||||
if (comp != null) {
|
||||
this.recipe = new ItemStack[9][];
|
||||
@@ -73,7 +73,7 @@ public class PacketJEIRecipe extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketJEIRecipe(final CompoundNBT recipe) {
|
||||
public JEIRecipePacket(final CompoundNBT recipe) {
|
||||
final PacketBuffer data = new PacketBuffer(Unpooled.buffer());
|
||||
|
||||
data.writeInt(this.getPacketID());
|
||||
@@ -114,7 +114,7 @@ public class PacketJEIRecipe extends AppEngPacket {
|
||||
if (inv != null && this.recipe != null && security != null) {
|
||||
final IMEMonitor<IAEItemStack> storage = inv
|
||||
.getInventory(AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class));
|
||||
final IPartitionList<IAEItemStack> filter = ItemViewCell.createFilter(cct.getViewCells());
|
||||
final IPartitionList<IAEItemStack> filter = ViewCellItem.createFilter(cct.getViewCells());
|
||||
|
||||
for (int x = 0; x < craftMatrix.getSlots(); x++) {
|
||||
ItemStack currentItem = craftMatrix.getStackInSlot(x);
|
||||
+4
-4
@@ -28,24 +28,24 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.client.render.effects.ParticleTypes;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class PacketLightning extends AppEngPacket {
|
||||
public class LightningPacket extends BasePacket {
|
||||
|
||||
private final double x;
|
||||
private final double y;
|
||||
private final double z;
|
||||
|
||||
public PacketLightning(final PacketBuffer stream) {
|
||||
public LightningPacket(final PacketBuffer stream) {
|
||||
this.x = stream.readFloat();
|
||||
this.y = stream.readFloat();
|
||||
this.z = stream.readFloat();
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketLightning(final double x, final double y, final double z) {
|
||||
public LightningPacket(final double x, final double y, final double z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
+9
-10
@@ -24,7 +24,6 @@ import java.io.OutputStream;
|
||||
import java.nio.BufferOverflowException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.zip.DeflaterOutputStream;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
@@ -43,9 +42,9 @@ import net.minecraftforge.fml.network.NetworkDirection;
|
||||
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.fluids.client.gui.GuiFluidTerminal;
|
||||
import appeng.fluids.client.gui.FluidTerminalScreen;
|
||||
import appeng.fluids.util.AEFluidStack;
|
||||
|
||||
/**
|
||||
@@ -53,7 +52,7 @@ import appeng.fluids.util.AEFluidStack;
|
||||
* @version rv6 - 22/05/2018
|
||||
* @since rv6 22/05/2018
|
||||
*/
|
||||
public class PacketMEFluidInventoryUpdate extends AppEngPacket {
|
||||
public class MEFluidInventoryUpdatePacket extends BasePacket {
|
||||
private static final int UNCOMPRESSED_PACKET_BYTE_LIMIT = 16 * 1024 * 1024;
|
||||
private static final int OPERATION_BYTE_LIMIT = 2 * 1024;
|
||||
private static final int TEMP_BUFFER_SIZE = 1024;
|
||||
@@ -73,7 +72,7 @@ public class PacketMEFluidInventoryUpdate extends AppEngPacket {
|
||||
private int writtenBytes = 0;
|
||||
private boolean empty = true;
|
||||
|
||||
public PacketMEFluidInventoryUpdate(final PacketBuffer stream) {
|
||||
public MEFluidInventoryUpdatePacket(final PacketBuffer stream) {
|
||||
this.data = null;
|
||||
this.compressFrame = null;
|
||||
this.list = new LinkedList<>();
|
||||
@@ -112,12 +111,12 @@ public class PacketMEFluidInventoryUpdate extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketMEFluidInventoryUpdate() throws IOException {
|
||||
public MEFluidInventoryUpdatePacket() throws IOException {
|
||||
this((byte) 0);
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketMEFluidInventoryUpdate(final byte ref) throws IOException {
|
||||
public MEFluidInventoryUpdatePacket(final byte ref) throws IOException {
|
||||
this.ref = ref;
|
||||
this.data = new PacketBuffer(Unpooled.buffer(OPERATION_BYTE_LIMIT));
|
||||
this.data.writeInt(this.getPacketID());
|
||||
@@ -126,7 +125,7 @@ public class PacketMEFluidInventoryUpdate extends AppEngPacket {
|
||||
this.compressFrame = new GZIPOutputStream(new OutputStream() {
|
||||
@Override
|
||||
public void write(final int value) {
|
||||
PacketMEFluidInventoryUpdate.this.data.writeByte(value);
|
||||
MEFluidInventoryUpdatePacket.this.data.writeByte(value);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -138,8 +137,8 @@ public class PacketMEFluidInventoryUpdate extends AppEngPacket {
|
||||
public void clientPacketData(final INetworkInfo network, final PlayerEntity player) {
|
||||
final Screen gs = Minecraft.getInstance().currentScreen;
|
||||
|
||||
if (gs instanceof GuiFluidTerminal) {
|
||||
((GuiFluidTerminal) gs).postUpdate(this.list);
|
||||
if (gs instanceof FluidTerminalScreen) {
|
||||
((FluidTerminalScreen) gs).postUpdate(this.list);
|
||||
}
|
||||
}
|
||||
|
||||
+18
-18
@@ -41,16 +41,16 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.network.NetworkDirection;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
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.client.gui.implementations.CraftConfirmScreen;
|
||||
import appeng.client.gui.implementations.CraftingCPUScreen;
|
||||
import appeng.client.gui.implementations.MEMonitorableScreen;
|
||||
import appeng.client.gui.implementations.NetworkStatusScreen;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
public class PacketMEInventoryUpdate extends AppEngPacket {
|
||||
public class MEInventoryUpdatePacket extends BasePacket {
|
||||
private static final int UNCOMPRESSED_PACKET_BYTE_LIMIT = 16 * 1024 * 1024;
|
||||
private static final int OPERATION_BYTE_LIMIT = 2 * 1024;
|
||||
private static final int TEMP_BUFFER_SIZE = 1024;
|
||||
@@ -70,7 +70,7 @@ public class PacketMEInventoryUpdate extends AppEngPacket {
|
||||
private int writtenBytes = 0;
|
||||
private boolean empty = true;
|
||||
|
||||
public PacketMEInventoryUpdate(final PacketBuffer stream) {
|
||||
public MEInventoryUpdatePacket(final PacketBuffer stream) {
|
||||
this.data = null;
|
||||
this.compressFrame = null;
|
||||
this.list = new ArrayList<>();
|
||||
@@ -110,12 +110,12 @@ public class PacketMEInventoryUpdate extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketMEInventoryUpdate() throws IOException {
|
||||
public MEInventoryUpdatePacket() throws IOException {
|
||||
this((byte) 0);
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketMEInventoryUpdate(final byte ref) throws IOException {
|
||||
public MEInventoryUpdatePacket(final byte ref) throws IOException {
|
||||
this.ref = ref;
|
||||
this.data = new PacketBuffer(Unpooled.buffer(OPERATION_BYTE_LIMIT));
|
||||
this.data.writeInt(this.getPacketID());
|
||||
@@ -124,7 +124,7 @@ public class PacketMEInventoryUpdate extends AppEngPacket {
|
||||
this.compressFrame = new GZIPOutputStream(new OutputStream() {
|
||||
@Override
|
||||
public void write(final int value) {
|
||||
PacketMEInventoryUpdate.this.data.writeByte(value);
|
||||
MEInventoryUpdatePacket.this.data.writeByte(value);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -136,20 +136,20 @@ public class PacketMEInventoryUpdate extends AppEngPacket {
|
||||
public void clientPacketData(final INetworkInfo network, final PlayerEntity player) {
|
||||
final Screen gs = Minecraft.getInstance().currentScreen;
|
||||
|
||||
if (gs instanceof GuiCraftConfirm) {
|
||||
((GuiCraftConfirm) gs).postUpdate(this.list, this.ref);
|
||||
if (gs instanceof CraftConfirmScreen) {
|
||||
((CraftConfirmScreen) gs).postUpdate(this.list, this.ref);
|
||||
}
|
||||
|
||||
if (gs instanceof GuiCraftingCPU) {
|
||||
((GuiCraftingCPU<?>) gs).postUpdate(this.list, this.ref);
|
||||
if (gs instanceof CraftingCPUScreen) {
|
||||
((CraftingCPUScreen<?>) gs).postUpdate(this.list, this.ref);
|
||||
}
|
||||
|
||||
if (gs instanceof GuiMEMonitorable) {
|
||||
((GuiMEMonitorable<?>) gs).postUpdate(this.list);
|
||||
if (gs instanceof MEMonitorableScreen) {
|
||||
((MEMonitorableScreen<?>) gs).postUpdate(this.list);
|
||||
}
|
||||
|
||||
if (gs instanceof GuiNetworkStatus) {
|
||||
((GuiNetworkStatus) gs).postUpdate(this.list);
|
||||
if (gs instanceof NetworkStatusScreen) {
|
||||
((NetworkStatusScreen) gs).postUpdate(this.list);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -27,10 +27,10 @@ import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.client.render.effects.ParticleTypes;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
public class PacketMatterCannon extends AppEngPacket {
|
||||
public class MatterCannonPacket extends BasePacket {
|
||||
|
||||
private final double x;
|
||||
private final double y;
|
||||
@@ -40,7 +40,7 @@ public class PacketMatterCannon extends AppEngPacket {
|
||||
private final double dz;
|
||||
private final byte len;
|
||||
|
||||
public PacketMatterCannon(final PacketBuffer stream) {
|
||||
public MatterCannonPacket(final PacketBuffer stream) {
|
||||
this.x = stream.readFloat();
|
||||
this.y = stream.readFloat();
|
||||
this.z = stream.readFloat();
|
||||
@@ -51,8 +51,8 @@ public class PacketMatterCannon extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketMatterCannon(final double x, final double y, final double z, final float dx, final float dy,
|
||||
final float dz, final byte len) {
|
||||
public MatterCannonPacket(final double x, final double y, final double z, final float dx, final float dy,
|
||||
final float dz, final byte len) {
|
||||
final float dl = dx * dx + dy * dy + dz * dz;
|
||||
final float dlz = (float) Math.sqrt(dl);
|
||||
|
||||
+4
-4
@@ -28,23 +28,23 @@ import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
public class PacketMockExplosion extends AppEngPacket {
|
||||
public class MockExplosionPacket extends BasePacket {
|
||||
|
||||
private final double x;
|
||||
private final double y;
|
||||
private final double z;
|
||||
|
||||
public PacketMockExplosion(final PacketBuffer stream) {
|
||||
public MockExplosionPacket(final PacketBuffer stream) {
|
||||
this.x = stream.readDouble();
|
||||
this.y = stream.readDouble();
|
||||
this.z = stream.readDouble();
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketMockExplosion(final double x, final double y, final double z) {
|
||||
public MockExplosionPacket(final double x, final double y, final double z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
+4
-4
@@ -24,25 +24,25 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.hooks.TickHandler;
|
||||
import appeng.hooks.TickHandler.PlayerColor;
|
||||
|
||||
public class PacketPaintedEntity extends AppEngPacket {
|
||||
public class PaintedEntityPacket extends BasePacket {
|
||||
|
||||
private final AEColor myColor;
|
||||
private final int entityId;
|
||||
private int ticks;
|
||||
|
||||
public PacketPaintedEntity(final PacketBuffer stream) {
|
||||
public PaintedEntityPacket(final PacketBuffer stream) {
|
||||
this.entityId = stream.readInt();
|
||||
this.myColor = AEColor.values()[stream.readByte()];
|
||||
this.ticks = stream.readInt();
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketPaintedEntity(final int myEntity, final AEColor myColor, final int ticksLeft) {
|
||||
public PaintedEntityPacket(final int myEntity, final AEColor myColor, final int ticksLeft) {
|
||||
|
||||
final PacketBuffer data = new PacketBuffer(Unpooled.buffer());
|
||||
|
||||
+4
-4
@@ -28,11 +28,11 @@ import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.parts.PartPlacement;
|
||||
|
||||
public class PacketPartPlacement extends AppEngPacket {
|
||||
public class PartPlacementPacket extends BasePacket {
|
||||
|
||||
private int x;
|
||||
private int y;
|
||||
@@ -41,7 +41,7 @@ public class PacketPartPlacement extends AppEngPacket {
|
||||
private float eyeHeight;
|
||||
private Hand hand;
|
||||
|
||||
public PacketPartPlacement(final PacketBuffer stream) {
|
||||
public PartPlacementPacket(final PacketBuffer stream) {
|
||||
this.x = stream.readInt();
|
||||
this.y = stream.readInt();
|
||||
this.z = stream.readInt();
|
||||
@@ -51,7 +51,7 @@ public class PacketPartPlacement extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketPartPlacement(final BlockPos pos, final Direction face, final float eyeHeight, final Hand hand) {
|
||||
public PartPlacementPacket(final BlockPos pos, final Direction face, final float eyeHeight, final Hand hand) {
|
||||
final PacketBuffer data = new PacketBuffer(Unpooled.buffer());
|
||||
|
||||
data.writeInt(this.getPacketID());
|
||||
+7
-7
@@ -28,12 +28,12 @@ import net.minecraftforge.items.IItemHandler;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.container.implementations.ContainerPatternTerm;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.container.implementations.PatternTermContainer;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
public class PacketPatternSlot extends AppEngPacket {
|
||||
public class PatternSlotPacket extends BasePacket {
|
||||
|
||||
public final IAEItemStack slotItem;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class PacketPatternSlot extends AppEngPacket {
|
||||
|
||||
public final boolean shift;
|
||||
|
||||
public PacketPatternSlot(final PacketBuffer stream) {
|
||||
public PatternSlotPacket(final PacketBuffer stream) {
|
||||
|
||||
this.shift = stream.readBoolean();
|
||||
|
||||
@@ -63,7 +63,7 @@ public class PacketPatternSlot extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketPatternSlot(final IItemHandler pat, final IAEItemStack slotItem, final boolean shift) {
|
||||
public PatternSlotPacket(final IItemHandler pat, final IAEItemStack slotItem, final boolean shift) {
|
||||
|
||||
this.slotItem = slotItem;
|
||||
this.shift = shift;
|
||||
@@ -96,8 +96,8 @@ public class PacketPatternSlot extends AppEngPacket {
|
||||
@Override
|
||||
public void serverPacketData(final INetworkInfo manager, final PlayerEntity player) {
|
||||
final ServerPlayerEntity sender = (ServerPlayerEntity) player;
|
||||
if (sender.openContainer instanceof ContainerPatternTerm) {
|
||||
final ContainerPatternTerm patternTerminal = (ContainerPatternTerm) sender.openContainer;
|
||||
if (sender.openContainer instanceof PatternTermContainer) {
|
||||
final PatternTermContainer patternTerminal = (PatternTermContainer) sender.openContainer;
|
||||
patternTerminal.craftOrGetItem(this);
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -25,21 +25,21 @@ import net.minecraft.inventory.container.Container;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
public class PacketProgressBar extends AppEngPacket {
|
||||
public class ProgressBarPacket extends BasePacket {
|
||||
|
||||
private final short id;
|
||||
private final long value;
|
||||
|
||||
public PacketProgressBar(final PacketBuffer stream) {
|
||||
public ProgressBarPacket(final PacketBuffer stream) {
|
||||
this.id = stream.readShort();
|
||||
this.value = stream.readLong();
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketProgressBar(final int shortID, final long value) {
|
||||
public ProgressBarPacket(final int shortID, final long value) {
|
||||
this.id = (short) shortID;
|
||||
this.value = value;
|
||||
|
||||
+4
-4
@@ -24,21 +24,21 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
public class PacketSwapSlots extends AppEngPacket {
|
||||
public class SwapSlotsPacket extends BasePacket {
|
||||
|
||||
private final int slotA;
|
||||
private final int slotB;
|
||||
|
||||
public PacketSwapSlots(final PacketBuffer stream) {
|
||||
public SwapSlotsPacket(final PacketBuffer stream) {
|
||||
this.slotA = stream.readInt();
|
||||
this.slotB = stream.readInt();
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketSwapSlots(final int slotA, final int slotB) {
|
||||
public SwapSlotsPacket(final int slotA, final int slotB) {
|
||||
final PacketBuffer data = new PacketBuffer(Unpooled.buffer());
|
||||
|
||||
data.writeInt(this.getPacketID());
|
||||
+4
-4
@@ -29,19 +29,19 @@ import net.minecraftforge.registries.ForgeRegistries;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
public class PacketSwitchGuis extends AppEngPacket {
|
||||
public class SwitchGuisPacket extends BasePacket {
|
||||
|
||||
private final ContainerType<?> newGui;
|
||||
|
||||
public PacketSwitchGuis(final PacketBuffer stream) {
|
||||
public SwitchGuisPacket(final PacketBuffer stream) {
|
||||
this.newGui = ForgeRegistries.CONTAINERS.getValue(stream.readResourceLocation());
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketSwitchGuis(final ContainerType<?> newGui) {
|
||||
public SwitchGuisPacket(final ContainerType<?> newGui) {
|
||||
this.newGui = newGui;
|
||||
|
||||
final PacketBuffer data = new PacketBuffer(Unpooled.buffer());
|
||||
+7
-7
@@ -24,9 +24,9 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.fluids.container.ContainerFluidTerminal;
|
||||
import appeng.fluids.container.FluidTerminalContainer;
|
||||
import appeng.fluids.util.AEFluidStack;
|
||||
|
||||
/**
|
||||
@@ -34,10 +34,10 @@ import appeng.fluids.util.AEFluidStack;
|
||||
* @version rv6 - 23/05/2018
|
||||
* @since rv6 23/05/2018
|
||||
*/
|
||||
public class PacketTargetFluidStack extends AppEngPacket {
|
||||
public class TargetFluidStackPacket extends BasePacket {
|
||||
private AEFluidStack stack;
|
||||
|
||||
public PacketTargetFluidStack(final PacketBuffer stream) {
|
||||
public TargetFluidStackPacket(final PacketBuffer stream) {
|
||||
try {
|
||||
if (stream.readableBytes() > 0) {
|
||||
this.stack = (AEFluidStack) AEFluidStack.fromPacket(stream);
|
||||
@@ -51,7 +51,7 @@ public class PacketTargetFluidStack extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketTargetFluidStack(AEFluidStack stack) {
|
||||
public TargetFluidStackPacket(AEFluidStack stack) {
|
||||
|
||||
this.stack = stack;
|
||||
|
||||
@@ -69,8 +69,8 @@ public class PacketTargetFluidStack extends AppEngPacket {
|
||||
|
||||
@Override
|
||||
public void serverPacketData(final INetworkInfo manager, final PlayerEntity player) {
|
||||
if (player.openContainer instanceof ContainerFluidTerminal) {
|
||||
((ContainerFluidTerminal) player.openContainer).setTargetStack(this.stack);
|
||||
if (player.openContainer instanceof FluidTerminalContainer) {
|
||||
((FluidTerminalContainer) player.openContainer).setTargetStack(this.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -25,14 +25,14 @@ import net.minecraft.network.PacketBuffer;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.BasePacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
public class PacketTargetItemStack extends AppEngPacket {
|
||||
public class TargetItemStackPacket extends BasePacket {
|
||||
private AEItemStack stack;
|
||||
|
||||
public PacketTargetItemStack(final PacketBuffer stream) {
|
||||
public TargetItemStackPacket(final PacketBuffer stream) {
|
||||
try {
|
||||
if (stream.readableBytes() > 0) {
|
||||
this.stack = AEItemStack.fromPacket(stream);
|
||||
@@ -46,7 +46,7 @@ public class PacketTargetItemStack extends AppEngPacket {
|
||||
}
|
||||
|
||||
// api
|
||||
public PacketTargetItemStack(AEItemStack stack) {
|
||||
public TargetItemStackPacket(AEItemStack stack) {
|
||||
|
||||
this.stack = stack;
|
||||
|
||||
Reference in New Issue
Block a user