Jump to content

Minecraft crashes when I join a forge server.


tydaha

Recommended Posts

I made a forge server and added the same mods that my forge client has. The server and client are both 1.6.4. Please help. Here is my Crash Report

 

---- Minecraft Crash Report ----

// You're mean.

 

Time: 1/19/14 9:20 AM

Description: Unexpected error

 

java.lang.NullPointerException

at jsut.amm.TickHandler.onTickInGame(TickHandler.java:37)

at jsut.amm.TickHandler.tickEnd(TickHandler.java:30)

at cpw.mods.fml.common.SingleIntervalHandler.tickEnd(SingleIntervalHandler.java:34)

at cpw.mods.fml.common.FMLCommonHandler.tickEnd(FMLCommonHandler.java:141)

at cpw.mods.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:367)

at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1970)

at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:910)

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

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

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:131)

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

 

 

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

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

 

-- Head --

Stacktrace:

at jsut.amm.TickHandler.onTickInGame(TickHandler.java:37)

at jsut.amm.TickHandler.tickEnd(TickHandler.java:30)

at cpw.mods.fml.common.SingleIntervalHandler.tickEnd(SingleIntervalHandler.java:34)

at cpw.mods.fml.common.FMLCommonHandler.tickEnd(FMLCommonHandler.java:141)

at cpw.mods.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:367)

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['eviltyler2'/306, l='MpServer', x=305.03, y=91.62, z=237.96]]

Chunk stats: MultiplayerChunkCache: 115

Level seed: 0

Level generator: ID 00 - default, ver 1. Features enabled: false

Level generator options:

Level spawn location: World: (256,64,256), Chunk: (at 0,4,0 in 16,16; contains blocks 256,0,256 to 271,255,271), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)

Level time: 59651 game time, 59651 day time

Level dimension: 0

Level storage version: 0x00000 - Unknown?

Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)

Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false

Forced entities: 111 total; [EntityClientPlayerMP['eviltyler2'/306, l='MpServer', x=305.03, y=91.62, z=237.96], EntityCreeper['Creeper'/258, l='MpServer', x=373.50, y=45.00, z=234.50], EntityCreeper['Creeper'/259, l='MpServer', x=373.50, y=45.00, z=235.50], EntityBat['Bat'/256, l='MpServer', x=376.75, y=35.10, z=237.75], EntityCreeper['Creeper'/257, l='MpServer', x=372.59, y=43.00, z=227.94], EntityZombie['Zombie'/262, l='MpServer', x=383.16, y=45.00, z=226.13], EntityCreeper['Creeper'/263, l='MpServer', x=377.00, y=57.00, z=227.59], EntityCreeper['Creeper'/260, l='MpServer', x=378.03, y=45.00, z=233.41], EntityCreeper['Creeper'/261, l='MpServer', x=373.50, y=45.00, z=236.50], EntityBat['Bat'/264, l='MpServer', x=368.25, y=37.10, z=259.25], EntityPig['Pig'/265, l='MpServer', x=384.66, y=68.00, z=182.13], EntityCow['Cow'/127, l='MpServer', x=233.47, y=63.00, z=282.75], EntityBat['Bat'/126, l='MpServer', x=257.36, y=17.26, z=252.43], EntityZombie['Zombie'/124, l='MpServer', x=235.03, y=35.00, z=225.53], EntityBat['Bat'/123, l='MpServer', x=228.25, y=35.10, z=229.34], EntityChicken['Chicken'/122, l='MpServer', x=238.59, y=69.00, z=223.47], EntityChicken['Chicken'/121, l='MpServer', x=235.56, y=71.00, z=221.47], EntityChicken['Chicken'/137, l='MpServer', x=252.53, y=77.00, z=230.41], EntityChicken['Chicken'/136, l='MpServer', x=239.56, y=72.00, z=226.38], EntityCreeper['Creeper'/139, l='MpServer', x=242.38, y=42.00, z=245.00], EntityZombie['Zombie'/138, l='MpServer', x=253.13, y=36.00, z=243.31], EntityChicken['Chicken'/141, l='MpServer', x=249.53, y=63.00, z=274.53], EntitySkeleton['Skeleton'/140, l='MpServer', x=247.50, y=78.00, z=260.13], EntityZombie['Zombie'/143, l='MpServer', x=252.75, y=24.00, z=297.72], EntityCow['Cow'/142, l='MpServer', x=254.66, y=63.00, z=276.50], EntityCreeper['Creeper'/129, l='MpServer', x=235.50, y=20.00, z=302.03], EntityZombie['Zombie'/128, l='MpServer', x=236.16, y=19.00, z=300.44], EntityChicken['Chicken'/135, l='MpServer', x=254.59, y=73.00, z=195.44], EntityChicken['Chicken'/134, l='MpServer', x=240.53, y=70.00, z=207.59], EntityBat['Bat'/155, l='MpServer', x=277.75, y=45.10, z=169.56], EntityZombie['Zombie'/156, l='MpServer', x=286.50, y=43.00, z=166.50], EntityBat['Bat'/157, l='MpServer', x=274.69, y=46.10, z=173.94], EntityCreeper['Creeper'/158, l='MpServer', x=283.44, y=44.00, z=168.03], EntityCreeper['Creeper'/159, l='MpServer', x=276.69, y=44.00, z=174.44], EntityCreeper['Creeper'/144, l='MpServer', x=250.50, y=24.00, z=298.03], EntityChicken['Chicken'/145, l='MpServer', x=263.63, y=63.00, z=187.53], EntityChicken['Chicken'/146, l='MpServer', x=260.63, y=63.00, z=190.44], EntityChicken['Chicken'/147, l='MpServer', x=263.47, y=72.00, z=200.47], EntityCreeper['Creeper'/148, l='MpServer', x=269.38, y=28.00, z=304.03], EntityCreeper['Creeper'/169, l='MpServer', x=273.50, y=65.00, z=304.50], EntitySquid['Squid'/175, l='MpServer', x=293.50, y=60.38, z=176.81], EntitySkeleton['Skeleton'/174, l='MpServer', x=302.47, y=67.00, z=160.06], EntityChicken['Chicken'/163, l='MpServer', x=277.53, y=76.00, z=215.53], EntityChicken['Chicken'/162, l='MpServer', x=279.91, y=63.00, z=185.84], EntityCreeper['Creeper'/161, l='MpServer', x=271.91, y=43.00, z=177.25], EntityCreeper['Creeper'/160, l='MpServer', x=274.31, y=43.00, z=174.59], EntityCreeper['Creeper'/167, l='MpServer', x=279.66, y=22.00, z=312.00], EntityCreeper['Creeper'/166, l='MpServer', x=277.50, y=22.00, z=317.03], EntityZombie['Zombie'/165, l='MpServer', x=278.59, y=12.00, z=316.94], EntityItem['item.item.rottenFlesh'/164, l='MpServer', x=287.38, y=79.13, z=271.06], EntitySquid['Squid'/187, l='MpServer', x=312.47, y=60.34, z=189.66], EntitySkeleton['Skeleton'/190, l='MpServer', x=298.53, y=26.00, z=248.94], EntityBat['Bat'/191, l='MpServer', x=311.75, y=31.10, z=250.75], EntityChicken['Chicken'/188, l='MpServer', x=309.56, y=85.00, z=237.44], EntitySkeleton['Skeleton'/189, l='MpServer', x=311.06, y=29.00, z=245.50], EntityBat['Bat'/178, l='MpServer', x=300.83, y=26.78, z=249.25], EntityChicken['Chicken'/179, l='MpServer', x=289.63, y=80.00, z=269.38], EntitySquid['Squid'/176, l='MpServer', x=304.50, y=60.00, z=174.50], EntityChicken['Chicken'/177, l='MpServer', x=296.38, y=84.00, z=239.44], EntityChicken['Chicken'/205, l='MpServer', x=321.59, y=81.00, z=251.53], EntityChicken['Chicken'/204, l='MpServer', x=321.47, y=81.00, z=253.44], EntityBat['Bat'/207, l='MpServer', x=329.78, y=29.55, z=267.70], EntityCreeper['Creeper'/206, l='MpServer', x=322.50, y=30.00, z=265.50], EntityCreeper['Creeper'/201, l='MpServer', x=325.31, y=34.00, z=252.50], EntityChicken['Chicken'/200, l='MpServer', x=335.53, y=80.00, z=236.31], EntityCreeper['Creeper'/203, l='MpServer', x=321.50, y=33.00, z=250.50], EntityCreeper['Creeper'/202, l='MpServer', x=321.38, y=34.00, z=248.97], EntitySkeleton['Skeleton'/196, l='MpServer', x=309.03, y=50.00, z=271.50], EntitySkeleton['Skeleton'/199, l='MpServer', x=331.91, y=44.00, z=217.50], EntityZombie['Zombie'/193, l='MpServer', x=314.47, y=30.00, z=263.03], EntityChicken['Chicken'/192, l='MpServer', x=320.47, y=81.00, z=253.44], EntitySkeleton['Skeleton'/195, l='MpServer', x=310.50, y=29.00, z=258.09], EntityBat['Bat'/194, l='MpServer', x=313.69, y=30.10, z=258.25], EntitySkeleton['Skeleton'/220, l='MpServer', x=343.09, y=44.00, z=221.47], EntitySkeleton['Skeleton'/221, l='MpServer', x=344.50, y=44.00, z=216.50], EntitySkeleton['Skeleton'/222, l='MpServer', x=349.31, y=35.05, z=217.31], EntityCreeper['Creeper'/223, l='MpServer', x=347.97, y=57.00, z=222.44], EntityZombie['Zombie'/219, l='MpServer', x=345.91, y=44.00, z=217.47], EntityCreeper['Creeper'/208, l='MpServer', x=334.00, y=45.00, z=257.56], EntityChicken['Chicken'/209, l='MpServer', x=324.63, y=81.00, z=258.44], EntityBat['Bat'/210, l='MpServer', x=304.75, y=49.34, z=267.47], EntityZombie['Zombie'/211, l='MpServer', x=320.25, y=17.00, z=313.56], EntityBat['Bat'/239, l='MpServer', x=360.75, y=39.10, z=245.75], EntityBat['Bat'/238, l='MpServer', x=370.69, y=29.06, z=223.46], EntitySkeleton['Skeleton'/237, l='MpServer', x=365.50, y=29.00, z=227.50], EntityChicken['Chicken'/236, l='MpServer', x=360.53, y=70.00, z=202.41], EntitySkeleton['Skeleton'/233, l='MpServer', x=346.84, y=58.00, z=300.53], EntityCreeper['Creeper'/232, l='MpServer', x=349.50, y=29.00, z=297.50], EntitySkeleton['Skeleton'/231, l='MpServer', x=341.50, y=29.00, z=294.50], EntitySkeleton['Skeleton'/230, l='MpServer', x=341.50, y=29.00, z=302.50], EntityChicken['Chicken'/229, l='MpServer', x=348.47, y=72.00, z=279.38], EntityZombie['Zombie'/228, l='MpServer', x=330.59, y=28.00, z=269.91], EntityChicken['Chicken'/227, l='MpServer', x=343.44, y=83.00, z=247.41], EntityZombie['Zombie'/226, l='MpServer', x=337.41, y=50.00, z=254.94], EntityChicken['Chicken'/225, l='MpServer', x=337.47, y=81.00, z=225.66], EntityChicken['Chicken'/224, l='MpServer', x=339.34, y=80.00, z=218.34], EntitySkeleton['Skeleton'/254, l='MpServer', x=380.31, y=45.00, z=234.69], EntityCreeper['Creeper'/255, l='MpServer', x=380.69, y=45.00, z=233.84], EntitySkeleton['Skeleton'/252, l='MpServer', x=368.09, y=28.00, z=223.44], EntitySkeleton['Skeleton'/253, l='MpServer', x=368.50, y=32.00, z=211.09], EntityChicken['Chicken'/250, l='MpServer', x=361.56, y=68.00, z=193.44], EntityChicken['Chicken'/251, l='MpServer', x=376.44, y=69.00, z=199.59], EntityChicken['Chicken'/248, l='MpServer', x=352.28, y=76.00, z=296.53], EntityChicken['Chicken'/246, l='MpServer', x=355.59, y=71.00, z=286.56], EntityChicken['Chicken'/247, l='MpServer', x=364.41, y=72.00, z=296.56], EntityBat['Bat'/244, l='MpServer', x=364.12, y=34.00, z=263.06], EntityChicken['Chicken'/245, l='MpServer', x=352.38, y=80.00, z=266.47], EntityChicken['Chicken'/242, l='MpServer', x=352.53, y=82.00, z=240.59], EntitySkeleton['Skeleton'/243, l='MpServer', x=366.50, y=35.00, z=259.88], EntityCreeper['Creeper'/240, l='MpServer', x=358.56, y=41.00, z=255.00], EntityBat['Bat'/241, l='MpServer', x=362.41, y=42.10, z=254.75]]

Retry entities: 0 total; []

Server brand: vanilla

Server type: Non-integrated multiplayer server

Stacktrace:

at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:440)

at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2312)

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

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

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:131)

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

 

-- System Details --

Details:

Minecraft Version: 1.6.4

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_51, Oracle Corporation

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

Memory: 912931568 bytes (870 MB) / 1102053376 bytes (1051 MB) up to 2863661056 bytes (2731 MB)

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

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

Suspicious classes: FML and Forge are installed

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

FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 Optifine OptiFine_1.6.4_HD_U_C8 21 mods loaded, 21 mods active

mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

FML{6.4.49.965} [Forge Mod Loader] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

Forge{9.11.1.965} [Minecraft Forge] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

CodeChickenCore{0.9.0.7} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

NotEnoughItems{1.6.1.8} [Not Enough Items] (NotEnoughItems 1.6.1.8.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

PlayerAPI{1.2} [Player API] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

DamageIndicatorsMod{2.9.2.3} [Damage Indicators] (1.6.4 DamageIndicatorsv2.9.2.3.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

battlegear2{1.0.4.6} [Mine & Blade Battlegear 2 - Bullseye] (1.6.4-MB_Battlegear2-Bullseye-1.0.4.6.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

amm{2.2} [ArmorMovementMod] (ArmorMovement 1.6.4.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

Backpack{1.26.29} [backpack] (backpack-1.26.29-1.6.x.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

BiblioCraft{1.5.4} [biblioCraft] (BiblioCraft[v1.5.4].zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

CampCraft{@VERSION@} [CampCraft Base] (CampCraftBase v4.6.4 v1.6.4.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

CampCraftTents{@VERSION@} [CampCraft Tents] (CampCraftTents v4.6.5 v1.6.4.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

CopiousDogs{alpha-1.1.2} [Copious Dogs] (copious-dogs-alpha-1.1.2.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

golemworld{@VERSION@} [Golem World] (GolemWorld.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

inventorytweaks{1.56} [inventory Tweaks] (InventoryTweaks-MC1.6.2-1.56-b77.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

lucky{4.2.1} [Lucky Block] (LuckyBlock_v4.2.1_1.6.4.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

bau5_ProjectBench{1.8.0} [Project Bench] (ProjectBench-1.6.2-v1.8.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

mod_SmartMoving{14.5} [smart Moving] (Smart Moving Universal for ModLoader or Minecraft Forge or MCPC+.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

mod_SmartRender{1.1} [smart Render] (Smart Moving Universal for ModLoader or Minecraft Forge or MCPC+.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

mod_ZanMinimap{0.9.4} [Zan's Minimap] (ZansMinimap1.6.4.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available

Launched Version: 1.6.4-Forge9.11.1.965

LWJGL: 2.9.0

OpenGL: Intel® HD Graphics Family GL version 3.0.0 - Build 8.15.10.2353, Intel

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

Type: Client (map_client.txt)

Resource Pack: Default

Current Language: English (US)

Profiler Position: N/A (disabled)

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

Link to comment
Share on other sites

1. Use Spoilers.

2. I think this is a wrong section?

3. Post Server Crash log to see if there is also problem with server. (remember - 1.)

4. BattleGear and SmartMoving are not render-compatybile. (just sayin')

5. Does your Single Player work?

6. Try re-adding mods one after another on both client and server and test it before you add next, you will find you issue.

7. Also: Reinstall your whole client, forge and server if you havent done it alredy :o

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

1. I don't know how.

2. I don't think it is because I posted the entire crash log

3. The server didn't crash so there is no server crash log.

4. I don't know what that means.

5. Yes, single player works well.

6. Will do.

7. All ready tried that.

Thanks for the feedback. I'll tell you if it works tomorrow. :-)

Link to comment
Share on other sites

1 This is how to use spoilers


[spoiler]
Text goes here
[/spoiler]

This is the spoiler in the code section

 

 

Text goes here

 

 

 

2. This is the wrong section because it is here MODDERS(Those who makes mods) ask for help, you should posted this on the Armor Movement Mod's topic on the minecraftfourms.

 

3. I think this thread should be locked just sayin' cuz of 1.Wrong section 2. No use of spoiler

 

And any Moderator please don't ban me because of me sayin my oppinion's!

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

    • Considering the financial revolution sparked by cryptocurrencies like Bitcoin, the digital era has opened up a plethora of opportunities. But this exciting new world also comes with a terrible reality: in the harsh, brutal blockchain environment, there's always a danger you could lose your precious digital assets. Services like ADWARE RECOVERY SPECIALIST are not merely recovery agents in this case; they are crypto lifelines, and my own experience attests to their vital importance. I had an amazing time exploring the world of Bitcoin on my own; it was exciting to be in a completely new place and to see the possibility of independent money. However, a careless mistake of choosing the incorrect platform for my investment sent me into total despair. It seemed as though my digital lifeblood, Bitcoin, had been devoured by the blockchain's vicious maw. Overwhelmed with hope, I began a frantic quest for solutions, looking up any clue of assistance on the internet. I discovered  ADWARE RECOVERY SPECIALIST at that point.  Initially, I was filled with misgivings, but their unwavering professionalism and clear communication offered me a glimpse of hope. I set them the very impossible task of locating my missing fortune. The ADWARE RECOVERY SPECIALIST team of professionals meticulously penetrated the labyrinthine depths of the blockchain with the aid of cutting-edge technology and years of honed experience, treating my case with the utmost care and respect and keeping me informed at every turn. I had never encountered anything like the recuperation process. The days of confusing technical jargon and excruciatingly long wait times were over. And then the miraculous happened. My Bitcoin miraculously reappeared in my wallet, coming safe and sound from the digital void in an almost amazing length of time. Integrating  ADWARE RECOVERY SPECIALIST into your Bitcoin recovery process is not as magical as waving a wand, but it sure feels like it with the seamless and effective tools it offers. By following best practices, training your staff, and learning from successful case studies, you can optimize your Bitcoin recovery efforts and stay ahead of potential risks. The future outlook for Bitcoin recovery with ADWARE RECOVERY SPECIALIST looks promising, providing users with the confidence and tools they need to navigate the ever-evolving landscape of digital assets. It was a very happy moment that showcased the ADWARE RECOVERY SPECIALIST team's remarkable talent and dedication. However, my experience serves more purposes than just self-interest; it serves as a sobering reminder of the expanding demand for dependable and trustworthy bitcoin recovery services, such as ADWARE online recovery.
    • Quick-Books is great with regards to coordinating your monetary data. You can decide to live talk with a specialist at Quick-Books to get the answer for your questions. You will actually want to get to the talk going to the landing page and call us +1855-210-1428.
    • Update: I managed to make the item not disappear after crafting, but it doesn't remove any durability. import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.Enchantments; import net.minecraft.enchantment.UnbreakingEnchantment; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class NuggetHammer extends Item { private boolean damage; public NuggetHammer(Properties p_i48487_1_) { super(p_i48487_1_); } @Override public int getMaxDamage(ItemStack stack) { return 54 - 1; } public boolean isBarVisible(ItemStack stack) { return false; } @Override public ItemStack getContainerItem(ItemStack stack) { ItemStack copy = stack.copy(); copy.setCount(1); if (!this.damage) return copy; int unbreaking = EnchantmentHelper.getItemEnchantmentLevel(Enchantments.UNBREAKING, stack); for (int i = 0; i < unbreaking; i++) { if (UnbreakingEnchantment.shouldIgnoreDurabilityDrop(stack, unbreaking, random)) return copy; } copy.setDamageValue(stack.getDamageValue() + 1); if (copy.getDamageValue() > stack.getMaxDamage()) return ItemStack.EMPTY; return copy; } }  
  • Topics

×
×
  • Create New...

Important Information

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