Jump to content

Recommended Posts

Posted

good days

 

this is anoying me

the game crash whenever try to spawn mi customcreeper only leting me this error i dont get

 

the error only happend in the minecraft game whit the alredy compiled mod,  but not when run in eclipse

this thing says than

 

java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Integer

at net.minecraft.entity.DataWatcher.func_75679_c(SourceFile:100)

at mercenarymod.entidades.hostiles.akCreeper.func_70071_h_(akCreeper.java:361)

 

thats is the datawacher, in the akCreeper.class the datawacher value (21) is set to int and in the values is loaded whith an int

i alredy change the value of the datawacher from 21 to 22 but fails the same

 

actually im thinking that someone else mod is using the datawachers from entityliving or from tameable  thos afecting this entity

 

### is some way to chekit ?

 

 

 

the error

---- Minecraft Crash Report ----

WARNING: coremods are present:
  Mine and Blade: Battlegear2 (1.8-MB_Battlegear2-Bullseye-1.0.9.0.jar)
  MMMCoremod (LittleMaidMobNX-NX3B111-1.8-F1450.jar)
  RenderPlayerAPIPlugin (RenderPlayerAPI-1.8-1.5.jar)
  PlayerAPIPlugin (PlayerAPI-1.8-1.4.jar)
  LoadingPlugin (Bloodmoon-1.3.jar)
  DLFMLCorePlugin (DynamicLights-1.8.jar)
  SmartCorePlugin (SmartMoving-1.8-16.2.jar)
  BOPLoadingPlugin (BiomesOPlenty-1.8-3.0.0.1461-universal.jar)
Contact their authors BEFORE contacting forge

// Oops.

Time: 8/11/15 05:03 PM
Description: Ticking entity

java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Integer
at net.minecraft.entity.DataWatcher.func_75679_c(SourceFile:100)
at mercenarymod.entidades.hostiles.akCreeper.func_70071_h_(akCreeper.java:361)
at net.minecraft.world.World.func_72866_a(World.java:1880)
at net.minecraft.world.World.func_72870_g(World.java:1850)
at net.minecraft.world.World.func_72939_s(World.java:1679)
at net.minecraft.client.Minecraft.func_71407_l(Unknown Source)
at net.minecraft.client.Minecraft.func_71411_J(Unknown Source)
at net.minecraft.client.Minecraft.func_99999_d(Unknown Source)
at net.minecraft.client.main.Main.main(SourceFile:120)
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:497)
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 --
Stacktrace:
at net.minecraft.entity.DataWatcher.func_75679_c(SourceFile:100)
at mercenarymod.entidades.hostiles.akCreeper.func_70071_h_(akCreeper.java:361)
at net.minecraft.world.World.func_72866_a(World.java:1880)
at net.minecraft.world.World.func_72870_g(World.java:1850)

-- Entity being ticked --
Details:
Entity Type: modmercenario.akCreeper (mercenarymod.entidades.hostiles.akCreeper)
Entity ID: 4252
Entity Name: entity.modmercenario.akCreeper.name
Entity's Exact location: -59,97, 68,00, 63,66
Entity's Block location: -60,00,68,00,63,00 - World: (-60,68,63), Chunk: (at 4,4,15 in -4,3; contains blocks -64,0,48 to -49,255,63), 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
Entity's Rider: ~~ERROR~~ NullPointerException: null
Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
at net.minecraft.world.World.func_72939_s(World.java:1679)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player'/1253, l='MpServer', x=-59,95, y=68,00, z=63,67]]
Chunk stats: MultiplayerChunkCache: 81, 81
Level seed: 0
Level generator: ID 06 - BIOMESOP, ver 0. Features enabled: false
Level generator options: 
Level spawn location: 7,00,64,00,-29,00 - World: (7,64,-29), Chunk: (at 7,4,3 in 0,-2; contains blocks 0,0,-32 to 15,255,-17), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
Level time: 9489 game time, 9489 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: 168 total; [EntityItem['item.item.bread'/771, l='MpServer', x=-20,88, y=30,00, z=66,28], EntityItem['item.item.compass'/772, l='MpServer', x=-19,25, y=30,00, z=68,13], EntityGib['desconocido'/4100, l='MpServer', x=-21,94, y=41,50, z=78,41], EntityItem['item.item.zss.sword_ordon'/773, l='MpServer', x=-20,88, y=30,00, z=68,13], EntityGib['desconocido'/4101, l='MpServer', x=-21,84, y=41,28, z=78,74], EntityItem['item.item.arrow'/774, l='MpServer', x=-20,88, y=35,00, z=70,59], EntityGib['desconocido'/4102, l='MpServer', x=-22,03, y=41,28, z=78,07], EntityItem['item.item.arrow'/775, l='MpServer', x=-18,13, y=35,00, z=68,13], EntitySkeleton['Esqueleto'/3079, l='MpServer', x=-55,78, y=50,00, z=68,28], EntityCreeper['Creeper'/3591, l='MpServer', x=-104,50, y=23,00, z=27,50], EntityItem['item.item.zss.potion_red'/776, l='MpServer', x=-18,66, y=35,00, z=68,13], EntityFish['Fish'/777, l='MpServer', x=-16,50, y=56,41, z=78,09], EntityFish['Fish'/778, l='MpServer', x=-19,09, y=56,00, z=80,44], EntityGib['desconocido'/3082, l='MpServer', x=-55,78, y=51,50, z=68,28], EntityFish['Fish'/779, l='MpServer', x=-18,75, y=55,47, z=84,41], EntityGib['desconocido'/3083, l='MpServer', x=-55,66, y=51,28, z=68,61], EntityFish['Fish'/780, l='MpServer', x=-16,78, y=55,00, z=81,28], EntityGib['desconocido'/3084, l='MpServer', x=-55,90, y=51,28, z=67,95], EntityCreeper['Creeper'/2830, l='MpServer', x=-7,50, y=20,02, z=9,50], EntityCreeper['Creeper'/2832, l='MpServer', x=-9,44, y=20,02, z=12,41], EntityZombie['Zombi'/3603, l='MpServer', x=-37,31, y=50,00, z=75,44], EntityZombie['Zombi'/3604, l='MpServer', x=-24,86, y=50,00, z=66,66], EntityItem['item.item.zss.arrow_ice'/789, l='MpServer', x=-9,06, y=30,00, z=64,47], EntityItem['item.item.emerald'/790, l='MpServer', x=-7,66, y=30,00, z=64,88], EntityGib['desconocido'/3606, l='MpServer', x=-37,31, y=51,50, z=75,44], EntityItem['item.item.zss.deku_nut'/791, l='MpServer', x=-7,59, y=30,00, z=66,31], EntityGib['desconocido'/3607, l='MpServer', x=-37,26, y=51,28, z=75,09], EntityItem['item.item.zss.hammer'/792, l='MpServer', x=-10,41, y=30,00, z=64,88], EntityGib['desconocido'/3608, l='MpServer', x=-37,36, y=51,28, z=75,78], EntityItem['item.item.zss.heart_piece'/793, l='MpServer', x=-6,81, y=30,00, z=66,22], EntityCreeper['Creeper'/2841, l='MpServer', x=-12,50, y=33,02, z=-7,50], EntityItem['item.item.ingotIron'/794, l='MpServer', x=-7,56, y=30,00, z=66,88], EntityCreeper['Creeper'/2842, l='MpServer', x=-62,50, y=33,02, z=81,50], EntityGib['desconocido'/3610, l='MpServer', x=-24,98, y=51,50, z=66,66], EntityGib['desconocido'/3611, l='MpServer', x=-25,02, y=51,28, z=66,31], EntityGib['desconocido'/3612, l='MpServer', x=-24,94, y=51,28, z=67,00], EntityFish['Fish'/797, l='MpServer', x=-6,47, y=57,25, z=85,56], EntityFish['Fish'/798, l='MpServer', x=-8,75, y=57,44, z=84,47], EntityBat['Murciélago'/804, l='MpServer', x=13,84, y=17,28, z=81,88], EntityZombie['Zombi'/4135, l='MpServer', x=-38,56, y=31,00, z=56,94], EntityZombie['Zombi'/4137, l='MpServer', x=-37,84, y=30,00, z=60,75], EntityGib['desconocido'/4142, l='MpServer', x=-38,56, y=32,50, z=56,94], EntityGib['desconocido'/4143, l='MpServer', x=-38,91, y=32,28, z=56,90], EntityGib['desconocido'/4144, l='MpServer', x=-38,21, y=32,28, z=56,97], EntityGib['desconocido'/4146, l='MpServer', x=-37,84, y=31,50, z=60,75], EntityGib['desconocido'/4147, l='MpServer', x=-37,65, y=31,28, z=61,04], EntityCreeper['Creeper'/3380, l='MpServer', x=-55,50, y=20,00, z=49,50], EntityBat['Murciélago'/3636, l='MpServer', x=-10,00, y=21,17, z=5,30], EntityGib['desconocido'/4148, l='MpServer', x=-38,04, y=31,28, z=60,46], EntityCreeper['Creeper'/3381, l='MpServer', x=-52,50, y=20,00, z=49,50], EntityBat['Murciélago'/3637, l='MpServer', x=-10,25, y=20,05, z=6,38], EntityBat['Murciélago'/3641, l='MpServer', x=-9,96, y=21,10, z=7,89], EntityBat['Murciélago'/829, l='MpServer', x=17,63, y=17,81, z=78,59], EntityCreeper['Creeper'/3134, l='MpServer', x=-1,13, y=30,00, z=42,72], EntityFish['Fish'/830, l='MpServer', x=19,51, y=54,29, z=76,67], EntityCreeper['Creeper'/3135, l='MpServer', x=4,50, y=30,00, z=53,50], EntityFish['Fish'/831, l='MpServer', x=17,69, y=53,69, z=67,50], EntityCow['Vaca'/320, l='MpServer', x=-118,06, y=69,00, z=59,59], EntityCreeper['Creeper'/3136, l='MpServer', x=4,50, y=30,00, z=56,50], EntityFish['Fish'/832, l='MpServer', x=19,01, y=53,22, z=70,71], EntityBat['Murciélago'/4161, l='MpServer', x=-30,88, y=21,75, z=60,94], EntityBat['Murciélago'/4162, l='MpServer', x=-55,28, y=19,84, z=72,28], EntityEnderman['Enderman'/3140, l='MpServer', x=-2,50, y=30,00, z=46,50], EntityBat['Murciélago'/4171, l='MpServer', x=14,79, y=30,40, z=-9,69], EntityBat['Murciélago'/2916, l='MpServer', x=-40,75, y=40,22, z=18,50], EntitySpider['Araña'/1892, l='MpServer', x=-47,84, y=20,00, z=-12,50], EntitySkeleton['Esqueleto'/3685, l='MpServer', x=-26,50, y=20,00, z=9,50], EntityCreeper['Creeper'/1894, l='MpServer', x=-43,50, y=20,00, z=-12,50], EntityGib['desconocido'/3688, l='MpServer', x=-26,50, y=21,50, z=9,50], EntityGib['desconocido'/3689, l='MpServer', x=-26,31, y=21,28, z=9,80], EntityGib['desconocido'/3690, l='MpServer', x=-26,69, y=21,28, z=9,20], EntitySkeleton['Esqueleto'/4205, l='MpServer', x=-10,50, y=50,00, z=32,50], EntitySkeleton['Esqueleto'/4206, l='MpServer', x=-12,50, y=50,00, z=32,50], EntitySkeleton['Esqueleto'/4207, l='MpServer', x=-12,50, y=50,00, z=31,50], EntityZombie['Zombi'/2160, l='MpServer', x=4,50, y=30,00, z=43,50], EntitySkeleton['Esqueleto'/4208, l='MpServer', x=-14,50, y=50,00, z=33,50], EntityZombie['Zombi'/4209, l='MpServer', x=-25,50, y=40,00, z=51,50], EntitySkeleton['Esqueleto'/4210, l='MpServer', x=-23,50, y=40,00, z=50,50], EntitySkeleton['Esqueleto'/4211, l='MpServer', x=-24,53, y=40,02, z=48,19], EntityZombie['Zombi'/4212, l='MpServer', x=-21,50, y=40,00, z=45,50], EntityGib['desconocido'/2165, l='MpServer', x=4,50, y=31,50, z=43,50], EntityGib['desconocido'/2166, l='MpServer', x=4,53, y=31,28, z=43,15], EntityBat['Murciélago'/2934, l='MpServer', x=-55,25, y=27,10, z=90,25], EntityGib['desconocido'/4214, l='MpServer', x=-10,50, y=51,50, z=32,50], EntityGib['desconocido'/2167, l='MpServer', x=4,47, y=31,28, z=43,85], EntityGib['desconocido'/4215, l='MpServer', x=-10,15, y=51,28, z=32,53], EntityGib['desconocido'/4216, l='MpServer', x=-10,85, y=51,28, z=32,47], EntityGib['desconocido'/4218, l='MpServer', x=-12,50, y=51,50, z=32,50], EntityZombie['Zombi'/1915, l='MpServer', x=-57,50, y=10,00, z=14,50], EntityGib['desconocido'/4219, l='MpServer', x=-12,15, y=51,28, z=32,51], EntityGib['desconocido'/4220, l='MpServer', x=-12,85, y=51,28, z=32,49], EntityGib['desconocido'/4222, l='MpServer', x=-12,50, y=51,50, z=31,50], EntityGib['desconocido'/4223, l='MpServer', x=-12,15, y=51,28, z=31,52], EntityGib['desconocido'/4224, l='MpServer', x=-12,85, y=51,28, z=31,48], EntityGib['desconocido'/4226, l='MpServer', x=-14,50, y=51,50, z=33,50], EntityGib['desconocido'/4227, l='MpServer', x=-14,15, y=51,28, z=33,53], EntityGib['desconocido'/4228, l='MpServer', x=-14,85, y=51,28, z=33,47], EntityGib['desconocido'/4230, l='MpServer', x=-25,50, y=41,50, z=51,50], EntityGib['desconocido'/4231, l='MpServer', x=-25,70, y=41,28, z=51,79], EntityGib['desconocido'/4232, l='MpServer', x=-25,30, y=41,28, z=51,21], EntityGib['desconocido'/4234, l='MpServer', x=-23,50, y=41,50, z=50,50], EntityGib['desconocido'/4235, l='MpServer', x=-23,16, y=41,28, z=50,43], EntityGib['desconocido'/4236, l='MpServer', x=-23,84, y=41,28, z=50,57], EntityGib['desconocido'/4238, l='MpServer', x=-24,53, y=41,56, z=48,22], EntityGib['desconocido'/4239, l='MpServer', x=-24,88, y=41,34, z=48,22], EntityGib['desconocido'/1936, l='MpServer', x=-57,50, y=11,50, z=14,50], EntityGib['desconocido'/4240, l='MpServer', x=-24,18, y=41,34, z=48,22], EntityGib['desconocido'/1937, l='MpServer', x=-57,80, y=11,28, z=14,32], EntityGib['desconocido'/1938, l='MpServer', x=-57,20, y=11,28, z=14,68], EntityGib['desconocido'/4242, l='MpServer', x=-21,50, y=41,50, z=45,50], EntityCreeper['Creeper'/3987, l='MpServer', x=-31,34, y=30,00, z=-10,00], EntityGib['desconocido'/4243, l='MpServer', x=-21,15, y=41,28, z=45,50], EntityGib['desconocido'/4244, l='MpServer', x=-21,85, y=41,28, z=45,50], EntityZombie['Zombi'/2198, l='MpServer', x=-8,50, y=40,02, z=9,50], EntitySkeleton['Esqueleto'/3990, l='MpServer', x=-23,50, y=27,00, z=140,50], EntityGib['desconocido'/4246, l='MpServer', x=-23,50, y=28,50, z=140,50], EntityGib['desconocido'/4247, l='MpServer', x=-23,15, y=28,28, z=140,51], EntityCreeper['Creeper'/3991, l='MpServer', x=-20,50, y=27,00, z=140,50], EntityGib['desconocido'/4248, l='MpServer', x=-23,85, y=28,28, z=140,49], EntityGib['desconocido'/2202, l='MpServer', x=-8,50, y=41,52, z=9,50], EntityGib['desconocido'/2203, l='MpServer', x=-8,15, y=41,29, z=9,48], EntityGib['desconocido'/2204, l='MpServer', x=-8,85, y=41,29, z=9,52], akCreeper['entity.modmercenario.akCreeper.name'/4252, l='MpServer', x=-59,97, y=68,00, z=63,66], EntityCreeper['Creeper'/2975, l='MpServer', x=-9,50, y=30,00, z=23,50], EntityCreeper['Creeper'/2976, l='MpServer', x=-4,50, y=30,00, z=17,50], EntityCreeper['Creeper'/2209, l='MpServer', x=-46,03, y=20,00, z=-12,50], EntityFish['Fish'/2468, l='MpServer', x=2,06, y=51,69, z=97,06], EntityBat['Murciélago'/3752, l='MpServer', x=-105,75, y=29,13, z=141,28], EntityZombie['Zombi'/2986, l='MpServer', x=-9,50, y=50,00, z=32,50], EntityZombie['Zombi'/2987, l='MpServer', x=-8,50, y=50,00, z=33,50], EntityPatronEffect['desconocido'/1452, l='MpServer', x=-59,95, y=68,00, z=63,67], EntityCreeper['Creeper'/1966, l='MpServer', x=6,50, y=30,00, z=63,50], EntityCreeper['Creeper'/431, l='MpServer', x=-99,44, y=35,00, z=29,53], EntityZombie['Zombi'/2223, l='MpServer', x=-28,00, y=20,00, z=56,41], EntityZombie['Zombi'/2224, l='MpServer', x=-25,50, y=20,00, z=53,50], EntityConcussionCreeper['Concussion Creeper'/433, l='MpServer', x=-97,50, y=34,00, z=33,50], EntityChicken['Pollo'/435, l='MpServer', x=-104,50, y=63,00, z=63,50], EntityChicken['Pollo'/436, l='MpServer', x=-104,50, y=63,00, z=63,50], EntityCow['Vaca'/437, l='MpServer', x=-111,50, y=68,00, z=62,38], EntityCow['Vaca'/438, l='MpServer', x=-111,50, y=68,00, z=61,03], EntityGib['desconocido'/2998, l='MpServer', x=-9,50, y=51,50, z=32,50], EntityCow['Vaca'/439, l='MpServer', x=-111,50, y=68,00, z=63,53], EntityGib['desconocido'/2999, l='MpServer', x=-9,85, y=51,28, z=32,46], EntityGib['desconocido'/3000, l='MpServer', x=-9,15, y=51,28, z=32,54], EntityChicken['Pollo'/441, l='MpServer', x=-104,50, y=63,00, z=64,50], EntityChicken['Pollo'/442, l='MpServer', x=-108,19, y=64,00, z=64,78], EntityGib['desconocido'/3002, l='MpServer', x=-8,50, y=51,50, z=33,50], EntityGib['desconocido'/3003, l='MpServer', x=-8,20, y=51,28, z=33,31], EntityGib['desconocido'/3004, l='MpServer', x=-8,80, y=51,28, z=33,69], EntityItem['item.item.emerald'/723, l='MpServer', x=-56,69, y=50,00, z=63,66], EntityItem['item.item.apple'/725, l='MpServer', x=-58,13, y=50,00, z=68,00], EntityItem['item.item.zss.bomb_standard'/726, l='MpServer', x=-58,50, y=54,00, z=69,31], EntityItem['item.item.zss.arrow_fire'/727, l='MpServer', x=-61,88, y=54,00, z=66,25], EntityItem['item.item.arrow'/728, l='MpServer', x=-61,88, y=54,00, z=66,13], EntityItem['item.item.zss.key_small'/729, l='MpServer', x=-61,88, y=54,00, z=66,53], EntityItem['item.item.zss.heart_piece'/730, l='MpServer', x=-61,38, y=54,00, z=69,88], EntityGib['desconocido'/2273, l='MpServer', x=-28,00, y=21,50, z=56,41], EntityGib['desconocido'/2274, l='MpServer', x=-27,78, y=21,28, z=56,14], EntityGib['desconocido'/2275, l='MpServer', x=-28,22, y=21,28, z=56,68], EntityGib['desconocido'/2277, l='MpServer', x=-25,50, y=21,50, z=53,50], EntityPlayerSP['Player'/1253, l='MpServer', x=-59,95, y=68,00, z=63,67], EntityGib['desconocido'/2278, l='MpServer', x=-25,83, y=21,28, z=53,39], EntityGib['desconocido'/2279, l='MpServer', x=-25,17, y=21,28, z=53,61], EntityCreeper['Creeper'/2024, l='MpServer', x=-48,50, y=30,00, z=49,50], EntityCow['Vaca'/748, l='MpServer', x=-30,63, y=73,00, z=-13,38], EntityZombie['Zombi'/4085, l='MpServer', x=-21,94, y=40,00, z=78,41], EntityCreeper['Creeper'/507, l='MpServer', x=-82,69, y=55,00, z=77,34], EntityCreeper['Creeper'/508, l='MpServer', x=-88,47, y=57,00, z=86,03]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:407)
at net.minecraft.client.Minecraft.func_71396_d(Unknown Source)
at net.minecraft.client.Minecraft.func_99999_d(Unknown Source)
at net.minecraft.client.main.Main.main(SourceFile:120)
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:497)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.8
Operating System: Linux (amd64) version 3.19.8-desktop-3.mga5
Java Version: 1.8.0_60, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 655746928 bytes (625 MB) / 1580654592 bytes (1507 MB) up to 2134114304 bytes (2035 MB)
JVM Flags: 5 total; -Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
IntCache: cache: 0, tcache: 0, allocated: 1, tallocated: 105
FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.3.1521 Optifine OptiFine_1.8_HD_U_D5 46 mods loaded, 46 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{8.0.99.99} [Forge Mod Loader] (forge-1.8-11.14.3.1521.jar) 
UCHIJAAAA	Forge{11.14.3.1521} [Minecraft Forge] (forge-1.8-11.14.3.1521.jar) 
UCHIJAAAA	OldModelLoader{NX3 Build 111} [LMMNX OldModelLoader] (minecraft.jar) 
UCHIJAAAA	PlayerAPI{1.4} [Player API] (minecraft.jar) 
UCHIJAAAA	RenderPlayerAPI{1.5} [Render Player API] (minecraft.jar) 
UCHIJAAAA	SmartCore{1.2.1} [smart Core] (minecraft.jar) 
UCHIJAAAA	battlegear2{1.8} [Mine & Blade Battlegear 2 - Bullseye] (1.8-MB_Battlegear2-Bullseye-1.0.9.0.jar) 
UCHIJAAAA	MoreFurnaces{1.3.11} [More Furnaces] (Better Furnaces Mod 1.8.jar) 
UCHIJAAAA	BiomesOPlenty{3.0.0} [biomes O' Plenty] (BiomesOPlenty-1.8-3.0.0.1461-universal.jar) 
UCHIJAAAA	Bloodmoon{1.2} [bloodmoon] (Bloodmoon-1.3.jar) 
UCHIJAAAA	dldungeonsjdg{1.8.2} [Doomlike Dungeons] (DoomlikeDungeons-1.8.3-MC1.8.jar) 
UCHIJAAAA	DungeonPack{1.8} [DungeonPack] (dungeonpack-1.8.jar) 
UCHIJAAAA	DynamicLights{1.3.9} [Dynamic Lights] (DynamicLights-1.8.jar) 
UCHIJAAAA	DynamicLights_onFire{1.0.5} [Dynamic Lights Burning Entity Module] (DynamicLights-1.8.jar) 
UCHIJAAAA	DynamicLights_creepers{1.0.4} [Dynamic Lights Creeper Module] (DynamicLights-1.8.jar) 
UCHIJAAAA	DynamicLights_dropItems{1.0.8} [Dynamic Lights EntityItem Module] (DynamicLights-1.8.jar) 
UCHIJAAAA	DynamicLights_entityClasses{1.0.1} [Dynamic Lights Entity Light Module] (DynamicLights-1.8.jar) 
UCHIJAAAA	DynamicLights_mobEquipment{1.0.8} [Dynamic Lights Mob Equipment Light Module] (DynamicLights-1.8.jar) 
UCHIJAAAA	DynamicLights_flameArrows{1.0.0} [Dynamic Lights Fiery Arrows Light Module] (DynamicLights-1.8.jar) 
UCHIJAAAA	DynamicLights_floodLights{1.0.2} [Dynamic Lights Flood Light] (DynamicLights-1.8.jar) 
UCHIJAAAA	DynamicLights_otherPlayers{1.0.7} [Dynamic Lights OtherPlayers Light Module] (DynamicLights-1.8.jar) 
UCHIJAAAA	DynamicLights_thePlayer{1.1.3} [Dynamic Lights Player Light Module] (DynamicLights-1.8.jar) 
UCHIJAAAA	net.blacklab.lib{EL1 Build 5} [EBLib] (EBLib-EL1B5-1.8-F1450.jar) 
UCHIJAAAA	EnderZoo{1.8-1.1.24_beta} [Ender Zoo] (Ender-Zoo-Mod-1.8.jar) 
UCHIJAAAA	grim3212core{V0.1 - 1.8} [Grim3212 Core] (Grim3212-Core-V0.1 - 1.8.jar) 
UCHIJAAAA	iChunUtil{5.4.0} [iChunUtil] (iChunUtil-5.4.0.jar) 
UCHIJAAAA	lmmx{NX3 Build 111} [LittleMaidMobNX] (LittleMaidMobNX-NX3B111-1.8-F1450.jar) 
UCHIJAAAA	MMMLibX{NX3 Build 111} [MMMLibX] (LittleMaidMobNX-NX3B111-1.8-F1450.jar) 
UCHIJAAAA	lmmnxapi{8} [LMMNX API] (LittleMaidMobNX-NX3B111-1.8-F1450.jar) 
UCHIJAAAA	minions{1.9.8} [Minions] (Minions-1.8.jar) 
UCHIJAAAA	MobAmputation{5.0.0} [MobAmputation] (MobAmputation-5.0.0.jar) 
UCHIJAAAA	modmercenario{1.8} [modmercenario] (modmercenario-0022_1.8.jar) 
UCHIJAAAA	pokeball{V0.1 - 1.8} [Pokeball] (Pokeball-V0.1 - 1.8.jar) 
UCHIJAAAA	realisticpain{1.0} [Realistic Pain] (Realistic Pain-1.0-1.8.jar) 
UCHIJAAAA	Rediscovered{1.1} [Minecraft Rediscovered Mod] (Rediscovered-1.8-1.1.jar) 
UCHIJAAAA	Roguelike{1.3.6} [Roguelike Dungeons] (RoguelikeDungeons-1.8-1.3.6.jar) 
UCHIJAAAA	AS_Ruins{15.2} [Ruins Spawning System] (Ruins-1.8.jar) 
UCHIJAAAA	SmartCursor{1.5.0} [smartCursor] (SmartCursor-Mod-1.8.jar) 
UCHIJAAAA	SmartMoving{16.2} [smart Moving] (SmartMoving-1.8-16.2.jar) 
UCHIJAAAA	SmartRender{2.1} [smart Render] (SmartRender-1.8-2.1.jar) 
UCHIJAAAA	thirstmod{1.8.15} [Thirst Mod] (thirstmod-1.8.15.jar) 
UCHIJAAAA	worldtools{1.1.1} [World Tools] (World-Tools-Mod-1.8.jar) 
UCHIJAAAA	wormsmod{1.1.2} [Worms Mod] (wormsmod-1.8.x-1.1.2.jar) 
UCHIJAAAA	XaeroMinimap{1.6.2} [Xaero's Minimap] (xaeros_minimap_v1.6.2_Forge_1.8.jar) 
UCHIJAAAA	zeldaswordskills{1.8.1-3.0.1} [Zelda Sword Skills] (Zelda-Sword-Skills-Mod-1.8.jar) 
Loaded coremods (and transformers): 
Mine and Blade: Battlegear2 (1.8-MB_Battlegear2-Bullseye-1.0.9.0.jar)
  mods.battlegear2.coremod.transformers.EntityPlayerTransformer
  mods.battlegear2.coremod.transformers.ModelBipedTransformer
  mods.battlegear2.coremod.transformers.NetClientHandlerTransformer
  mods.battlegear2.coremod.transformers.NetServerHandlerTransformer
  mods.battlegear2.coremod.transformers.PlayerControllerMPTransformer
  mods.battlegear2.coremod.transformers.ItemRendererTransformer
  mods.battlegear2.coremod.transformers.RenderItemTransformer
  mods.battlegear2.coremod.transformers.MinecraftTransformer
  mods.battlegear2.coremod.transformers.ItemStackTransformer
  mods.battlegear2.coremod.transformers.ItemInWorldTransformer
  mods.battlegear2.coremod.transformers.EntityAIControlledByPlayerTransformer
  mods.battlegear2.coremod.transformers.EntityOtherPlayerMPTransformer
MMMCoremod (LittleMaidMobNX-NX3B111-1.8-F1450.jar)
  mmmlibx.lib.multiModel.MMMLoader.MMMTransformer
RenderPlayerAPIPlugin (RenderPlayerAPI-1.8-1.5.jar)
  api.player.forge.RenderPlayerAPITransformer
PlayerAPIPlugin (PlayerAPI-1.8-1.4.jar)
  api.player.forge.PlayerAPITransformer
LoadingPlugin (Bloodmoon-1.3.jar)
  lumien.bloodmoon.asm.ClassTransformer
DLFMLCorePlugin (DynamicLights-1.8.jar)
  atomicstryker.dynamiclights.common.DLTransformer
SmartCorePlugin (SmartMoving-1.8-16.2.jar)
  net.smart.core.SmartCoreTransformer
BOPLoadingPlugin (BiomesOPlenty-1.8-3.0.0.1461-universal.jar)
  
GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 346.72' Renderer: 'GeForce GT 520/PCIe/SSE2'
Launched Version: 1.8-forge1.8-11.14.3.1521
LWJGL: 2.9.1
OpenGL: GeForce GT 520/PCIe/SSE2 GL version 4.5.0 NVIDIA 346.72, NVIDIA Corporation
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 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: No
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: [Minecraft HD(x64) v18.1.5.zip, resources.zip]
Current Language: Español (México)
Profiler Position: N/A (disabled)

 

 

 

 

 

akCreeper.class

package mercenarymod.entidades.hostiles;

import com.google.common.base.Predicate;

import mercenarymod.entidades.armasDisparables;
import mercenarymod.entidades.mobMercenario;
import mercenarymod.entidades.ai.EntityAIakCreeperSwell;
import mercenarymod.items.MercenaryModItems;
import mercenarymod.utilidades.util;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IRangedAttackMob;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIArrowAttack;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIAvoidEntity;
import net.minecraft.entity.ai.EntityAICreeperSwell;
import net.minecraft.entity.ai.EntityAIFollowOwner;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMate;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAITargetNonTamed;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.monster.EntityPigZombie;
import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.entity.passive.EntityRabbit;
import net.minecraft.entity.passive.EntitySheep;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Items;
import net.minecraft.inventory.InventoryBasic;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBow;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.pathfinding.PathNavigateGround;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class akCreeper extends EntityMob implements IRangedAttackMob {
/**
 * Time when this creeper was last in an active state (Messed up code here,
 * probably causes creeper animation to go weird)
 */
private int lastActiveTime;
/**
 * The amount of time since the creeper was close enough to the player to
 * ignite
 */
private int timeSinceIgnited;
private int fuseTime = 30;
/** Explosion radius for this creeper. */
private int explosionRadius = 3;
private int field_175494_bm = 0;
private static final String __OBFID = "CL_00001684";

private int heldItemLeft = 1;
/**
 * Records whether the model should be rendered holding an item in the right
 * hand, and if that item is a block.
 */
private int heldItemRight = 0;

public boolean isSneak = false;
/** Records whether the model should be rendered aiming a bow. */
private boolean aimedBow = false;
private int aimedBowTick = 0;

private int onUpdateTick = 0;

private InventoryBasic mercenaryInventory;

private EntityLivingBase shootingEntity;
private int shootingEntityId = 0;

private Entity targetEntity;
private int targetEntityId = 0;

private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 20, 10, 30.0F);
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);

public akCreeper(World worldIn) {
	super(worldIn);

	this.setSize(0.6F, 1.8F);

	this.tasks.addTask(1, new EntityAISwimming(this));
	this.tasks.addTask(2, this.field_175455_a);

	// this.tasks.addTask(6, new EntityAIakCreeperSwell(this));

	this.tasks.addTask(3, new EntityAIAvoidEntity(this, new Predicate() {
		private static final String __OBFID = "CL_00002224";

		public boolean func_179958_a(Entity p_179958_1_) {
			return p_179958_1_ instanceof EntityOcelot;
		}

		public boolean apply(Object p_apply_1_) {
			return this.func_179958_a((Entity) p_apply_1_);
		}
	}, 6.0F, 1.0D, 1.2D));

	((PathNavigateGround) this.getNavigator()).func_179690_a(true);
	this.tasks.addTask(1, new EntityAISwimming(this));

	this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
	this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	this.tasks.addTask(9, new EntityAILookIdle(this));

	this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[0]));

	this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));

	this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, mobMercenario.class, true));

	this.targetTasks.addTask(4, new EntityAINearestAttackableTarget(this, EntityVillager.class, true));



	this.tasks.addTask(3, new EntityAIAvoidEntity(this, new Predicate() {
		private static final String __OBFID = "CL_00002203";

		public boolean func_179945_a(Entity p_179945_1_) {
			return p_179945_1_ instanceof EntityCreeper;
		}

		public boolean apply(Object p_apply_1_) {
			return this.func_179945_a((Entity) p_apply_1_);
		}
	}, 6.0F, 1.0D, 1.2D));


	/*
	ItemStack ak200 = new ItemStack(MercenaryModItems.fusil200AKG, 1, 4);
	mercenarymod.items.armasdefuego.fusil200akg.fusil200AKG.intialize(ak200);
	util.setInttag(ak200, "municion", 999);
	 */

	ItemStack ak47 = new ItemStack(MercenaryModItems.fusil47AKG, 1, 4);
	mercenarymod.items.armasdefuego.fusil47akg.fusil47AKG.intialize(ak47);
	util.setInttag(ak47, "municion", 999);


	this.setCurrentItemOrArmor(0, ak47);

	if (worldIn != null && !worldIn.isRemote) {
		this.setCombatTask();
	}

}

protected void applyEntityAttributes() {
	super.applyEntityAttributes();
	this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.20D); // 0.25D

}

/**
 * The maximum height from where the entity is alowed to jump (used in
 * pathfinder)
 */
public int getMaxFallHeight() {
	return this.getAttackTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F);
}

public void fall(float distance, float damageMultiplier) {
	super.fall(distance, damageMultiplier);
	this.timeSinceIgnited = (int) ((float) this.timeSinceIgnited + distance * 1.5F);

	if (this.timeSinceIgnited > this.fuseTime - 5) {
		this.timeSinceIgnited = this.fuseTime - 5;
	}
}

protected void entityInit() {
	super.entityInit();
	this.dataWatcher.addObject(16, Byte.valueOf((byte) -1));
	this.dataWatcher.addObject(17, Byte.valueOf((byte) 0));
	this.dataWatcher.addObject(18, Byte.valueOf((byte) 0));

	// variables del render
	// a aimedBow boolean
	// s isSneak boolean
	// r heldItemRight int 0~4
	// l heldItemLeft int 0~1

	int lrsa = 0;
	this.dataWatcher.addObject(22, lrsa);
}

/**
 * (abstract) Protected helper method to write subclass entity data to NBT.
 */
public void writeEntityToNBT(NBTTagCompound tagCompound) {
	super.writeEntityToNBT(tagCompound);

	if (this.dataWatcher.getWatchableObjectByte(17) == 1) {
		tagCompound.setBoolean("powered", true);
	}

	tagCompound.setShort("Fuse", (short) this.fuseTime);
	tagCompound.setByte("ExplosionRadius", (byte) this.explosionRadius);
	tagCompound.setBoolean("ignited", this.func_146078_ca());
}
// #################################################################################################################

/**
 * sets this entity's combat AI.
 */

public void setCombatTask() {

	this.tasks.removeTask(this.aiAttackOnCollide);
	this.tasks.removeTask(this.aiArrowAttack);
	ItemStack itemstack = this.getHeldItem();

	if (armasDisparables.esDisparable(itemstack)) {
		this.tasks.addTask(4, this.aiArrowAttack);
	} else {
		this.tasks.addTask(4, this.aiAttackOnCollide);
	}
}

// #################################################################################################################

/**
 * (abstract) Protected helper method to read subclass entity data from NBT.
 */
public void readEntityFromNBT(NBTTagCompound tagCompund) {
	super.readEntityFromNBT(tagCompund);
	this.dataWatcher.updateObject(17, Byte.valueOf((byte) (tagCompund.getBoolean("powered") ? 1 : 0)));

	if (tagCompund.hasKey("Fuse", 99)) {
		this.fuseTime = tagCompund.getShort("Fuse");
	}

	if (tagCompund.hasKey("ExplosionRadius", 99)) {
		this.explosionRadius = tagCompund.getByte("ExplosionRadius");
	}

	if (tagCompund.getBoolean("ignited")) {
		this.func_146079_cb();
	}

	this.setCombatTask();

	this.setCanPickUpLoot(false);

}
// #################################################################################################################

/**
 * Attack the specified entity using a ranged attack.
 */
@Override
public void attackEntityWithRangedAttack(EntityLivingBase target, float p_82196_2_) {

	ItemStack itemstack = this.getHeldItem();
	targetEntityId = target.getEntityId();

	if (itemstack != null) {
		Item cosa = itemstack.getItem();
		if (cosa == Items.bow) {

			EntityArrow entityarrow = new EntityArrow(this.worldObj, this, target, 1.6F, (float) (14 - this.worldObj.getDifficulty().getDifficultyId() * 4));
			int i = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, this.getHeldItem());
			int j = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, this.getHeldItem());
			entityarrow.setDamage((double) (p_82196_2_ * 2.0F) + this.rand.nextGaussian() * 0.25D + (double) ((float) this.worldObj.getDifficulty().getDifficultyId() * 0.11F));

			if (i > 0) {
				entityarrow.setDamage(entityarrow.getDamage() + (double) i * 0.5D + 0.5D);
			}

			if (j > 0) {
				entityarrow.setKnockbackStrength(j);
			}
			this.worldObj.spawnEntityInWorld(entityarrow);

		}
	}

	this.targetEntity = target;

	// noEstaMuyLejosNiEstaObstruido(this, target, 30.0F);

	this.swingItem();

}

// #################################################################################################################
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate() {
	super.onUpdate();
	/*
	 * if (this.isEntityAlive()) {
	 * 
	 * 
	 * this.lastActiveTime = this.timeSinceIgnited;
	 * 
	 * if (this.func_146078_ca()) { this.setCreeperState(1); }
	 * 
	 * 
	 * int i = this.getCreeperState();
	 * 
	 * if (i > 0 && this.timeSinceIgnited == 0) {
	 * this.playSound("creeper.primed", 1.0F, 0.5F); }
	 * 
	 * this.timeSinceIgnited += i;
	 * 
	 * if (this.timeSinceIgnited < 0) { this.timeSinceIgnited = 0; }
	 * 
	 * if (this.timeSinceIgnited >= this.fuseTime) { this.timeSinceIgnited =
	 * this.fuseTime; this.explode(); } }
	 */

	// actualizar variables del render atravez del dataWacher
	// variables del render
	// a aimedBow boolean
	// s isSneak boolean
	// r heldItemRight int 0~4
	// l heldItemLeft int 0~1

	int lrsa = 0;

	if (!this.worldObj.isRemote) {

		if (aimedBow) {
			lrsa = lrsa + 1;
		}
		if (isSneak) {
			lrsa = lrsa + 10;
		}
		if (heldItemRight > 0) {
			lrsa = lrsa + (heldItemRight * 100);
		}
		if (heldItemLeft > 0) {
			lrsa = lrsa + (heldItemLeft * 100);
		}

		this.dataWatcher.updateObject(22, (int)lrsa);
	} else {
		lrsa = this.dataWatcher.getWatchableObjectInt(22);

		aimedBow = false;
		if ((lrsa % 10) > 0) {
			aimedBow = true;
		}

		isSneak = false;
		if (((lrsa % 100) / 10) > 0) {
			isSneak = true;
		}

		heldItemRight = ((lrsa % 1000) / 100);
		heldItemLeft = ((lrsa % 10000) / 1000);

	}

	// ##################################
	// corregir altura del disparo
	if (targetEntity != null) {
		shootingEntity = this;

		aimedBowTick = 10;

		/*
		 * System.out.println("\n\n\n");
		 * 
		 * System.out.println("#sh="+shootingEntity.getName() );
		 * System.out.println("#tg="+targetEntity.getName() );
		 * 
		 * System.out.println("tg height="+targetEntity.height);
		 * System.out.println("tg eye="+targetEntity.getEyeHeight());
		 */

		double x = shootingEntity.posX;
		double y = shootingEntity.posY;
		double z = shootingEntity.posZ;

		float yaw = shootingEntity.getRotationYawHead(); // shootingEntity.rotationYaw;
		float pitch = shootingEntity.rotationPitch; // vallestaMercenaria

		// System.out.println("pitch1 = "+pitch);

		// shootingEntity.height;

		this.posY = shootingEntity.posY + (double) shootingEntity.getEyeHeight() - 0.10000000149011612D;
		double d0 = targetEntity.posX - shootingEntity.posX;
		double d1 = (targetEntity.posY + targetEntity.getEyeHeight()) - (shootingEntity.posY); /// 3.0F
																								/// targetEntity.getEntityBoundingBox().minY
																								/// +
																								/// (double)
																								/// //+
																								/// shootingEntity.getEyeHeight()
		double d2 = targetEntity.posZ - shootingEntity.posZ;
		double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2);

		if (d3 >= 1.0E-7D) {
			float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
			// float f3 = (float) (-(Math.atan2(d1, d3) * 180.0D /
			// Math.PI)); //-
			float f3 = (float) ((Math.tan(d1 / d3)) * 180.0D / Math.PI); // -

			float f4 = (float) ((Math.atan(d1 / d3) * -1) * 180.0D / Math.PI); // -
																				// *
																				// 180.0D
																				// /
																				// Math.PI1

			/*
			 * System.out.println("altura = "+d1); System.out.println(
			 * "distancia = "+d3);
			 * 
			 * System.out.println("f3 = "+f3); System.out.println("f4 = "
			 * +f4);
			 */
			pitch = f4; // pitch -
			// System.out.println("pitch2 = "+pitch);

		}

		shootingEntity.setPositionAndRotation(x, y, z, yaw, pitch);

		// terminar una vez este muerto el objetivo
		if (!targetEntity.isEntityAlive()) {
			targetEntity = null;
		}

	}
	// ##################################

	// ### AimedBow ticks

	if (!this.worldObj.isRemote) {
		if (aimedBowTick > 0 | aimedBow) {
			aimedBow = true;

			if (aimedBowTick < 2) {
				aimedBow = false;
			}
			aimedBowTick--;
		}
	}

	onUpdateTick++;

}

// #################################################################################################################
/**
 * Returns the sound this mob makes when it is hurt.
 */
protected String getHurtSound() {
	return "mob.creeper.say";
}

/**
 * Returns the sound this mob makes on death.
 */
protected String getDeathSound() {
	return "mob.creeper.death";
}

/**
 * Called when the mob's health reaches 0.
 */
public void onDeath(DamageSource cause) {
	super.onDeath(cause);

	if (cause.getEntity() instanceof EntitySkeleton) {
		int i = Item.getIdFromItem(Items.record_13);
		int j = Item.getIdFromItem(Items.record_wait);
		int k = i + this.rand.nextInt(j - i + 1);
		this.dropItem(Item.getItemById(k), 1);
	} else if (cause.getEntity() instanceof akCreeper && cause.getEntity() != this && ((akCreeper) cause.getEntity()).getPowered() && ((akCreeper) cause.getEntity()).isAIEnabled()) {
		((akCreeper) cause.getEntity()).func_175493_co();
		this.entityDropItem(new ItemStack(Items.skull, 1, 4), 0.0F);
	}

	this.entityDropItem(new ItemStack(MercenaryModItems.bala76239mm_Standar, 0, 4), 0.0F);

}

public boolean attackEntityAsMob(Entity p_70652_1_) {
	return true;
}

/**
 * Returns true if the creeper is powered by a lightning bolt.
 */
public boolean getPowered() {
	return this.dataWatcher.getWatchableObjectByte(17) == 1;
}

/**
 * Params: (Float)Render tick. Returns the intensity of the creeper's flash
 * when it is ignited.
 */
@SideOnly(Side.CLIENT)
public float getCreeperFlashIntensity(float p_70831_1_) {
	return ((float) this.lastActiveTime + (float) (this.timeSinceIgnited - this.lastActiveTime) * p_70831_1_) / (float) (this.fuseTime - 2);
}

protected Item getDropItem() {
	return MercenaryModItems.bala76239mm_Standar;// gunpowder;
}

/**
 * Returns the current state of creeper, -1 is idle, 1 is 'in fuse'
 */
public int getCreeperState() {
	return this.dataWatcher.getWatchableObjectByte(16);
}

/**
 * Sets the state of creeper, -1 to idle and 1 to be 'in fuse'
 */
public void setCreeperState(int p_70829_1_) {
	this.dataWatcher.updateObject(16, Byte.valueOf((byte) p_70829_1_));
}

/**
 * Called when a lightning bolt hits the entity.
 */
public void onStruckByLightning(EntityLightningBolt lightningBolt) {
	super.onStruckByLightning(lightningBolt);
	this.dataWatcher.updateObject(17, Byte.valueOf((byte) 1));
}

/**
 * Called when a player interacts with a mob. e.g. gets milk from a cow,
 * gets into the saddle on a pig.
 */
protected boolean interact(EntityPlayer player) {
	ItemStack itemstack = player.inventory.getCurrentItem();

	if (itemstack != null && itemstack.getItem() == Items.flint_and_steel) {
		this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.ignite", 1.0F, this.rand.nextFloat() * 0.4F + 0.8F);
		player.swingItem();

		if (!this.worldObj.isRemote) {
			this.func_146079_cb();
			itemstack.damageItem(1, player);
			return true;
		}
	}

	return super.interact(player);
}

/**
 * Creates an explosion as determined by this creeper's power and explosion
 * radius.
 */
private void explode() {
	if (!this.worldObj.isRemote) {
		boolean flag = this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing");
		float f = this.getPowered() ? 2.0F : 1.0F;
		this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float) this.explosionRadius * f, flag);
		this.setDead();
	}
}

public boolean func_146078_ca() {
	return this.dataWatcher.getWatchableObjectByte(18) != 0;
}

public void func_146079_cb() {
	this.dataWatcher.updateObject(18, Byte.valueOf((byte) 1));
}

/**
 * Returns true if the newer Entity AI code should be run
 */
public boolean isAIEnabled() {
	return this.field_175494_bm < 1 && this.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot");
}

public void func_175493_co() {
	++this.field_175494_bm;
}

// #################################################################################################################
@Override
public boolean allowLeashing() {
	return super.allowLeashing();
}

// #################################################################################################################
public boolean getAimedBow() {
	return aimedBow;
}

// #################################################################################################################
public void setAimedBow(boolean a) {
	aimedBow = a;
}

// #################################################################################################################
public boolean getisSneak() {
	return isSneak;
}

// #################################################################################################################
public void setisSneak(boolean s) {
	isSneak = s;
}

// #################################################################################################################
public int getHeldItemRight() {
	return heldItemRight;
}

// #################################################################################################################
public void setHeldItemRight(int r) {
	heldItemRight = r;
}

// #################################################################################################################
public int getHeldItemLeft() {
	return heldItemLeft;
}

// #################################################################################################################
public void setHeldItemLeft(int r) {
	heldItemLeft = r;
}

}

 

 

Posted

ñaa i founded

and wass mi error

the int entityID = EntityRegistry.findGlobalUniqueEntityId(); 

for some reason it only retrun 3

all mi entityes was register whith nunber 3

i remove the unique EntityId and set manualy numbers from 1 to 8  and then is now fixed

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

    • 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.