Jump to content

Recommended Posts

Posted

I use LivingAttackEvent and ExtendedPlayer implements by IExtendedEntityProperties.

 

        @SubscribeEvent
public void onEvent(LivingAttackEvent event){
	if(event.entity instanceof EntityPlayer){
		EntityPlayer ishit = (EntityPlayer)event.source.getEntity();
		ExtendedPlayer player = ExtendedPlayer.get(ishit);

		EntityPlayer isDeath = (EntityPlayer)event.entity;
		ExtendedPlayer player2 = ExtendedPlayer.get(isDeath);

		if(player.getTeam() != 0 && player.getTeam() == player2.getTeam()){
			event.setCanceled(true);
		}
	}
}

 

And I use hitEntity in sword by spawn EntityLightningBolt while hit.

 

     public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase,    EntityLivingBase par3EntityLivingBase)
    {
	World world = par2EntityLivingBase.worldObj;
	EntityLightningBolt lightningBolt = new EntityLightningBolt(world, par2EntityLivingBase.posX, par2EntityLivingBase.posY, par2EntityLivingBase.posZ);
	par1ItemStack.damageItem(1, par3EntityLivingBase);
	world.spawnEntityInWorld(lightningBolt);
	world.addWeatherEffect(lightningBolt);
	return true;
    }

 

And this is log Error.

 

[12:56:04] [server thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.entity.living.LivingAttackEvent@1aa2040:

java.lang.NullPointerException

at OnerGamer.Entity.Player.ExtendedPlayer.get(ExtendedPlayer.java:77) ~[ExtendedPlayer.class:?]

at OnerGamer.Register.Event.onEvent(Event.java:76) ~[Event.class:?]

at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_Event_onEvent_LivingAttackEvent.invoke(.dynamic) ~[?:?]

at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]

at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) [EventBus.class:?]

at net.minecraftforge.common.ForgeHooks.onLivingAttack(ForgeHooks.java:294) [ForgeHooks.class:?]

at net.minecraft.entity.player.EntityPlayer.attackEntityFrom(EntityPlayer.java:1105) [EntityPlayer.class:?]

at net.minecraft.entity.player.EntityPlayerMP.attackEntityFrom(EntityPlayerMP.java:532) [EntityPlayerMP.class:?]

at net.minecraft.entity.Entity.dealFireDamage(Entity.java:1042) [Entity.class:?]

at net.minecraft.entity.Entity.onStruckByLightning(Entity.java:2159) [Entity.class:?]

at net.minecraft.entity.effect.EntityLightningBolt.onUpdate(EntityLightningBolt.java:112) [EntityLightningBolt.class:?]

at net.minecraft.world.World.updateEntities(World.java:2029) [World.class:?]

at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) [WorldServer.class:?]

at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) [MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?]

at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [integratedServer.class:?]

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]

[12:56:04] [server thread/ERROR] [FML]: Index: 1 Listeners:

[12:56:04] [server thread/ERROR] [FML]: 0: NORMAL

[12:56:04] [server thread/ERROR] [FML]: 1: ASM: OnerGamer.Register.Event@1ffa60 onEvent(Lnet/minecraftforge/event/entity/living/LivingAttackEvent;)V

[12:56:04] [server thread/ERROR]: Encountered an unexpected exception

net.minecraft.util.ReportedException: Ticking entity

at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:709) ~[MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) ~[MinecraftServer.class:?]

at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[integratedServer.class:?]

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]

Caused by: java.lang.NullPointerException

at OnerGamer.Entity.Player.ExtendedPlayer.get(ExtendedPlayer.java:77) ~[ExtendedPlayer.class:?]

at OnerGamer.Register.Event.onEvent(Event.java:76) ~[Event.class:?]

at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_Event_onEvent_LivingAttackEvent.invoke(.dynamic) ~[?:?]

at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]

at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) ~[EventBus.class:?]

at net.minecraftforge.common.ForgeHooks.onLivingAttack(ForgeHooks.java:294) ~[ForgeHooks.class:?]

at net.minecraft.entity.player.EntityPlayer.attackEntityFrom(EntityPlayer.java:1105) ~[EntityPlayer.class:?]

at net.minecraft.entity.player.EntityPlayerMP.attackEntityFrom(EntityPlayerMP.java:532) ~[EntityPlayerMP.class:?]

at net.minecraft.entity.Entity.dealFireDamage(Entity.java:1042) ~[Entity.class:?]

at net.minecraft.entity.Entity.onStruckByLightning(Entity.java:2159) ~[Entity.class:?]

at net.minecraft.entity.effect.EntityLightningBolt.onUpdate(EntityLightningBolt.java:112) ~[EntityLightningBolt.class:?]

at net.minecraft.world.World.updateEntities(World.java:2029) ~[World.class:?]

at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) ~[WorldServer.class:?]

at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) ~[MinecraftServer.class:?]

... 4 more

[12:56:04] [server thread/ERROR]: This crash report has been saved to: D:\Project\minecraft\mcp\Moba\eclipse\.\crash-reports\crash-2016-09-29_12.56.04-server.txt

[12:56:04] [server thread/INFO]: Stopping server

[12:56:04] [server thread/INFO]: Saving players

[12:56:04] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----

// I blame Dinnerbone.

 

Time: 9/29/16 12:56 PM

Description: Ticking entity

 

java.lang.NullPointerException: Ticking entity

at OnerGamer.Entity.Player.ExtendedPlayer.get(ExtendedPlayer.java:77)

at OnerGamer.Register.Event.onEvent(Event.java:76)

at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_Event_onEvent_LivingAttackEvent.invoke(.dynamic)

at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)

at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)

at net.minecraftforge.common.ForgeHooks.onLivingAttack(ForgeHooks.java:294)

at net.minecraft.entity.player.EntityPlayer.attackEntityFrom(EntityPlayer.java:1105)

at net.minecraft.entity.player.EntityPlayerMP.attackEntityFrom(EntityPlayerMP.java:532)

at net.minecraft.entity.Entity.dealFireDamage(Entity.java:1042)

at net.minecraft.entity.Entity.onStruckByLightning(Entity.java:2159)

at net.minecraft.entity.effect.EntityLightningBolt.onUpdate(EntityLightningBolt.java:112)

at net.minecraft.world.World.updateEntities(World.java:2029)

at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515)

at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703)

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)

at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

 

 

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

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

 

-- Head --

Stacktrace:

at OnerGamer.Entity.Player.ExtendedPlayer.get(ExtendedPlayer.java:77)

at OnerGamer.Register.Event.onEvent(Event.java:76)

at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_Event_onEvent_LivingAttackEvent.invoke(.dynamic)

at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)

at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)

at net.minecraftforge.common.ForgeHooks.onLivingAttack(ForgeHooks.java:294)

at net.minecraft.entity.player.EntityPlayer.attackEntityFrom(EntityPlayer.java:1105)

at net.minecraft.entity.player.EntityPlayerMP.attackEntityFrom(EntityPlayerMP.java:532)

at net.minecraft.entity.Entity.dealFireDamage(Entity.java:1042)

at net.minecraft.entity.Entity.onStruckByLightning(Entity.java:2159)

at net.minecraft.entity.effect.EntityLightningBolt.onUpdate(EntityLightningBolt.java:112)

 

-- Entity being ticked --

Details:

Entity Type: null (net.minecraft.entity.effect.EntityLightningBolt)

Entity ID: 3806

Entity Name: unknown

Entity's Exact location: -93.50, 62.11, 284.50

Entity's Block location: World: (-94,62,284), Chunk: (at 2,3,12 in -6,17; contains blocks -96,0,272 to -81,255,287), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)

Entity's Momentum: 0.00, 0.00, 0.00

Stacktrace:

at net.minecraft.world.World.updateEntities(World.java:2029)

at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515)

 

-- Affected level --

Details:

Level name: New World

All players: 1 total; [EntityPlayerMP['Player687'/263, l='New World', x=-93.13, y=62.00, z=282.69]]

Chunk stats: ServerChunkCache: 351 Drop: 0

Level seed: 5604017937256866434

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

Level generator options:

Level spawn location: World: (-76,64,256), Chunk: (at 4,4,0 in -5,16; contains blocks -80,0,256 to -65,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)

Level time: 1098 game time, 1098 day time

Level dimension: 0

Level storage version: 0x04ABD - Anvil

Level weather: Rain time: 103251 (now: false), thunder time: 31395 (now: false)

Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true

Stacktrace:

at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703)

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)

at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

 

-- System Details --

Details:

Minecraft Version: 1.10.2

Operating System: Windows 7 (x86) version 6.1

Java Version: 1.7.0_79, Oracle Corporation

Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation

Memory: 696713232 bytes (664 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

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

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

FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1448 4 mods loaded, 4 mods active

States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)

UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-10.13.4.1448-1.10.2.jar)

UCHIJAAAA Forge{10.13.4.1448} [Minecraft Forge] (forgeSrc-1.10.2-10.13.4.1448-1.10.2.jar)

UCHIJAAAA DotK{1.0} [Defense of the King] (bin)

GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.

Profiler Position: N/A (disabled)

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

Player Count: 1 / 8; [EntityPlayerMP['Player687'/263, l='New World', x=-93.13, y=62.00, z=282.69]]

Type: Integrated Server (map_client.txt)

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

[12:56:04] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2016-09-29_12.56.04-server.txt

Posted

1) Update your Forge, yours is really old.

2) Don't use

IExtendedEntityProperties

. Use the new

Capabilities

instead. Here's how you can switch over: http://mcforge.readthedocs.io/en/latest/datastorage/capabilities/ (on the bottom of the page)

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Reach Out To Rapid Digital: What sapp Info: +1 41 4 80 7 14 85 Email INFO: rap iddi gita lrecov ery @ exe cs. com Hello, my name is Jayson, and I’m 35 years old from the United Kingdom. My family and I recently endured an incredibly challenging experience that I wouldn’t wish on anyone. We became victims of a cryptocurrency investment fraud scheme that saw us lose a staggering $807,000 in USDT and Bitcoins. The fraudsters had created a convincing facade, and we were lured into investing, only to discover later that the platform was a complete scam. We were left devastated, not just financially, but emotionally, as we had trusted these people and believed in the legitimacy of the investment. After the initial shock wore off, we desperately searched for ways to recover the lost funds. It seemed like an impossible task, and we felt as though there was no hope. That’s when, by sheer luck, we stumbled across a post about Rapid Digital Recovery, a cryptocurrency and funds recovery organization with a proven track record in cybersecurity and fraud recovery. We decided to reach out to them, and from the first interaction, we were impressed with their professionalism and transparency. They explained the recovery process in detail and reassured us that they had the skills and expertise to track down the perpetrators and recover our funds. This gave us a renewed sense of hope, something we hadn’t felt in months. What truly stood out during our experience with Rapid Digital Recovery was their dedication to the recovery process. The team went above and beyond, using sophisticated tracking tools and cyber forensics to gather critical information. Within a matter of weeks, they had successfully located the funds and traced the scam back to the fraudsters responsible. They worked with the authorities to ensure the criminals were held accountable for their actions. To our relief, the team at Rapid Digital Recovery was able to recover every single penny we had lost. The funds were returned in full, and the sense of closure we felt was invaluable. We couldn’t have imagined such a positive outcome in the early stages of our recovery journey, and we are deeply grateful for the work they did. If you ever find yourself in a similar situation, I highly recommend contacting Rapid Digital Recovery. Their expertise, transparency, and dedication to their clients make them the go-to choice for anyone seeking to recover lost cryptocurrency or funds. They truly gave us back our financial future.  
    • This is my first time modding anything, so maybe just skill issue. I'm using Forge 54.0.12 and Temurin 21.0.5+11-LTS I wanted to create a custom keybind and to check whether it works I'd like to send a chat message. I tried using Minecraft.getInstance().player.sendSystemMessage(Component.literal("test")); but IntelliJ couldnt resolve sendSystemMessage(...). Since I saw people using it in earlier versions, I tried the same thing with 1.20.6(- 50.1.0), where it works fine, now I can't figure out if this is intentional and whether there are other options for sending chat messages. On that note, is there more documentation than https://docs.minecraftforge.net/en/1.21.x/? It seems very incomplete compared to something like the Oracle Java docs
    • Hi, i'm having this error and I wanna fix it. we try: -Reload drivers -Eliminate .minecraft -Eliminate Java -Restart launcher -Verify if minecraft is using gpu -Mods  in .minecraft is empty -Install the latest and recomended version of forge idk what i have to do, help me pls. the lastest log is: https://mclo.gs/WAMao8x  
    • Read the FAQ, Rule #2. (https://forums.minecraftforge.net/topic/125488-rules-and-frequently-asked-questions-faq/)  
  • Topics

×
×
  • Create New...

Important Information

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