Jump to content

"It looks like you are using an unsupported modified version of the game. The game crashed whilst ticking entity"


Recommended Posts

Posted

So I can open Minecraft and the open my single player world but then it "[shuts] down internal server" almost straight away and I'm not sure why.

 

 

 

Crash Report ⬇️: any help would be greatly appreciated! ☺

 

---- Minecraft Crash Report ----

WARNING: coremods are present:
  llibrary (llibrary-core-1.0.11-1.12.2.jar)
  ColytraLoadingPlugin (Colytra-Mod-1.12.2.jar)
  Inventory Tweaks Coremod (Inventory-Tweaks-Mod-1.12.2.jar)
  AppleCore (AppleCore-1.12.2.jar)
  MalisisCorePlugin (MalisisCore-1.12.2.jar)
  wings (Wings-Mod-1.12.2.jar)
Contact their authors BEFORE contacting forge

// Why did you do that?

Time: 4/8/19 4:55 PM
Description: Ticking entity

java.lang.ClassCastException: net.minecraft.client.entity.EntityPlayerSP cannot be cast to net.minecraft.entity.player.EntityPlayerMP
    at DamageIndicatorsMod.core.DIEventBus.livingEvent(DIEventBus.java:229)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_710_DIEventBus_livingEvent_LivingUpdateEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:566)
    at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2087)
    at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:234)
    at net.minecraft.client.entity.EntityPlayerSP.func_70071_h_(EntityPlayerSP.java:181)
    at net.minecraft.world.World.func_72866_a(World.java:1993)
    at net.minecraft.world.World.func_72870_g(World.java:1955)
    at net.minecraft.world.World.func_72939_s(World.java:1759)
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1847)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1098)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)
    at net.minecraft.client.main.Main.main(SourceFile:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


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

-- Head --
Thread: Client thread
Stacktrace:
    at DamageIndicatorsMod.core.DIEventBus.livingEvent(DIEventBus.java:229)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_710_DIEventBus_livingEvent_LivingUpdateEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:566)
    at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2087)
    at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:234)
    at net.minecraft.client.entity.EntityPlayerSP.func_70071_h_(EntityPlayerSP.java:181)
    at net.minecraft.world.World.func_72866_a(World.java:1993)
    at net.minecraft.world.World.func_72870_g(World.java:1955)

-- Entity being ticked --
Details:
    Entity Type: null (net.minecraft.client.entity.EntityPlayerSP)
    Entity ID: 306
    Entity Name: KikaArts
    Entity's Exact location: -132.62, 40.00, 166.53
    Entity's Block location: World: (-133,40,166), Chunk: (at 11,2,6 in -9,10; contains blocks -144,0,160 to -129,255,175), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Entity's Momentum: 0.00, -0.08, 0.00
    Entity's Passengers: []
    Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
    at net.minecraft.world.World.func_72939_s(World.java:1759)

-- Affected level --
Details:
    Level name: MpServer
    All players: 1 total; [EntityPlayerSP['KikaArts'/306, l='MpServer', x=-132.62, y=40.00, z=166.53]]
    Chunk stats: MultiplayerChunkCache: 289, 289
    Level seed: 0
    Level generator: ID 06 - BIOMESOP, ver 0. Features enabled: false
    Level generator options: 
    Level spawn location: World: (-128,64,256), Chunk: (at 0,4,0 in -8,16; contains blocks -128,0,256 to -113,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Level time: 51845 game time, 51845 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: 66 total; [EntitySkeleton['Skeleton'/133, l='MpServer', x=-135.34, y=30.00, z=154.51], EntityBat['Bat'/134, l='MpServer', x=-122.48, y=18.86, z=151.03], EntityVillagerMCA['Scottie'/135, l='MpServer', x=-134.00, y=65.00, z=171.00], EntityItem['item.item.rottenFlesh'/136, l='MpServer', x=-135.90, y=65.00, z=161.47], EntityVillagerMCA['John'/137, l='MpServer', x=-128.70, y=65.00, z=171.50], EntityVillagerMCA['Latoya'/138, l='MpServer', x=-136.30, y=65.00, z=186.70], EntityVillagerMCA['Ismael'/139, l='MpServer', x=-134.31, y=65.00, z=183.78], EntityBat['Bat'/140, l='MpServer', x=-137.93, y=40.10, z=197.74], EntityBat['Bat'/155, l='MpServer', x=-115.25, y=18.46, z=147.72], EntityVillagerMCA['Ben'/156, l='MpServer', x=-115.50, y=66.00, z=157.73], EntityVillagerMCA['Jamaal'/157, l='MpServer', x=-118.18, y=66.00, z=167.33], EntityVillagerMCA['Francisco'/158, l='MpServer', x=-113.33, y=66.00, z=163.52], EntityVillagerMCA['Yelena'/159, l='MpServer', x=-120.50, y=67.00, z=165.72], EntityVillagerMCA['Cherry'/160, l='MpServer', x=-126.22, y=65.00, z=185.42], EntityVillagerMCA['Tomas'/161, l='MpServer', x=-119.77, y=65.00, z=179.51], EntityVillagerMCA['Aaron'/162, l='MpServer', x=-118.39, y=65.00, z=184.31], EntityVillagerMCA['Eusebio'/169, l='MpServer', x=-115.35, y=65.00, z=183.44], EntityVillagerMCA['Dania'/170, l='MpServer', x=-105.72, y=66.00, z=172.51], EntityWhiteOwl['White Owl'/171, l='MpServer', x=-110.50, y=63.00, z=231.03], EntityPig['Pig'/172, l='MpServer', x=-107.81, y=65.00, z=229.17], EntityPig['Pig'/175, l='MpServer', x=-82.06, y=69.00, z=226.50], EntityZombie['Zombie'/176, l='MpServer', x=-72.14, y=22.00, z=129.50], EntityBat['Bat'/177, l='MpServer', x=-78.53, y=32.00, z=173.21], EntityPig['Pig'/178, l='MpServer', x=-79.51, y=68.75, z=225.45], EntityPig['Pig'/179, l='MpServer', x=-78.36, y=67.00, z=227.26], EntityBat['Bat'/180, l='MpServer', x=-60.49, y=24.66, z=150.53], EntityZombie['Zombie'/80, l='MpServer', x=-201.50, y=43.00, z=103.50], EntityZombie['Zombie'/81, l='MpServer', x=-201.50, y=43.00, z=104.50], EntityZombie['Zombie'/82, l='MpServer', x=-199.80, y=44.00, z=107.70], EntitySheep['Sheep'/83, l='MpServer', x=-196.37, y=68.00, z=245.50], EntitySheep['Sheep'/84, l='MpServer', x=-195.04, y=69.00, z=246.48], EntitySheep['Sheep'/86, l='MpServer', x=-199.51, y=64.00, z=246.10], EntityItem['item.item.rottenFlesh'/89, l='MpServer', x=-179.17, y=62.00, z=146.39], EntityBat['Bat'/90, l='MpServer', x=-186.30, y=18.17, z=207.60], EntityBat['Bat'/91, l='MpServer', x=-183.48, y=15.03, z=209.74], EntityBat['Bat'/92, l='MpServer', x=-195.07, y=15.88, z=217.75], EntityWhiteOwl['White Owl'/93, l='MpServer', x=-178.06, y=73.00, z=236.48], EntityCreeper['Creeper'/95, l='MpServer', x=-165.50, y=31.00, z=103.50], EntitySheep['Sheep'/96, l='MpServer', x=-161.76, y=64.00, z=119.52], EntitySheep['Sheep'/97, l='MpServer', x=-161.43, y=64.00, z=118.55], EntitySkeleton['Skeleton'/98, l='MpServer', x=-170.50, y=31.00, z=132.50], EntitySkeleton['Skeleton'/99, l='MpServer', x=-170.22, y=30.00, z=131.50], EntityPlayerSP['KikaArts'/306, l='MpServer', x=-132.62, y=40.00, z=166.53], EntitySpider['Spider'/100, l='MpServer', x=-163.30, y=12.00, z=168.00], EntityLatchedRenderer['unknown'/357, l='MpServer', x=8.50, y=65.00, z=8.50], EntityBat['Bat'/101, l='MpServer', x=-168.25, y=26.10, z=209.61], EntitySkeleton['Skeleton'/102, l='MpServer', x=-174.50, y=30.00, z=212.50], EntityBat['Bat'/103, l='MpServer', x=-165.52, y=31.50, z=223.37], EntityCow['Cow'/104, l='MpServer', x=-160.18, y=74.00, z=237.52], EntityZombie['Zombie'/111, l='MpServer', x=-146.50, y=35.00, z=93.97], EntitySheep['Sheep'/112, l='MpServer', x=-159.50, y=64.00, z=111.50], EntitySheep['Sheep'/113, l='MpServer', x=-157.50, y=64.00, z=114.50], EntityCreeper['Creeper'/114, l='MpServer', x=-151.54, y=13.00, z=169.83], EntityZombie['Zombie'/115, l='MpServer', x=-157.45, y=31.00, z=172.92], EntityCreeper['Creeper'/116, l='MpServer', x=-154.50, y=25.00, z=168.50], EntityDog['Dog'/117, l='MpServer', x=-144.30, y=65.00, z=167.30], EntityVillagerMCA['Tran'/118, l='MpServer', x=-147.68, y=65.00, z=169.00], EntityCreeper['Creeper'/119, l='MpServer', x=-147.50, y=13.00, z=180.50], EntityBat['Bat'/120, l='MpServer', x=-149.87, y=13.71, z=180.30], EntityZombie['Zombie'/121, l='MpServer', x=-150.50, y=19.00, z=178.80], EntitySkeleton['Skeleton'/122, l='MpServer', x=-149.50, y=18.00, z=182.50], EntityZombie['Zombie'/123, l='MpServer', x=-147.43, y=33.00, z=196.07], EntityCerulean['Cerulean'/124, l='MpServer', x=-155.47, y=34.00, z=191.23], EntityEnderman['Enderman'/125, l='MpServer', x=-152.53, y=33.00, z=181.48], EntityEnderman['Enderman'/126, l='MpServer', x=-147.51, y=32.00, z=195.41], EntityCow['Cow'/127, l='MpServer', x=-153.15, y=68.00, z=226.53]]
    Retry entities: 1 total; [EntityLatchedRenderer['unknown'/357, l='MpServer', x=8.50, y=65.00, z=8.50]]
    Server brand: fml,forge
    Server type: Integrated singleplayer server
Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:420)
    at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2741)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:419)
    at net.minecraft.client.main.Main.main(SourceFile:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
    Minecraft Version: 1.12.2
    Operating System: Mac OS X (x86_64) version 10.13.6
    Java Version: 1.8.0_74, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 50962880 bytes (48 MB) / 2147483648 bytes (2048 MB) up to 2147483648 bytes (2048 MB)
    JVM Flags: 7 total; -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
    IntCache: cache: 0, tcache: 0, allocated: 4, tallocated: 105
    FML: MCP 9.42 Powered by Forge 14.23.5.2781 54 mods loaded, 53 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

    | State  | ID                  | Version                  | Source                                        | Signature                                |
    |:------ |:------------------- |:------------------------ |:--------------------------------------------- |:---------------------------------------- |
    | LCHIJA | minecraft           | 1.12.2                   | minecraft.jar                                 | None                                     |
    | LCHIJA | mcp                 | 9.42                     | minecraft.jar                                 | None                                     |
    | LCHIJA | FML                 | 8.0.99.99                | forge-1.12.2-14.23.5.2781.jar                 | e3c3d50c7c986df74c645c0ac54639741c90a557 |
    | LCHIJA | forge               | 14.23.5.2781             | forge-1.12.2-14.23.5.2781.jar                 | e3c3d50c7c986df74c645c0ac54639741c90a557 |
    | LCHIJA | tammodized          | 0.15.6                   | TamModized-1.12.2.jar                         | None                                     |
    | LCHIJA | aov                 | 0.11.4                   | Angel-of-Vengeance-Mod-1.12.2.jar             | None                                     |
    | LCHIJA | applecore           | 3.2.0                    | AppleCore-1.12.2.jar                          | None                                     |
    | LCHIJA | baubles             | 1.5.2                    | Baubles-Mod-1.12.2.jar                        | None                                     |
    | LCHIJA | bibliocraft         | 2.4.5                    | BiblioCraft-Mod-1.12.2.jar                    | None                                     |
    | LCHIJA | biomesoplenty       | 7.0.1.2361               | BiomesOPlenty-1.12.2-7.0.1.2361-universal.jar | None                                     |
    | LCHIJA | jei                 | 4.15.0.269               | jei_1.12.2-4.15.0.269.jar                     | None                                     |
    | LCHIJA | botania             | r1.10-360                | Botania-Mod-1.12.2.jar                        | None                                     |
    | LCHIJA | colytra             | 1.1.0                    | Colytra-Mod-1.12.2.jar                        | 5d5b8aee896a4f5ea3f3114784742662a67ad32f |
    | LCHIJA | contracts           | 2.1                      | Contracts-Mod-1.12.2.jar                      | None                                     |
    | LCHIJA | customnpcs          | 1.12                     | Custom-NPCs-Mod-1.12.2.jar                    | None                                     |
    | LCHIJA | damageindicatorsmod | 1.0                      | Damage-Indicators-Mod-1.12.2.jar              | None                                     |
    | LCHIJA | ptrmodellib         | 1.0.2                    | PTRLib-1.12.2.jar                             | None                                     |
    | LCHIJA | props               | 2.6.1                    | DecoCraft-Mod-1.12.2.jar                      | None                                     |
    | LCHIJA | doggytalents        | 1.14.2.396               | Doggy-Talents-Mod-1.12.2.jar                  | None                                     |
    | LCHIJA | extrautils2         | 1.0                      | Extra-Utilities-Mod-1.12.2.jar                | None                                     |
    | LCHIJA | durabilityviewer    | 1.4                      | Giselbaers-Durability-Viewer-Mod-1.12.2.jar   | None                                     |
    | LCHIJA | harvestcraft        | 1.12.2zb                 | HarvestCraft-Mod-1.12.2.jar                   | None                                     |
    | LCHIJA | ichunutil           | 7.2.1                    | iChun-Util-Mod-1.12.2.jar                     | 4db5c2bd1b556f252a5b8b54b256d381b2a0a6b8 |
    | LCHIJA | inventorytweaks     | 1.63+release.109.220f184 | Inventory-Tweaks-Mod-1.12.2.jar               | 55d2cd4f5f0961410bf7b91ef6c6bf00a766dcbe |
    | LCHIJA | inventorypets       | 2.0.1                    | inventorypets-1.12-2.0.1.jar                  | None                                     |
    | LCHIJA | japaricraftmod      | 5.3.3                    | JapariCraft-Mod-1.12.2.jar                    | None                                     |
    | LCHIJA | malisiscore         | 1.12.2-6.4.0             | MalisisCore-1.12.2.jar                        | None                                     |
    | LCHIJA | malisisdoors        | 1.12.2-7.3.0             | MalisisDoors-Mod-1.12.2.jar                   | None                                     |
    | LCHIJA | mantle              | 1.12-1.3.2.24            | Mantle-Mod-1.12.2.jar                         | None                                     |
    | LCHIJA | radixcore           | 1.12.x-2.2.1             | RadixCore-1.12.2.jar                          | None                                     |
    | LCHIJA | mca                 | 1.12.2-5.3.1             | Minecraft-Comes-Alive-Mod-1.12.2.jar          | None                                     |
    | LCHIJA | moreplayermodels    | 1.12.2                   | More-Player-Models-Mod-1.12.2.jar             | None                                     |
    | LCHIJA | morph               | 7.1.3                    | Morphing-Mod-1.12.2.jar                       | 4db5c2bd1b556f252a5b8b54b256d381b2a0a6b8 |
    | LCHIJA | cfm                 | 6.2.0                    | MrCrayfishs-Furniture-Mod-1.12.2.jar          | None                                     |
    | LCHIJA | msutilities         | 1.3.4                    | MS-Utilities-Mod-1.12.2.jar                   | None                                     |
    | LCHIJA | natura              | 1.12.2-4.3.2.62          | Natura-Mod-1.12.2.jar                         | None                                     |
    | LCHIJA | packingtape         | 0.7.6                    | Packing-Tape-Mod-1.12.jar                     | None                                     |
    | LCHIJA | projecte            | 1.12.2-PE1.4.0           | ProjectE-Mod-1.12.2.jar                       | None                                     |
    | LCHIJA | projectex           | 1.1.0.21                 | Project-EX-Mod-1.12.2.jar                     | None                                     |
    | LCHIJA | simplegrinder       | @VERSION@                | Simple-Grinder-Mod-1.12.2.jar                 | None                                     |
    | LCHIJA | harvest             | 1.12-1.2.7-20            | SimpleHarvest-Mod-1.12.2.jar                  | None                                     |
    | LCHIJA | simplytea           | 1.4                      | Simply-Tea-Mod-1.12.2.jar                     | None                                     |
    | LCHIJA | treechopper         | 1.2.4                    | Tree-Chopper-Mod-1.12.2.jar                   | None                                     |
    | LCHIJA | twilightforest      | 3.9.888                  | Twilight-Forest-Mod-1.12.2.jar                | None                                     |
    | LCHIJA | uteamcore           | 2.2.4.94                 | U-Team-Core-1.12.2.jar                        | None                                     |
    | LCHIJA | usefulbackpacks     | 1.3.1.13                 | Useful-Backpacks-Mod-1.12.2.jar               | None                                     |
    | LCHIJA | veinminer           | 0.38.1                   | Vein-Miner-Mod-1.12.jar                       | None                                     |
    | LCHIJA | veinminermodsupport | 0.38.1                   | Vein-Miner-Mod-1.12.jar                       | None                                     |
    | LCHIJA | llibrary            | 1.7.18                   | LLibrary-1.12.2.jar                           | b9f30a813bee3b9dd5652c460310cfcd54f6b7ec |
    | LCHIJA | wings               | 1.1.4                    | Wings-Mod-1.12.2.jar                          | None                                     |
    | LCHIJA | bauble_wings        | 1.0.0                    | Wings-Mod-1.12.2.jar                          | None                                     |
    | LCHIJA | xaerominimap        | 1.16                     | Xaeros-Minimap-Mod-1.12.jar                   | None                                     |
    | LCHIJA | xray                | 1.4.0                    | xray-1.12.2-1.5.0.jar                         | None                                     |
    | UD     | mobends_wings       | 1.0.0                    | Wings-Mod-1.12.2.jar                          | None                                     |

    Loaded coremods (and transformers): 
llibrary (llibrary-core-1.0.11-1.12.2.jar)
  net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer
  net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher
ColytraLoadingPlugin (Colytra-Mod-1.12.2.jar)
  c4.colytra.asm.ElytraTransformer
Inventory Tweaks Coremod (Inventory-Tweaks-Mod-1.12.2.jar)
  invtweaks.forge.asm.ContainerTransformer
AppleCore (AppleCore-1.12.2.jar)
  squeek.applecore.asm.TransformerModuleHandler
MalisisCorePlugin (MalisisCore-1.12.2.jar)
  
wings (Wings-Mod-1.12.2.jar)
  me.paulf.wings.server.asm.WingsRuntimePatcher
  me.paulf.wings.server.asm.mobends.WingsMoBendsRuntimePatcher
    Pulsar/natura loaded Pulses: 
        - NaturaCommons (Enabled/Forced)
        - NaturaOverworld (Enabled/Not Forced)
        - NaturaNether (Enabled/Not Forced)
        - NaturaDecorative (Enabled/Not Forced)
        - NaturaTools (Enabled/Not Forced)
        - NaturaEntities (Enabled/Not Forced)
        - NaturaOredict (Enabled/Forced)
        - NaturaWorld (Enabled/Not Forced)

    Launched Version: 1.12.2-forge1.12.2-14.23.5.2781
    LWJGL: 2.9.2
    OpenGL: AMD Radeon HD 6750M OpenGL Engine GL version 2.1 ATI-1.68.21, ATI Technologies Inc.
    GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because ARB_framebuffer_object is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Packs: faithful32pack_1_7_x (incompatible), ProjectE-Classic-Textures (incompatible)
    Current Language: English (US)
    Profiler Position: N/A (disabled)
    CPU: 4x Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz

pic i need.png

  • 1 month later...
Posted (edited)
1 hour ago, EnderWolf111 said:

same problem

Please create your own thread and post you log(s) according to the EAQ.

Edited by DavidM

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Version 1.19 - Forge 41.0.63 I want to create a wolf entity that I can ride, so far it seems to be working, but the problem is that when I get on the wolf, I can’t control it. I then discovered that the issue is that the server doesn’t detect that I’m riding the wolf, so I’m struggling with synchronization. However, it seems to not be working properly. As I understand it, the server receives the packet but doesn’t register it correctly. I’m a bit new to Java, and I’ll try to provide all the relevant code and prints *The comments and prints are translated by chatgpt since they were originally in Spanish* Thank you very much in advance No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. MountableWolfEntity package com.vals.valscraft.entity; import com.vals.valscraft.network.MountSyncPacket; import com.vals.valscraft.network.NetworkHandler; import net.minecraft.client.Minecraft; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Wolf; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.network.PacketDistributor; public class MountableWolfEntity extends Wolf { private boolean hasSaddle; private static final EntityDataAccessor<Byte> DATA_ID_FLAGS = SynchedEntityData.defineId(MountableWolfEntity.class, EntityDataSerializers.BYTE); public MountableWolfEntity(EntityType<? extends Wolf> type, Level level) { super(type, level); this.hasSaddle = false; } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(DATA_ID_FLAGS, (byte)0); } public static AttributeSupplier.Builder createAttributes() { return Wolf.createAttributes() .add(Attributes.MAX_HEALTH, 20.0) .add(Attributes.MOVEMENT_SPEED, 0.3); } @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); if (itemstack.getItem() == Items.SADDLE && !this.hasSaddle()) { if (!player.isCreative()) { itemstack.shrink(1); } this.setSaddle(true); return InteractionResult.SUCCESS; } else if (!level.isClientSide && this.hasSaddle()) { player.startRiding(this); MountSyncPacket packet = new MountSyncPacket(true); // 'true' means the player is mounted NetworkHandler.CHANNEL.sendToServer(packet); // Ensure the server handles the packet return InteractionResult.SUCCESS; } return InteractionResult.PASS; } @Override public void travel(Vec3 travelVector) { if (this.isVehicle() && this.getControllingPassenger() instanceof Player) { System.out.println("The wolf has a passenger."); System.out.println("The passenger is a player."); Player player = (Player) this.getControllingPassenger(); // Ensure the player is the controller this.setYRot(player.getYRot()); this.yRotO = this.getYRot(); this.setXRot(player.getXRot() * 0.5F); this.setRot(this.getYRot(), this.getXRot()); this.yBodyRot = this.getYRot(); this.yHeadRot = this.yBodyRot; float forward = player.zza; float strafe = player.xxa; if (forward <= 0.0F) { forward *= 0.25F; } this.flyingSpeed = this.getSpeed() * 0.1F; this.setSpeed((float) this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 1.5F); this.setDeltaMovement(new Vec3(strafe, travelVector.y, forward).scale(this.getSpeed())); this.calculateEntityAnimation(this, false); } else { // The wolf does not have a passenger or the passenger is not a player System.out.println("No player is mounted, or the passenger is not a player."); super.travel(travelVector); } } public boolean hasSaddle() { return this.hasSaddle; } public void setSaddle(boolean hasSaddle) { this.hasSaddle = hasSaddle; } @Override protected void dropEquipment() { super.dropEquipment(); if (this.hasSaddle()) { this.spawnAtLocation(Items.SADDLE); this.setSaddle(false); } } @SubscribeEvent public static void onServerTick(TickEvent.ServerTickEvent event) { if (event.phase == TickEvent.Phase.START) { MinecraftServer server = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer(); if (server != null) { for (ServerPlayer player : server.getPlayerList().getPlayers()) { if (player.isPassenger() && player.getVehicle() instanceof MountableWolfEntity) { MountableWolfEntity wolf = (MountableWolfEntity) player.getVehicle(); System.out.println("Tick: " + player.getName().getString() + " is correctly mounted on " + wolf); } } } } } private boolean lastMountedState = false; @Override public void tick() { super.tick(); if (!this.level.isClientSide) { // Only on the server boolean isMounted = this.isVehicle() && this.getControllingPassenger() instanceof Player; // Only print if the state changed if (isMounted != lastMountedState) { if (isMounted) { Player player = (Player) this.getControllingPassenger(); // Verify the passenger is a player System.out.println("Server: Player " + player.getName().getString() + " is now mounted."); } else { System.out.println("Server: The wolf no longer has a passenger."); } lastMountedState = isMounted; } } } @Override public void addPassenger(Entity passenger) { super.addPassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(true)); } } } @Override public void removePassenger(Entity passenger) { super.removePassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is no longer mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(false)); } } } @Override public boolean isControlledByLocalInstance() { Entity entity = this.getControllingPassenger(); return entity instanceof Player; } @Override public void positionRider(Entity passenger) { if (this.hasPassenger(passenger)) { double xOffset = Math.cos(Math.toRadians(this.getYRot() + 90)) * 0.4; double zOffset = Math.sin(Math.toRadians(this.getYRot() + 90)) * 0.4; passenger.setPos(this.getX() + xOffset, this.getY() + this.getPassengersRidingOffset() + passenger.getMyRidingOffset(), this.getZ() + zOffset); } } } MountSyncPacket package com.vals.valscraft.network; import com.vals.valscraft.entity.MountableWolfEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class MountSyncPacket { private final boolean isMounted; public MountSyncPacket(boolean isMounted) { this.isMounted = isMounted; } public void encode(FriendlyByteBuf buffer) { buffer.writeBoolean(isMounted); } public static MountSyncPacket decode(FriendlyByteBuf buffer) { return new MountSyncPacket(buffer.readBoolean()); } public void handle(NetworkEvent.Context context) { context.enqueueWork(() -> { ServerPlayer player = context.getSender(); // Get the player from the context if (player != null) { // Verifies if the player has dismounted if (!isMounted) { Entity vehicle = player.getVehicle(); if (vehicle instanceof MountableWolfEntity wolf) { // Logic to remove the player as a passenger wolf.removePassenger(player); System.out.println("Server: Player " + player.getName().getString() + " is no longer mounted."); } } } }); context.setPacketHandled(true); // Marks the packet as handled } } networkHandler package com.vals.valscraft.network; import com.vals.valscraft.valscraft; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class NetworkHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(valscraft.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); public static void init() { int packetId = 0; // Register the mount synchronization packet CHANNEL.registerMessage( packetId++, MountSyncPacket.class, MountSyncPacket::encode, MountSyncPacket::decode, (msg, context) -> msg.handle(context.get()) // Get the context with context.get() ); } }  
    • Do you use features of inventory profiles next (ipnext) or is there a change without it?
    • Remove rubidium - you are already using embeddium, which is a fork of rubidium
  • Topics

×
×
  • Create New...

Important Information

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