Jump to content

Crash Report


SlipperySkater

Recommended Posts

Hello I got a crash report, I believe it is missing some file from one of the mods in this modpack I got from PopularMMOS and I've been trying to fix it for a couple hours but I just can't seem to find the file for it. This modpack is the Challenge Pack 2.0 and he just put it up for download recently and I put only these mods and the config folders in .minecraft. I put no other mods with it to make sure it was a clean run but apparently something was wrong so I came to here.

Crash Report:

 

 

---- Minecraft Crash Report ----

// There are four lights!

 

Time: 11/9/14 8:06 PM

Description: Initializing game

 

java.lang.NoClassDefFoundError: cpw/mods/fml/common/ITickHandler

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:420)

at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:492)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204)

at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)

at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867)

at net.minecraft.client.main.Main.main(SourceFile:148)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

Caused by: java.lang.ClassNotFoundException: cpw.mods.fml.common.ITickHandler

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

... 34 more

Caused by: java.lang.NullPointerException

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)

... 36 more

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:420)

at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:492)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204)

at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)

 

-- Initialization --

Details:

Stacktrace:

at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867)

at net.minecraft.client.main.Main.main(SourceFile:148)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_60, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 649070256 bytes (619 MB) / 842530816 bytes (803 MB) up to 1908932608 bytes (1820 MB)

JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2G

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.05 FML v7.10.85.1235 Minecraft Forge 10.13.2.1235 Optifine OptiFine_1.7.10_HD_U_A4 89 mods loaded, 89 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed

FML{7.10.85.1235} [Forge Mod Loader] (forge-1.7.10-10.13.2.1235.jar) Unloaded->Constructed

Forge{10.13.2.1235} [Minecraft Forge] (forge-1.7.10-10.13.2.1235.jar) Unloaded->Constructed

accore{1.2.0} [AbyssalCraft Core] (AbyssalCraft-1.7.10-1.7.6.jar) Unloaded->Constructed

CodeChickenCore{1.0.2.9} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed

NotEnoughItems{1.0.2.15} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.2.15-universal.jar) Unloaded->Constructed

PlayerAPI{1.1} [Player API] (minecraft.jar) Unloaded->Constructed

malisiscore{1.7.10-0.9.7} [Malisis Core] (malisiscore-1.7.10-0.9.7.jar) Unloaded->Constructed

FamiliarsAPI{1.7.10} [Familiars API] (FamiliarsAPI-1.7.10.jar) Unloaded->Constructed

lucky{5.1.0} [Lucky Block] ([1-7-10]_Lucky_Block_v5-1-0.jar) Unloaded->Constructed

FLabsBF{4.1.2} [better Furnaces] ([1.7.10]Better_Furnaces_V4.1.2.jar) Unloaded->Constructed

DamageIndicatorsMod{3.2.0} [Damage Indicators] ([1.7.10]DamageIndicatorsMod-3.2.0.jar) Unloaded->Constructed

bspkrsCore{6.14} [bspkrsCore] ([1.7.10]bspkrsCore-universal-6.14.jar) Unloaded->Constructed

Treecapitator{1.7.2} [Treecapitator] ([1.7.2]Treecapitator-universal-2.0.3.jar) Unloaded->Constructed

abyssalcraft{1.7.6} [AbyssalCraft] (AbyssalCraft-1.7.10-1.7.6.jar) Unloaded->Constructed

animalbikes{1.7.10} [Animal Bikes] (AnimalBikes_1.7.10.jar) Unloaded->Constructed

atum{0.6} [Atum] (Atum-1.7.10-0.6.30.jar) Unloaded->Constructed

Backpack{2.0.1} [backpack] (backpack-2.0.1-1.7.x.jar) Unloaded->Constructed

iChunUtil{4.0.0} [iChunUtil] (iChunUtil-4.0.0(2).jar) Unloaded->Constructed

BackTools{4.0.0} [backTools] (BackTools-4.0.0.jar) Unloaded->Constructed

BattleTowers{1.4.9} [battle Towers] (BattleTowers-1.7.10.jar) Unloaded->Constructed

betterstorage{0.10.3.115} [betterStorage] (BetterStorage-1.7.10-0.10.3.115.jar) Unloaded->Constructed

blocklings{1.2.0} [blocklings] (Blocklings-v1.2.0-MC1.7.10.jar) Unloaded->Constructed

kegare.caveworld{1.6.0} [Caveworld] (Caveworld_1.7.10-v1.6.0.jar) Unloaded->Constructed

BuildMod{v1.0} [build Mod] (CoroUtil-1.1.jar) Unloaded->Constructed

CoroAI{v1.0} [CoroAI] (CoroUtil-1.1.jar) Unloaded->Constructed

ExtendedRenderer{v1.0} [Extended Renderer] (CoroUtil-1.1.jar) Unloaded->Constructed

ConfigMod{v1.0} [Extended Mod Config] (CoroUtil-1.1.jar) Unloaded->Constructed

props{1.11} [Decocraft] (Decocraft-v1.11_1.7.10.jar) Unloaded->Constructed

DragonMounts{r41-1.7.10} [Dragon Mounts] (DragonMounts-r41-1.7.10.jar) Unloaded->Constructed

dungeonpack{1.7.10-1.0} [Dungeon Pack] (dungeonpack-1.7.10-1.0.jar) Unloaded->Constructed

DynamicLights{1.3.5} [Dynamic Lights] (DynamicLights-1.7.10.jar) Unloaded->Constructed

DynamicLights_onFire{1.0.4} [Dynamic Lights Burning Entity Module] (DynamicLights-1.7.10.jar) Unloaded->Constructed

DynamicLights_creepers{1.0.4} [Dynamic Lights Creeper Module] (DynamicLights-1.7.10.jar) Unloaded->Constructed

DynamicLights_dropItems{1.0.7} [Dynamic Lights EntityItem Module] (DynamicLights-1.7.10.jar) Unloaded->Constructed

DynamicLights_entityClasses{1.0.1} [Dynamic Lights Entity Light Module] (DynamicLights-1.7.10.jar) Unloaded->Constructed

DynamicLights_mobEquipment{1.0.5} [Dynamic Lights Mob Equipment Light Module] (DynamicLights-1.7.10.jar) Unloaded->Constructed

DynamicLights_flameArrows{1.0.0} [Dynamic Lights Fiery Arrows Light Module] (DynamicLights-1.7.10.jar) Unloaded->Constructed

DynamicLights_floodLights{1.0.1} [Dynamic Lights Flood Light] (DynamicLights-1.7.10.jar) Unloaded->Constructed

DynamicLights_otherPlayers{1.0.7} [Dynamic Lights OtherPlayers Light Module] (DynamicLights-1.7.10.jar) Unloaded->Constructed

DynamicLights_thePlayer{1.1.3} [Dynamic Lights Player Light Module] (DynamicLights-1.7.10.jar) Unloaded->Constructed

eplus{1.7.10-3.0.1} [Enchanting Plus] (EnchantingPlus-1.7.10-3.0.1.jar) Unloaded->Constructed

carystanley_extremefarming{1.0} [Extreme Farming] (extremefarming_mod-1.7.2-v1.3(1).jar) Unloaded->Constructed

extvil{1.7.10-2.0} [Extended_Villages] (extvil-1.7.10-2.0.jar) Unloaded->Constructed

DefaultMobPack{1.7.10} [DefaultMobPack] (FamiliarsDefaultMobPack-1.7.10.jar) Unloaded->Constructed

ExtendedFamPack{1.7.10} [ExtendedFamPack] (FamiliarsExtendedFamPack-1.7.10.jar) Unloaded->Constructed

HerobrineFamPack{1.7.10} [HerobrineFamPack] (FamiliarsHerobrineFamPack-1.7.10.jar) Unloaded->Constructed

farlanders{1.2b} [The Farlanders] (farlanders-1.7.10-v1.2b.jar) Unloaded->Constructed

F2L{1.7.10b} [Flesh2Leather] (Flesh2Lether [1.7.10b].jar) Unloaded->Constructed

planetguy_Gizmos{3.0} [Gizmos] (Gizmos-3.0.jar) Unloaded->Constructed

Hats{4.0.1} [Hats] (Hats-4.0.1(1).jar) Unloaded->Constructed

headcrumbs{1.2.6} [Headcrumbs] (Headcrumbs-1.2.6.jar) Unloaded->Constructed

HostileWorlds{0.41} [Hostile Worlds] (Hostile Worlds v0.41 Alpha Mod for MC v1.6.4.zip) Unloaded

InfernalMobs{1.5.7} [infernal Mobs] (InfernalMobs-1.7.10.jar) Unloaded

ItFellFromTheSky{4.0.0} [itFellFromTheSky] (ItFellFromTheSky-4.0.0.jar) Unloaded

ani_koto{v1.6} [Kingdoms of the Overworld Mod] (Kingdoms of the Overworld-1.7.10-1.6.jar) Unloaded

lycanitesmobs{1.10.3.0 - MC 1.7.10} [Lycanites Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

arcticmobs{1.10.3.0 - MC 1.7.10} [Lycanites Arctic Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

demonmobs{1.10.3.0 - MC 1.7.10} [Lycanites Demon Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

desertmobs{1.10.3.0 - MC 1.7.10} [Lycanites Desert Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

forestmobs{1.10.3.0 - MC 1.7.10} [Lycanites Forest Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

freshwatermobs{1.10.3.0 - MC 1.7.10} [Lycanites Freshwater Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

infernomobs{1.10.3.0 - MC 1.7.10} [Lycanites Inferno Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

junglemobs{1.10.3.0 - MC 1.7.10} [Lycanites Jungle Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

mountainmobs{1.10.3.0 - MC 1.7.10} [Lycanites Mountain Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

plainsmobs{1.10.3.0 - MC 1.7.10} [Lycanites Plains Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

saltwatermobs{1.10.3.0 - MC 1.7.10} [Lycanites Saltwater Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

shadowmobs{1.10.3.0 - MC 1.7.10} [Lycanites Shadow Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

swampmobs{1.10.3.0 - MC 1.7.10} [Lycanites Swamp Mobs] (LycanitesMobsComplete 1.10.3.0 [1.7.10].jar) Unloaded

more{4.0} [M-Ore mod] (M-Ore 4.0.jar) Unloaded

malisisdoors{1.7.10-1.1.4} [Malisis' Doors] (malisisdoors-1.7.10-1.1.4.jar) Unloaded

MobAmputation{4.0.0} [MobAmputation] (MobAmputation-4.0.0.jar) Unloaded

MobDismemberment{4.0.0} [MobDismemberment] (MobDismemberment-4.0.0.jar) Unloaded

modularpots{1.7.10.14} [Modular Flower Pots] (ModularPots-1.7.10.14.jar) Unloaded

Morph{0.9.1} [Morph] (Morph-Beta-0.9.1.jar) Unloaded

cfm{3.3.5} [§6MrCrayfish's Furniture Mod] (MrCrayfishFurnitureModv3.3.5(1.7.10).jar) Unloaded

pandorasbox{2.0.1} [Pandora's Box] (PandorasBox-2.0.1.jar) Unloaded

ParticleMan{v1.0} [Particle Man] (ParticleMan-1.0.jar) Unloaded

gibby_pun{1.5} [The Ultimate Pun Mod!] (PunMod 1.7.10-1.5.2.jar) Unloaded

rivalrebels{1.7.10A} [Rival Rebels] (rivalrebels-1.7.10A.jar) Unloaded

AS_Ruins{13.8} [Ruins Spawning System] (Ruins-1.7.10.jar) Unloaded

SpecialMobs{3.0.2} [special Mobs] (SpecialMobs-1.7.10-3.0.2.jar) Unloaded

telepads{1.6.4 v5} [Teleportation Pads] (Telepads-1.7.2_1.7.jar) Unloaded

Torched{4.0.0} [Torched] (Torched-4.0.0.jar) Unloaded

TwilightForest{2.3.2} [The Twilight Forest] (twilightforest-1.7.10-2.3.2(1).jar) Unloaded

AS_UpdateCheck{1.1.6} [AtomicStryker Update Check Mod] (UpdateCheckerMod-1.7.10.jar) Unloaded

weather2{v2.3.6} [weather2] (Weather-2.3.6.jar) Unloaded

nolpfij_wildycraft{1.5.10} [Wildycraft] (wildycraft-1.7.2-1.5.10(1).jar) Unloaded

voxelmap{1.7.10} [VoxelMap No Radar] (Zans-MinimapNoRadar-Mod-1.7.10(1).jar) Unloaded

Launched Version: 1.7.10-Forge10.13.2.1235

LWJGL: 2.9.1

OpenGL: AMD Radeon HD 7900 Series GL version 4.2.11733 Compatibility Profile Context, ATI Technologies Inc.

GL Caps: Using GL 1.3 multitexturing.

Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.

Anisotropic filtering is supported and maximum anisotropy is 16.

Shaders are available because OpenGL 2.1 is supported.

 

Is Modded: Definitely; Client brand changed to 'fml,forge'

Type: Client (map_client.txt)

Resource Packs: [dnik008 x64 v1.0 (3).zip, Slip's Pack.zip]

Current Language: English (US)

Profiler Position: N/A (disabled)

Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Anisotropic Filtering: Off (1)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • KILAT77 : Waspada Situs Scam dengan Withdraw Yang Tidak Dibayar Di era digital saat ini, banyak orang yang mencari keberuntungan melalui situs perjudian online. Namun, dibalik gemerlap janji-janji manis kemenangan, ada bahaya yang mengintai. Salah satu situs yang patut diwaspadai adalah KILAT77. Situs ini mendapat reputasi buruk karena banyak laporan dari pengguna yang mengklaim bahwa mereka tidak bisa menarik dana kemenangan mereka. Dalam artikel ini, kita akan membahas mengapa ROTER88 dianggap sebagai situs scam dan bagaimana Anda bisa melindungi diri dari penipuan serupa. Pengalaman Pengguna: Penarikan Tidak Dibayar Beberapa pengguna telah melaporkan pengalaman buruk mereka dengan KILAT77. Mereka mengaku bahwa setelah memenangkan sejumlah uang dan mencoba menariknya, proses penarikan mereka ditolak tanpa alasan yang jelas. Bahkan, beberapa pengguna melaporkan bahwa akun mereka tiba-tiba diblokir setelah mencoba melakukan penarikan, sehingga mereka kehilangan akses ke dana mereka sama sekali.
    • It is a dupe mod issue Remove Rubidium - you are already using Embeddium which is a fork of Rubidium
    • I made a block entity in forge 1.20.1, I want to prevent hopper from taking input slot item, i tried to override the extractItem method, it prevented hopper from taking input slot item, but the player also unable to take/change the item in input slot unless the slot is empty. public class FluidSeparatorBlockEntity extends BlockEntity implements MenuProvider { private static final int INPUT_SLOT = 0; private final CustomItemHandler itemHandler = new CustomItemHandler(3){ @Override protected void onContentsChanged(int slot) { setChanged(); } @Override public boolean isItemValid(int slot, @NotNull ItemStack stack) { return slot == INPUT_SLOT; } @Override public @NotNull ItemStack extractItem(int slot, int amount, boolean simulate) { if (slot == INPUT_SLOT) { return ItemStack.EMPTY; } return super.extractItem(slot, amount, simulate); } }; private LazyOptional<IItemHandler> lazyItemHandler = LazyOptional.empty(); protected final ContainerData data; private int progress = 0; private int maxProgress = 78; public FluidSeparatorBlockEntity(BlockPos pPos, BlockState pBlockState) { super(ModBlockEntities.FLUID_SEPARATOR_BE.get(), pPos, pBlockState); this.data = new ContainerData() { @Override public int get(int pIndex) { return switch (pIndex) { case 0 -> FluidSeparatorBlockEntity.this.progress; case 1, 2 -> FluidSeparatorBlockEntity.this.maxProgress; default -> 0; }; } @Override public void set(int pIndex, int pValue) { switch (pIndex) { case 0 -> FluidSeparatorBlockEntity.this.progress = pValue; case 1, 2 -> FluidSeparatorBlockEntity.this.maxProgress = pValue; } } @Override public int getCount() { return 3; } }; } @Override public @NotNull <T> LazyOptional<T> getCapability(@NotNull Capability<T> cap, @Nullable Direction side) { if(cap == ForgeCapabilities.ITEM_HANDLER) { return lazyItemHandler.cast(); } return super.getCapability(cap, side); } @Override public void onLoad() { super.onLoad(); lazyItemHandler = LazyOptional.of(() -> itemHandler); } @Override public void invalidateCaps() { super.invalidateCaps(); lazyItemHandler.invalidate(); } public void drops() { SimpleContainer inventory = new SimpleContainer(itemHandler.getSlots()); for(int i = 0; i < itemHandler.getSlots(); i++) { inventory.setItem(i, itemHandler.getStackInSlot(i)); } Containers.dropContents(this.level, this.worldPosition, inventory); } @Override public Component getDisplayName() { return Component.translatable("block.chemmaster.fluid_separator"); } @Nullable @Override public AbstractContainerMenu createMenu(int pContainerId, Inventory pPlayerInventory, Player pPlayer) { return new FluidSeparatorMenu(pContainerId, pPlayerInventory, this, this.data); } @Override protected void saveAdditional(CompoundTag pTag) { pTag.put("inventory", itemHandler.serializeNBT()); pTag.putInt("fluid_separator.progress", progress); super.saveAdditional(pTag); } @Override public void load(CompoundTag pTag) { super.load(pTag); itemHandler.deserializeNBT(pTag.getCompound("inventory")); progress = pTag.getInt("fluid_separator.progress"); } public void tick(Level pLevel, BlockPos pPos, BlockState pState) { ItemStack inputStack = this.itemHandler.getStackInSlot(INPUT_SLOT); if (inputStack.getCount() < 2) { resetProgress(); return; } if(hasRecipe()) { increaseCraftingProgress(); setChanged(pLevel, pPos, pState); if(hasProgressFinished()) { craftItem(); resetProgress(); } } else { resetProgress(); } } private void resetProgress() { progress = 0; } private void craftItem() { Optional<FluidSeparatingRecipe> recipe = getCurrentRecipe(); if (recipe.isPresent()) { List<ItemStack> results = recipe.get().getOutputs(); ItemStack inputStack = this.itemHandler.getStackInSlot(INPUT_SLOT); if (inputStack.getCount() < 2) { // If there are not enough items, do not proceed with crafting return; } // Extract the input item from the input slot this.itemHandler.internalExtractItem(INPUT_SLOT, 2, false); // Loop through each result item and find suitable output slots for (ItemStack result : results) { int outputSlot = findSuitableOutputSlot(result); if (outputSlot != -1) { this.itemHandler.setStackInSlot(outputSlot, new ItemStack(result.getItem(), this.itemHandler.getStackInSlot(outputSlot).getCount() + result.getCount())); } else { // Handle the case where no suitable output slot is found // This can be logging an error, throwing an exception, or any other handling logic System.err.println("No suitable output slot found for item: " + result); } } } } private int findSuitableOutputSlot(ItemStack result) { // Implement logic to find a suitable output slot for the given result // Return the slot index or -1 if no suitable slot is found for (int i = 0; i < this.itemHandler.getSlots(); i++) { // Ensure we do not place the output item in the input slot if (i == INPUT_SLOT) { continue; } ItemStack stackInSlot = this.itemHandler.getStackInSlot(i); if (stackInSlot.isEmpty() || (stackInSlot.getItem() == result.getItem() && stackInSlot.getCount() + result.getCount() <= stackInSlot.getMaxStackSize())) { return i; } } return -1; } private boolean hasRecipe() { Optional<FluidSeparatingRecipe> recipe = getCurrentRecipe(); if (recipe.isEmpty()) { return false; } List<ItemStack> results = recipe.get().getOutputs(); for (ItemStack result : results) { if (!canInsertAmountIntoOutputSlot(result) || !canInsertItemIntoOutputSlot(result.getItem())) { return false; } } return true; } private Optional<FluidSeparatingRecipe> getCurrentRecipe(){ SimpleContainer inventory = new SimpleContainer(this.itemHandler.getSlots()); for (int i = 0; i < itemHandler.getSlots(); i++) { inventory.setItem(i, this.itemHandler.getStackInSlot(i)); } return this.level.getRecipeManager().getRecipeFor(FluidSeparatingRecipe.Type.INSTANCE, inventory, level); } private boolean canInsertAmountIntoOutputSlot(ItemStack result) { for (int i = 1; i < this.itemHandler.getSlots(); i++) { ItemStack stackInSlot = this.itemHandler.getStackInSlot(i); if (stackInSlot.isEmpty() || (stackInSlot.getItem() == result.getItem() && stackInSlot.getCount() + result.getCount() <= stackInSlot.getMaxStackSize())) { return true; } } return false; } private boolean canInsertItemIntoOutputSlot(Item item) { for (int i = 1; i < this.itemHandler.getSlots(); i++) { ItemStack stackInSlot = this.itemHandler.getStackInSlot(i); if (stackInSlot.isEmpty() || stackInSlot.getItem() == item) { return true; } } return false; } private boolean hasProgressFinished() { return progress >= maxProgress; } private void increaseCraftingProgress() { progress++; } }  
    • No dice. Unfortunately this fix didn't work, thank you though.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.