diff --git a/MakeSignedClient.bat b/MakeSignedClient.bat index 90434db..b3679e7 100644 --- a/MakeSignedClient.bat +++ b/MakeSignedClient.bat @@ -1,4 +1,4 @@ @echo off title MakeSignedClient -java -cp "desktopRuntime/MakeOfflineDownload.jar;desktopRuntime/CompileEPK.jar" net.lax1dude.eaglercraft.v1_8.buildtools.workspace.MakeSignedClient "javascript/SignedBundleTemplate.txt" "javascript/classes.js" "javascript/assets.epk" "javascript/lang" "javascript/SignedClientTemplate.txt" "javascript/UpdateDownloadSources.txt" "javascript/EaglercraftX_1.8_Offline_Signed_Client.html" +java -cp "resources/MakeOfflineDownload.jar;resources/CompileEPK.jar" net.lax1dude.eaglercraft.v1_8.buildtools.workspace.MakeSignedClient "javascript/SignedBundleTemplate.txt" "javascript/classes.js" "javascript/assets.epk" "javascript/lang" "javascript/SignedClientTemplate.txt" "javascript/UpdateDownloadSources.txt" "javascript/EaglercraftX_1.8_Offline_Signed_Client.html" pause \ No newline at end of file diff --git a/resources/resources/assets/minecraft/sounds - Copy.json b/resources/resources/assets/minecraft/sounds - Copy.json new file mode 100644 index 0000000..ba3f65a --- /dev/null +++ b/resources/resources/assets/minecraft/sounds - Copy.json @@ -0,0 +1,2031 @@ +{ + "ambient.cave.cave": { + "category": "ambient", + "sounds": [ + "ambient/cave/cave1", + "ambient/cave/cave10", + "ambient/cave/cave11", + "ambient/cave/cave12", + "ambient/cave/cave13", + "ambient/cave/cave2", + "ambient/cave/cave3", + "ambient/cave/cave4", + "ambient/cave/cave5", + "ambient/cave/cave6", + "ambient/cave/cave7", + "ambient/cave/cave8", + "ambient/cave/cave9" + ] + }, + "ambient.weather.rain": { + "category": "weather", + "sounds": [ + "ambient/weather/rain1", + "ambient/weather/rain2", + "ambient/weather/rain3", + "ambient/weather/rain4" + ] + }, + "ambient.weather.thunder": { + "category": "weather", + "sounds": [ + "ambient/weather/thunder1", + "ambient/weather/thunder2", + "ambient/weather/thunder3" + ] + }, + "game.player.hurt.fall.big": { + "category": "player", + "sounds": [ + "damage/fallbig" + ] + }, + "game.player.hurt.fall.small": { + "category": "player", + "sounds": [ + "damage/fallsmall" + ] + }, + "game.neutral.hurt.fall.big": { + "category": "neutral", + "sounds": [ + "damage/fallbig" + ] + }, + "game.neutral.hurt.fall.small": { + "category": "neutral", + "sounds": [ + "damage/fallsmall" + ] + }, + "game.hostile.hurt.fall.big": { + "category": "hostile", + "sounds": [ + "damage/fallbig" + ] + }, + "game.hostile.hurt.fall.small": { + "category": "hostile", + "sounds": [ + "damage/fallsmall" + ] + }, + "game.player.hurt": { + "category": "player", + "sounds": [ + "damage/hit1", + "damage/hit2", + "damage/hit3" + ] + }, + "game.neutral.hurt": { + "category": "neutral", + "sounds": [ + "damage/hit1", + "damage/hit2", + "damage/hit3" + ] + }, + "game.hostile.hurt": { + "category": "hostile", + "sounds": [ + "damage/hit1", + "damage/hit2", + "damage/hit3" + ] + }, + "game.player.die": { + "category": "player", + "sounds": [ + "damage/hit1", + "damage/hit2", + "damage/hit3" + ] + }, + "game.neutral.die": { + "category": "neutral", + "sounds": [ + "damage/hit1", + "damage/hit2", + "damage/hit3" + ] + }, + "game.hostile.die": { + "category": "hostile", + "sounds": [ + "damage/hit1", + "damage/hit2", + "damage/hit3" + ] + }, + "dig.cloth": { + "category": "block", + "sounds": [ + "dig/cloth1", + "dig/cloth2", + "dig/cloth3", + "dig/cloth4" + ] + }, + "dig.grass": { + "category": "block", + "sounds": [ + "dig/grass1", + "dig/grass2", + "dig/grass3", + "dig/grass4" + ] + }, + "dig.gravel": { + "category": "block", + "sounds": [ + "dig/gravel1", + "dig/gravel2", + "dig/gravel3", + "dig/gravel4" + ] + }, + "dig.sand": { + "category": "block", + "sounds": [ + "dig/sand1", + "dig/sand2", + "dig/sand3", + "dig/sand4" + ] + }, + "dig.snow": { + "category": "block", + "sounds": [ + "dig/snow1", + "dig/snow2", + "dig/snow3", + "dig/snow4" + ] + }, + "dig.stone": { + "category": "block", + "sounds": [ + "dig/stone1", + "dig/stone2", + "dig/stone3", + "dig/stone4" + ] + }, + "dig.wood": { + "category": "block", + "sounds": [ + "dig/wood1", + "dig/wood2", + "dig/wood3", + "dig/wood4" + ] + }, + "fire.fire": { + "category": "block", + "sounds": [ + "fire/fire" + ] + }, + "fire.ignite": { + "category": "block", + "sounds": [ + "fire/ignite" + ] + }, + "item.fireCharge.use": { + "category": "block", + "sounds": [ + "mob/ghast/fireball4" + ] + }, + "fireworks.blast": { + "category": "ambient", + "sounds": [ + "fireworks/blast1" + ] + }, + "fireworks.blast_far": { + "category": "ambient", + "sounds": [ + "fireworks/blast_far1" + ] + }, + "fireworks.largeBlast": { + "category": "ambient", + "sounds": [ + "fireworks/largeBlast1" + ] + }, + "fireworks.largeBlast_far": { + "category": "ambient", + "sounds": [ + "fireworks/largeBlast_far1" + ] + }, + "fireworks.launch": { + "category": "ambient", + "sounds": [ + "fireworks/launch1" + ] + }, + "fireworks.twinkle": { + "category": "ambient", + "sounds": [ + "fireworks/twinkle1" + ] + }, + "fireworks.twinkle_far": { + "category": "ambient", + "sounds": [ + "fireworks/twinkle_far1" + ] + }, + "liquid.lava": { + "category": "block", + "sounds": [ + "liquid/lava" + ] + }, + "liquid.lavapop": { + "category": "block", + "sounds": [ + "liquid/lavapop" + ] + }, + "game.neutral.swim.splash": { + "category": "neutral", + "sounds": [ + "liquid/splash", + "liquid/splash2" + ] + }, + "game.player.swim.splash": { + "category": "block", + "sounds": [ + "liquid/splash", + "liquid/splash2" + ] + }, + "game.hostile.swim.splash": { + "category": "hostile", + "sounds": [ + "liquid/splash", + "liquid/splash2" + ] + }, + "game.player.swim": { + "category": "player", + "sounds": [ + "liquid/swim1", + "liquid/swim2", + "liquid/swim3", + "liquid/swim4" + ] + }, + "game.neutral.swim": { + "category": "neutral", + "sounds": [ + "liquid/swim1", + "liquid/swim2", + "liquid/swim3", + "liquid/swim4" + ] + }, + "game.hostile.swim": { + "category": "hostile", + "sounds": [ + "liquid/swim1", + "liquid/swim2", + "liquid/swim3", + "liquid/swim4" + ] + }, + "liquid.water": { + "category": "block", + "sounds": [ + "liquid/water" + ] + }, + "minecart.base": { + "category": "neutral", + "sounds": [ + "minecart/base" + ] + }, + "minecart.inside": { + "category": "player", + "sounds": [ + "minecart/inside" + ] + }, + "mob.bat.death": { + "category": "neutral", + "sounds": [ + "mob/bat/death" + ] + }, + "mob.bat.hurt": { + "category": "neutral", + "sounds": [ + "mob/bat/hurt1", + "mob/bat/hurt2", + "mob/bat/hurt3", + "mob/bat/hurt4" + ] + }, + "mob.bat.idle": { + "category": "neutral", + "sounds": [ + "mob/bat/idle1", + "mob/bat/idle2", + "mob/bat/idle3", + "mob/bat/idle4" + ] + }, + "mob.bat.loop": { + "category": "neutral", + "sounds": [ + "mob/bat/loop" + ] + }, + "mob.bat.takeoff": { + "category": "neutral", + "sounds": [ + "mob/bat/takeoff" + ] + }, + "mob.blaze.breathe": { + "category": "hostile", + "sounds": [ + "mob/blaze/breathe1", + "mob/blaze/breathe2", + "mob/blaze/breathe3", + "mob/blaze/breathe4" + ] + }, + "mob.blaze.death": { + "category": "hostile", + "sounds": [ + "mob/blaze/death" + ] + }, + "mob.blaze.hit": { + "category": "hostile", + "sounds": [ + "mob/blaze/hit1", + "mob/blaze/hit2", + "mob/blaze/hit3", + "mob/blaze/hit4" + ] + }, + "mob.guardian.hit": { + "category": "hostile", + "sounds": [ + "mob/guardian/guardian_hit1", + "mob/guardian/guardian_hit2", + "mob/guardian/guardian_hit3", + "mob/guardian/guardian_hit4" + ] + }, + "mob.guardian.idle": { + "category": "hostile", + "sounds": [ + { + "name": "mob/guardian/guardian_idle1", + "volume": 0.1 + }, + { + "name": "mob/guardian/guardian_idle2", + "volume": 0.1 + }, + { + "name": "mob/guardian/guardian_idle3", + "volume": 0.1 + }, + { + "name": "mob/guardian/guardian_idle4", + "volume": 0.1 + } + ] + }, + "mob.guardian.death": { + "category": "hostile", + "sounds": [ + "mob/guardian/guardian_death" + ] + }, + "mob.guardian.elder.hit": { + "category": "hostile", + "sounds": [ + "mob/guardian/elder_hit1", + "mob/guardian/elder_hit2", + "mob/guardian/elder_hit3", + "mob/guardian/elder_hit4" + ] + }, + "mob.guardian.elder.idle": { + "category": "hostile", + "sounds": [ + "mob/guardian/elder_idle1", + "mob/guardian/elder_idle2", + "mob/guardian/elder_idle3", + "mob/guardian/elder_idle4" + ] + }, + "mob.guardian.elder.death": { + "category": "hostile", + "sounds": [ + "mob/guardian/elder_death" + ] + }, + "mob.guardian.land.hit": { + "category": "hostile", + "sounds": [ + "mob/guardian/land_hit1", + "mob/guardian/land_hit2", + "mob/guardian/land_hit3", + "mob/guardian/land_hit4" + ] + }, + "mob.guardian.land.idle": { + "category": "hostile", + "sounds": [ + "mob/guardian/land_idle1", + "mob/guardian/land_idle2", + "mob/guardian/land_idle3", + "mob/guardian/land_idle4" + ] + }, + "mob.guardian.land.death": { + "category": "hostile", + "sounds": [ + "mob/guardian/land_death" + ] + }, + "mob.guardian.curse": { + "category": "hostile", + "sounds": [ + "mob/guardian/curse" + ] + }, + "mob.guardian.attack": { + "category": "hostile", + "sounds": [ + "mob/guardian/attack_loop" + ] + }, + "mob.guardian.flop": { + "category": "hostile", + "sounds": [ + "mob/guardian/flop1", + "mob/guardian/flop2", + "mob/guardian/flop3", + "mob/guardian/flop4" + ] + }, + "mob.cat.hiss": { + "category": "neutral", + "sounds": [ + "mob/cat/hiss1", + "mob/cat/hiss2", + "mob/cat/hiss3" + ] + }, + "mob.cat.hitt": { + "category": "neutral", + "sounds": [ + "mob/cat/hitt1", + "mob/cat/hitt2", + "mob/cat/hitt3" + ] + }, + "mob.cat.meow": { + "category": "neutral", + "sounds": [ + "mob/cat/meow1", + "mob/cat/meow2", + "mob/cat/meow3", + "mob/cat/meow4" + ] + }, + "mob.cat.purr": { + "category": "neutral", + "sounds": [ + "mob/cat/purr1", + "mob/cat/purr2", + "mob/cat/purr3" + ] + }, + "mob.cat.purreow": { + "category": "neutral", + "sounds": [ + "mob/cat/purreow1", + "mob/cat/purreow2" + ] + }, + "mob.chicken.hurt": { + "category": "neutral", + "sounds": [ + "mob/chicken/hurt1", + "mob/chicken/hurt2" + ] + }, + "mob.chicken.plop": { + "category": "neutral", + "sounds": [ + "mob/chicken/plop" + ] + }, + "mob.chicken.say": { + "category": "neutral", + "sounds": [ + "mob/chicken/say1", + "mob/chicken/say2", + "mob/chicken/say3" + ] + }, + "mob.chicken.step": { + "category": "neutral", + "sounds": [ + "mob/chicken/step1", + "mob/chicken/step2" + ] + }, + "mob.cow.hurt": { + "category": "neutral", + "sounds": [ + "mob/cow/hurt1", + "mob/cow/hurt2", + "mob/cow/hurt3" + ] + }, + "mob.cow.say": { + "category": "neutral", + "sounds": [ + "mob/cow/say1", + "mob/cow/say2", + "mob/cow/say3", + "mob/cow/say4" + ] + }, + "mob.cow.step": { + "category": "neutral", + "sounds": [ + "mob/cow/step1", + "mob/cow/step2", + "mob/cow/step3", + "mob/cow/step4" + ] + }, + "mob.creeper.death": { + "category": "hostile", + "sounds": [ + "mob/creeper/death" + ] + }, + "mob.creeper.say": { + "category": "hostile", + "sounds": [ + "mob/creeper/say1", + "mob/creeper/say2", + "mob/creeper/say3", + "mob/creeper/say4" + ] + }, + "mob.enderdragon.end": { + "category": "hostile", + "sounds": [ + "mob/enderdragon/end" + ] + }, + "mob.enderdragon.growl": { + "category": "hostile", + "sounds": [ + "mob/enderdragon/growl1", + "mob/enderdragon/growl2", + "mob/enderdragon/growl3", + "mob/enderdragon/growl4" + ] + }, + "mob.enderdragon.hit": { + "category": "hostile", + "sounds": [ + "mob/enderdragon/hit1", + "mob/enderdragon/hit2", + "mob/enderdragon/hit3", + "mob/enderdragon/hit4" + ] + }, + "mob.enderdragon.wings": { + "category": "hostile", + "sounds": [ + "mob/enderdragon/wings1", + "mob/enderdragon/wings2", + "mob/enderdragon/wings3", + "mob/enderdragon/wings4", + "mob/enderdragon/wings5", + "mob/enderdragon/wings6" + ] + }, + "mob.endermen.death": { + "category": "hostile", + "sounds": [ + "mob/endermen/death" + ] + }, + "mob.endermen.hit": { + "category": "hostile", + "sounds": [ + "mob/endermen/hit1", + "mob/endermen/hit2", + "mob/endermen/hit3", + "mob/endermen/hit4" + ] + }, + "mob.endermen.idle": { + "category": "hostile", + "sounds": [ + "mob/endermen/idle1", + "mob/endermen/idle2", + "mob/endermen/idle3", + "mob/endermen/idle4", + "mob/endermen/idle5" + ] + }, + "mob.endermen.portal": { + "category": "hostile", + "sounds": [ + "mob/endermen/portal", + "mob/endermen/portal2" + ] + }, + "mob.endermen.scream": { + "category": "hostile", + "sounds": [ + "mob/endermen/scream1", + "mob/endermen/scream2", + "mob/endermen/scream3", + "mob/endermen/scream4" + ] + }, + "mob.endermen.stare": { + "category": "hostile", + "sounds": [ + "mob/endermen/stare" + ] + }, + "mob.ghast.affectionate_scream": { + "category": "hostile", + "sounds": [ + "mob/ghast/affectionate_scream" + ] + }, + "mob.ghast.charge": { + "category": "hostile", + "sounds": [ + "mob/ghast/charge" + ] + }, + "mob.ghast.death": { + "category": "hostile", + "sounds": [ + "mob/ghast/death" + ] + }, + "mob.ghast.fireball": { + "category": "hostile", + "sounds": [ + "mob/ghast/fireball4" + ] + }, + "mob.ghast.moan": { + "category": "hostile", + "sounds": [ + "mob/ghast/moan1", + "mob/ghast/moan2", + "mob/ghast/moan3", + "mob/ghast/moan4", + "mob/ghast/moan5", + "mob/ghast/moan6", + "mob/ghast/moan7" + ] + }, + "mob.ghast.scream": { + "category": "hostile", + "sounds": [ + "mob/ghast/scream1", + "mob/ghast/scream2", + "mob/ghast/scream3", + "mob/ghast/scream4", + "mob/ghast/scream5" + ] + }, + "mob.horse.angry": { + "category": "neutral", + "sounds": [ + "mob/horse/angry1" + ] + }, + "mob.horse.armor": { + "category": "neutral", + "sounds": [ + "mob/horse/armor" + ] + }, + "mob.horse.breathe": { + "category": "neutral", + "sounds": [ + "mob/horse/breathe1", + "mob/horse/breathe2", + "mob/horse/breathe3" + ] + }, + "mob.horse.death": { + "category": "neutral", + "sounds": [ + "mob/horse/death" + ] + }, + "mob.horse.donkey.angry": { + "category": "neutral", + "sounds": [ + "mob/horse/donkey/angry1", + "mob/horse/donkey/angry2" + ] + }, + "mob.horse.donkey.death": { + "category": "neutral", + "sounds": [ + "mob/horse/donkey/death" + ] + }, + "mob.horse.donkey.hit": { + "category": "neutral", + "sounds": [ + "mob/horse/donkey/hit1", + "mob/horse/donkey/hit2", + "mob/horse/donkey/hit3" + ] + }, + "mob.horse.donkey.idle": { + "category": "neutral", + "sounds": [ + "mob/horse/donkey/idle1", + "mob/horse/donkey/idle2", + "mob/horse/donkey/idle3" + ] + }, + "mob.horse.gallop": { + "category": "neutral", + "sounds": [ + "mob/horse/gallop1", + "mob/horse/gallop2", + "mob/horse/gallop3", + "mob/horse/gallop4" + ] + }, + "mob.horse.hit": { + "category": "neutral", + "sounds": [ + "mob/horse/hit1", + "mob/horse/hit2", + "mob/horse/hit3", + "mob/horse/hit4" + ] + }, + "mob.horse.idle": { + "category": "neutral", + "sounds": [ + "mob/horse/idle1", + "mob/horse/idle2", + "mob/horse/idle3" + ] + }, + "mob.horse.jump": { + "category": "neutral", + "sounds": [ + "mob/horse/jump" + ] + }, + "mob.horse.land": { + "category": "neutral", + "sounds": [ + "mob/horse/land" + ] + }, + "mob.horse.leather": { + "category": "neutral", + "sounds": [ + "mob/horse/leather" + ] + }, + "mob.horse.skeleton.death": { + "category": "neutral", + "sounds": [ + "mob/horse/skeleton/death" + ] + }, + "mob.horse.skeleton.hit": { + "category": "neutral", + "sounds": [ + "mob/horse/skeleton/hit1", + "mob/horse/skeleton/hit2", + "mob/horse/skeleton/hit3", + "mob/horse/skeleton/hit4" + ] + }, + "mob.horse.skeleton.idle": { + "category": "neutral", + "sounds": [ + "mob/horse/skeleton/idle1", + "mob/horse/skeleton/idle2", + "mob/horse/skeleton/idle3" + ] + }, + "mob.horse.soft": { + "category": "neutral", + "sounds": [ + "mob/horse/soft1", + "mob/horse/soft2", + "mob/horse/soft3", + "mob/horse/soft4", + "mob/horse/soft5", + "mob/horse/soft6" + ] + }, + "mob.horse.wood": { + "category": "neutral", + "sounds": [ + "mob/horse/wood1", + "mob/horse/wood2", + "mob/horse/wood3", + "mob/horse/wood4", + "mob/horse/wood5", + "mob/horse/wood6" + ] + }, + "mob.horse.zombie.death": { + "category": "neutral", + "sounds": [ + "mob/horse/zombie/death" + ] + }, + "mob.horse.zombie.hit": { + "category": "neutral", + "sounds": [ + "mob/horse/zombie/hit1", + "mob/horse/zombie/hit2", + "mob/horse/zombie/hit3", + "mob/horse/zombie/hit4" + ] + }, + "mob.horse.zombie.idle": { + "category": "neutral", + "sounds": [ + "mob/horse/zombie/idle1", + "mob/horse/zombie/idle2", + "mob/horse/zombie/idle3" + ] + }, + "mob.irongolem.death": { + "category": "neutral", + "sounds": [ + "mob/irongolem/death" + ] + }, + "mob.irongolem.hit": { + "category": "neutral", + "sounds": [ + "mob/irongolem/hit1", + "mob/irongolem/hit2", + "mob/irongolem/hit3", + "mob/irongolem/hit4" + ] + }, + "mob.irongolem.throw": { + "category": "neutral", + "sounds": [ + "mob/irongolem/throw" + ] + }, + "mob.irongolem.walk": { + "category": "neutral", + "sounds": [ + "mob/irongolem/walk1", + "mob/irongolem/walk2", + "mob/irongolem/walk3", + "mob/irongolem/walk4" + ] + }, + "mob.magmacube.big": { + "category": "hostile", + "sounds": [ + "mob/magmacube/big1", + "mob/magmacube/big2", + "mob/magmacube/big3", + "mob/magmacube/big4" + ] + }, + "mob.magmacube.jump": { + "category": "hostile", + "sounds": [ + "mob/magmacube/jump1", + "mob/magmacube/jump2", + "mob/magmacube/jump3", + "mob/magmacube/jump4" + ] + }, + "mob.magmacube.small": { + "category": "hostile", + "sounds": [ + "mob/magmacube/small1", + "mob/magmacube/small2", + "mob/magmacube/small3", + "mob/magmacube/small4", + "mob/magmacube/small5" + ] + }, + "mob.pig.death": { + "category": "neutral", + "sounds": [ + "mob/pig/death" + ] + }, + "mob.pig.say": { + "category": "neutral", + "sounds": [ + "mob/pig/say1", + "mob/pig/say2", + "mob/pig/say3" + ] + }, + "mob.pig.step": { + "category": "neutral", + "sounds": [ + "mob/pig/step1", + "mob/pig/step2", + "mob/pig/step3", + "mob/pig/step4", + "mob/pig/step5" + ] + }, + "mob.rabbit.hurt": { + "category": "neutral", + "sounds": [ + { + "name": "mob/rabbit/hurt1", + "volume": 0.5 + }, + { + "name": "mob/rabbit/hurt2", + "volume": 0.5 + }, + { + "name": "mob/rabbit/hurt3", + "volume": 0.5 + }, + { + "name": "mob/rabbit/hurt4", + "volume": 0.5 + } + ] + }, + "mob.rabbit.idle": { + "category": "neutral", + "sounds": [ + { + "name": "mob/rabbit/idle1", + "volume": 0.25 + }, + { + "name": "mob/rabbit/idle2", + "volume": 0.25 + }, + { + "name": "mob/rabbit/idle3", + "volume": 0.25 + }, + { + "name": "mob/rabbit/idle4", + "volume": 0.25 + } + ] + }, + "mob.rabbit.hop": { + "category": "neutral", + "sounds": [ + { + "name": "mob/rabbit/hop1", + "volume": 0.1 + }, + { + "name": "mob/rabbit/hop2", + "volume": 0.1 + }, + { + "name": "mob/rabbit/hop3", + "volume": 0.1 + }, + { + "name": "mob/rabbit/hop4", + "volume": 0.1 + } + ] + }, + "mob.rabbit.death": { + "category": "neutral", + "sounds": [ + { + "name": "mob/rabbit/bunnymurder", + "volume": 0.5 + } + ] + }, + "mob.sheep.say": { + "category": "neutral", + "sounds": [ + "mob/sheep/say1", + "mob/sheep/say2", + "mob/sheep/say3" + ] + }, + "mob.sheep.shear": { + "category": "neutral", + "sounds": [ + "mob/sheep/shear" + ] + }, + "mob.sheep.step": { + "category": "neutral", + "sounds": [ + "mob/sheep/step1", + "mob/sheep/step2", + "mob/sheep/step3", + "mob/sheep/step4", + "mob/sheep/step5" + ] + }, + "mob.silverfish.hit": { + "category": "hostile", + "sounds": [ + "mob/silverfish/hit1", + "mob/silverfish/hit2", + "mob/silverfish/hit3" + ] + }, + "mob.silverfish.kill": { + "category": "hostile", + "sounds": [ + "mob/silverfish/kill" + ] + }, + "mob.silverfish.say": { + "category": "hostile", + "sounds": [ + "mob/silverfish/say1", + "mob/silverfish/say2", + "mob/silverfish/say3", + "mob/silverfish/say4" + ] + }, + "mob.silverfish.step": { + "category": "hostile", + "sounds": [ + "mob/silverfish/step1", + "mob/silverfish/step2", + "mob/silverfish/step3", + "mob/silverfish/step4" + ] + }, + "mob.skeleton.death": { + "category": "hostile", + "sounds": [ + "mob/skeleton/death" + ] + }, + "mob.skeleton.hurt": { + "category": "hostile", + "sounds": [ + "mob/skeleton/hurt1", + "mob/skeleton/hurt2", + "mob/skeleton/hurt3", + "mob/skeleton/hurt4" + ] + }, + "mob.skeleton.say": { + "category": "hostile", + "sounds": [ + "mob/skeleton/say1", + "mob/skeleton/say2", + "mob/skeleton/say3" + ] + }, + "mob.skeleton.step": { + "category": "hostile", + "sounds": [ + "mob/skeleton/step1", + "mob/skeleton/step2", + "mob/skeleton/step3", + "mob/skeleton/step4" + ] + }, + "mob.slime.attack": { + "category": "hostile", + "sounds": [ + "mob/slime/attack1", + "mob/slime/attack2" + ] + }, + "mob.slime.big": { + "category": "hostile", + "sounds": [ + "mob/slime/big1", + "mob/slime/big2", + "mob/slime/big3", + "mob/slime/big4" + ] + }, + "mob.slime.small": { + "category": "hostile", + "sounds": [ + "mob/slime/small1", + "mob/slime/small2", + "mob/slime/small3", + "mob/slime/small4", + "mob/slime/small5" + ] + }, + "mob.spider.death": { + "category": "hostile", + "sounds": [ + "mob/spider/death" + ] + }, + "mob.spider.say": { + "category": "hostile", + "sounds": [ + "mob/spider/say1", + "mob/spider/say2", + "mob/spider/say3", + "mob/spider/say4" + ] + }, + "mob.spider.step": { + "category": "hostile", + "sounds": [ + "mob/spider/step1", + "mob/spider/step2", + "mob/spider/step3", + "mob/spider/step4" + ] + }, + "mob.villager.death": { + "category": "neutral", + "sounds": [ + "mob/villager/death" + ] + }, + "mob.villager.haggle": { + "category": "neutral", + "sounds": [ + "mob/villager/haggle1", + "mob/villager/haggle2", + "mob/villager/haggle3" + ] + }, + "mob.villager.hit": { + "category": "neutral", + "sounds": [ + "mob/villager/hit1", + "mob/villager/hit2", + "mob/villager/hit3", + "mob/villager/hit4" + ] + }, + "mob.villager.idle": { + "category": "neutral", + "sounds": [ + "mob/villager/idle1", + "mob/villager/idle2", + "mob/villager/idle3" + ] + }, + "mob.villager.no": { + "category": "neutral", + "sounds": [ + "mob/villager/no1", + "mob/villager/no2", + "mob/villager/no3" + ] + }, + "mob.villager.yes": { + "category": "neutral", + "sounds": [ + "mob/villager/yes1", + "mob/villager/yes2", + "mob/villager/yes3" + ] + }, + "mob.wither.death": { + "category": "hostile", + "sounds": [ + "mob/wither/death" + ] + }, + "mob.wither.hurt": { + "category": "hostile", + "sounds": [ + "mob/wither/hurt1", + "mob/wither/hurt2", + "mob/wither/hurt3", + "mob/wither/hurt4" + ] + }, + "mob.wither.idle": { + "category": "hostile", + "sounds": [ + "mob/wither/idle1", + "mob/wither/idle2", + "mob/wither/idle3", + "mob/wither/idle4" + ] + }, + "mob.wither.shoot": { + "category": "hostile", + "sounds": [ + "mob/wither/shoot" + ] + }, + "mob.wither.spawn": { + "category": "hostile", + "sounds": [ + "mob/wither/spawn" + ] + }, + "mob.wolf.bark": { + "category": "neutral", + "sounds": [ + "mob/wolf/bark1", + "mob/wolf/bark2", + "mob/wolf/bark3" + ] + }, + "mob.wolf.death": { + "category": "neutral", + "sounds": [ + "mob/wolf/death" + ] + }, + "mob.wolf.growl": { + "category": "neutral", + "sounds": [ + "mob/wolf/growl1", + "mob/wolf/growl2", + "mob/wolf/growl3" + ] + }, + "mob.wolf.howl": { + "category": "neutral", + "sounds": [ + "mob/wolf/howl1", + "mob/wolf/howl2" + ] + }, + "mob.wolf.hurt": { + "category": "neutral", + "sounds": [ + "mob/wolf/hurt1", + "mob/wolf/hurt2", + "mob/wolf/hurt3" + ] + }, + "mob.wolf.panting": { + "category": "neutral", + "sounds": [ + "mob/wolf/panting" + ] + }, + "mob.wolf.shake": { + "category": "neutral", + "sounds": [ + "mob/wolf/shake" + ] + }, + "mob.wolf.step": { + "category": "neutral", + "sounds": [ + "mob/wolf/step1", + "mob/wolf/step2", + "mob/wolf/step3", + "mob/wolf/step4", + "mob/wolf/step5" + ] + }, + "mob.wolf.whine": { + "category": "neutral", + "sounds": [ + "mob/wolf/whine" + ] + }, + "mob.zombie.death": { + "category": "hostile", + "sounds": [ + "mob/zombie/death" + ] + }, + "mob.zombie.hurt": { + "category": "hostile", + "sounds": [ + "mob/zombie/hurt1", + "mob/zombie/hurt2" + ] + }, + "mob.zombie.infect": { + "category": "hostile", + "sounds": [ + "mob/zombie/infect" + ] + }, + "mob.zombie.metal": { + "category": "hostile", + "sounds": [ + "mob/zombie/metal1", + "mob/zombie/metal2", + "mob/zombie/metal3" + ] + }, + "mob.zombie.remedy": { + "category": "hostile", + "sounds": [ + "mob/zombie/remedy" + ] + }, + "mob.zombie.say": { + "category": "hostile", + "sounds": [ + "mob/zombie/say1", + "mob/zombie/say2", + "mob/zombie/say3" + ] + }, + "mob.zombie.step": { + "category": "hostile", + "sounds": [ + "mob/zombie/step1", + "mob/zombie/step2", + "mob/zombie/step3", + "mob/zombie/step4", + "mob/zombie/step5" + ] + }, + "mob.zombie.unfect": { + "category": "hostile", + "sounds": [ + "mob/zombie/unfect" + ] + }, + "mob.zombie.wood": { + "category": "hostile", + "sounds": [ + "mob/zombie/wood1", + "mob/zombie/wood2", + "mob/zombie/wood3", + "mob/zombie/wood4" + ] + }, + "mob.zombie.woodbreak": { + "category": "hostile", + "sounds": [ + "mob/zombie/woodbreak" + ] + }, + "mob.zombiepig.zpig": { + "category": "hostile", + "sounds": [ + "mob/zombiepig/zpig1", + "mob/zombiepig/zpig2", + "mob/zombiepig/zpig3", + "mob/zombiepig/zpig4" + ] + }, + "mob.zombiepig.zpigangry": { + "category": "hostile", + "sounds": [ + "mob/zombiepig/zpigangry1", + "mob/zombiepig/zpigangry2", + "mob/zombiepig/zpigangry3", + "mob/zombiepig/zpigangry4" + ] + }, + "mob.zombiepig.zpigdeath": { + "category": "hostile", + "sounds": [ + "mob/zombiepig/zpigdeath" + ] + }, + "mob.zombiepig.zpighurt": { + "category": "hostile", + "sounds": [ + "mob/zombiepig/zpighurt1", + "mob/zombiepig/zpighurt2" + ] + }, + "note.bass": { + "category": "record", + "sounds": [ + "note/bass" + ] + }, + "note.bassattack": { + "category": "record", + "sounds": [ + "note/bassattack" + ] + }, + "note.bd": { + "category": "record", + "sounds": [ + "note/bd" + ] + }, + "note.harp": { + "category": "record", + "sounds": [ + "note/harp" + ] + }, + "note.hat": { + "category": "record", + "sounds": [ + "note/hat" + ] + }, + "note.pling": { + "category": "record", + "sounds": [ + "note/pling" + ] + }, + "note.snare": { + "category": "record", + "sounds": [ + "note/snare" + ] + }, + "portal.portal": { + "category": "block", + "sounds": [ + "portal/portal" + ] + }, + "portal.travel": { + "category": "player", + "sounds": [ + "portal/travel" + ] + }, + "portal.trigger": { + "category": "block", + "sounds": [ + "portal/trigger" + ] + }, + "random.anvil_break": { + "category": "block", + "sounds": [ + "random/anvil_break" + ] + }, + "random.anvil_land": { + "category": "block", + "sounds": [ + "random/anvil_land" + ] + }, + "random.anvil_use": { + "category": "block", + "sounds": [ + "random/anvil_use" + ] + }, + "random.bow": { + "category": "neutral", + "sounds": [ + "random/bow" + ] + }, + "random.bowhit": { + "category": "neutral", + "sounds": [ + "random/bowhit1", + "random/bowhit2", + "random/bowhit3", + "random/bowhit4" + ] + }, + "random.break": { + "category": "player", + "sounds": [ + "random/break" + ] + }, + "random.burp": { + "category": "player", + "sounds": [ + "random/burp" + ] + }, + "random.chestclosed": { + "category": "block", + "sounds": [ + "random/chestclosed" + ] + }, + "random.chestopen": { + "category": "block", + "sounds": [ + "random/chestopen" + ] + }, + "gui.button.press": { + "category": "master", + "sounds": [ + "random/click" + ] + }, + "random.click": { + "category": "block", + "sounds": [ + "random/click" + ] + }, + "random.door_close": { + "category": "block", + "sounds": [ + "random/door_close", + "random/door_open" + ] + }, + "random.door_open": { + "category": "block", + "sounds": [ + "random/door_close", + "random/door_open" + ] + }, + "random.drink": { + "category": "player", + "sounds": [ + "random/drink" + ] + }, + "item.elytra.flying": { + "category": "player", + "sounds": [ + "item/elytra/elytra_loop" + ] + }, + "random.eat": { + "category": "player", + "sounds": [ + "random/eat1", + "random/eat2", + "random/eat3" + ] + }, + "random.explode": { + "category": "block", + "sounds": [ + "random/explode1", + "random/explode2", + "random/explode3", + "random/explode4" + ] + }, + "random.fizz": { + "category": "block", + "sounds": [ + "random/fizz" + ] + }, + "game.tnt.primed": { + "category": "block", + "sounds": [ + "random/fuse" + ] + }, + "creeper.primed": { + "category": "hostile", + "sounds": [ + "random/fuse" + ] + }, + "dig.glass": { + "category": "block", + "sounds": [ + "random/glass1", + "random/glass2", + "random/glass3" + ] + }, + "game.potion.smash": { + "category": "neutral", + "sounds": [ + "random/glass1", + "random/glass2", + "random/glass3" + ] + }, + "random.levelup": { + "category": "player", + "sounds": [ + "random/levelup" + ] + }, + "random.orb": { + "category": "player", + "sounds": [ + "random/orb" + ] + }, + "random.pop": { + "category": "player", + "sounds": [ + "random/pop" + ] + }, + "random.splash": { + "category": "player", + "sounds": [ + "random/splash" + ] + }, + "random.successful_hit": { + "category": "player", + "sounds": [ + "random/successful_hit" + ] + }, + "random.wood_click": { + "category": "block", + "sounds": [ + "random/wood_click" + ] + }, + "records.11": { + "category": "record", + "sounds": [ + { + "name": "records/11", + "stream": true + } + ] + }, + "records.13": { + "category": "record", + "sounds": [ + { + "name": "records/13", + "stream": true + } + ] + }, + "records.blocks": { + "category": "record", + "sounds": [ + { + "name": "records/blocks", + "stream": true + } + ] + }, + "records.cat": { + "category": "record", + "sounds": [ + { + "name": "records/cat", + "stream": true + } + ] + }, + "records.chirp": { + "category": "record", + "sounds": [ + { + "name": "records/chirp", + "stream": true + } + ] + }, + "records.far": { + "category": "record", + "sounds": [ + { + "name": "records/far", + "stream": true + } + ] + }, + "records.mall": { + "category": "record", + "sounds": [ + { + "name": "records/mall", + "stream": true + } + ] + }, + "records.mellohi": { + "category": "record", + "sounds": [ + { + "name": "records/mellohi", + "stream": true + } + ] + }, + "records.stal": { + "category": "record", + "sounds": [ + { + "name": "records/stal", + "stream": true + } + ] + }, + "records.strad": { + "category": "record", + "sounds": [ + { + "name": "records/strad", + "stream": true + } + ] + }, + "records.wait": { + "category": "record", + "sounds": [ + { + "name": "records/wait", + "stream": true + } + ] + }, + "records.ward": { + "category": "record", + "sounds": [ + { + "name": "records/ward", + "stream": true + } + ] + }, + "step.cloth": { + "category": "neutral", + "sounds": [ + "step/cloth1", + "step/cloth2", + "step/cloth3", + "step/cloth4" + ] + }, + "step.grass": { + "category": "neutral", + "sounds": [ + "step/grass1", + "step/grass2", + "step/grass3", + "step/grass4", + "step/grass5", + "step/grass6" + ] + }, + "step.gravel": { + "category": "neutral", + "sounds": [ + "step/gravel1", + "step/gravel2", + "step/gravel3", + "step/gravel4" + ] + }, + "step.ladder": { + "category": "neutral", + "sounds": [ + "step/ladder1", + "step/ladder2", + "step/ladder3", + "step/ladder4", + "step/ladder5" + ] + }, + "step.sand": { + "category": "neutral", + "sounds": [ + "step/sand1", + "step/sand2", + "step/sand3", + "step/sand4", + "step/sand5" + ] + }, + "step.snow": { + "category": "neutral", + "sounds": [ + "step/snow1", + "step/snow2", + "step/snow3", + "step/snow4" + ] + }, + "step.stone": { + "category": "neutral", + "sounds": [ + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" + ] + }, + "step.wood": { + "category": "neutral", + "sounds": [ + "step/wood1", + "step/wood2", + "step/wood3", + "step/wood4", + "step/wood5", + "step/wood6" + ] + }, + "tile.piston.in": { + "category": "block", + "sounds": [ + "tile/piston/in" + ] + }, + "tile.piston.out": { + "category": "block", + "sounds": [ + "tile/piston/out" + ] + }, + "music.menu": { + "category": "music", + "sounds": [ + { + "name": "music/menu/menu1", + "stream": true + }, + { + "name": "music/menu/menu2", + "stream": true + }, + { + "name": "music/menu/menu3", + "stream": true + }, + { + "name": "music/menu/menu4", + "stream": true + } + ] + }, + "music.game": { + "category": "music", + "sounds": [ + { + "name": "music/game/calm1", + "stream": true + }, + { + "name": "music/game/calm2", + "stream": true + }, + { + "name": "music/game/calm3", + "stream": true + }, + { + "name": "music/game/hal1", + "stream": true + }, + { + "name": "music/game/hal2", + "stream": true + }, + { + "name": "music/game/hal3", + "stream": true + }, + { + "name": "music/game/hal4", + "stream": true + }, + { + "name": "music/game/nuance1", + "stream": true + }, + { + "name": "music/game/nuance2", + "stream": true + }, + { + "name": "music/game/piano1", + "stream": true + }, + { + "name": "music/game/piano2", + "stream": true + }, + { + "name": "music/game/piano3", + "stream": true + } + ] + }, + "music.game.creative": { + "category": "music", + "sounds": [ + { + "type": "event", + "name": "music.game" + }, + { + "name": "music/game/creative/creative1", + "stream": true + }, + { + "name": "music/game/creative/creative2", + "stream": true + }, + { + "name": "music/game/creative/creative3", + "stream": true + }, + { + "name": "music/game/creative/creative4", + "stream": true + }, + { + "name": "music/game/creative/creative5", + "stream": true + }, + { + "name": "music/game/creative/creative6", + "stream": true + } + ] + }, + "music.game.end": { + "category": "music", + "sounds": [ + { + "name": "music/game/end/end", + "stream": true + } + ] + }, + "music.game.end.dragon": { + "category": "music", + "sounds": [ + { + "name": "music/game/end/boss", + "stream": true + } + ] + }, + "music.game.end.credits": { + "category": "music", + "sounds": [ + { + "name": "music/game/end/credits", + "stream": true + } + ] + }, + "music.game.nether": { + "category": "music", + "sounds": [ + { + "name": "music/game/nether/nether1", + "stream": true + }, + { + "name": "music/game/nether/nether2", + "stream": true + }, + { + "name": "music/game/nether/nether3", + "stream": true + }, + { + "name": "music/game/nether/nether4", + "stream": true + } + ] + } +} \ No newline at end of file diff --git a/resources/resources/assets/minecraft/sounds.json b/resources/resources/assets/minecraft/sounds.json index ba3f65a..9d5c5e2 100644 --- a/resources/resources/assets/minecraft/sounds.json +++ b/resources/resources/assets/minecraft/sounds.json @@ -1,12 +1,7 @@ { - "ambient.cave.cave": { - "category": "ambient", + "ambient.cave": { "sounds": [ "ambient/cave/cave1", - "ambient/cave/cave10", - "ambient/cave/cave11", - "ambient/cave/cave12", - "ambient/cave/cave13", "ambient/cave/cave2", "ambient/cave/cave3", "ambient/cave/cave4", @@ -14,611 +9,1389 @@ "ambient/cave/cave6", "ambient/cave/cave7", "ambient/cave/cave8", - "ambient/cave/cave9" + "ambient/cave/cave9", + "ambient/cave/cave10", + "ambient/cave/cave11", + "ambient/cave/cave12", + "ambient/cave/cave13" ] }, - "ambient.weather.rain": { - "category": "weather", - "sounds": [ - "ambient/weather/rain1", - "ambient/weather/rain2", - "ambient/weather/rain3", - "ambient/weather/rain4" - ] - }, - "ambient.weather.thunder": { - "category": "weather", - "sounds": [ - "ambient/weather/thunder1", - "ambient/weather/thunder2", - "ambient/weather/thunder3" - ] - }, - "game.player.hurt.fall.big": { - "category": "player", - "sounds": [ - "damage/fallbig" - ] - }, - "game.player.hurt.fall.small": { - "category": "player", - "sounds": [ - "damage/fallsmall" - ] - }, - "game.neutral.hurt.fall.big": { - "category": "neutral", - "sounds": [ - "damage/fallbig" - ] - }, - "game.neutral.hurt.fall.small": { - "category": "neutral", - "sounds": [ - "damage/fallsmall" - ] - }, - "game.hostile.hurt.fall.big": { - "category": "hostile", - "sounds": [ - "damage/fallbig" - ] - }, - "game.hostile.hurt.fall.small": { - "category": "hostile", - "sounds": [ - "damage/fallsmall" - ] - }, - "game.player.hurt": { - "category": "player", - "sounds": [ - "damage/hit1", - "damage/hit2", - "damage/hit3" - ] - }, - "game.neutral.hurt": { - "category": "neutral", - "sounds": [ - "damage/hit1", - "damage/hit2", - "damage/hit3" - ] - }, - "game.hostile.hurt": { - "category": "hostile", - "sounds": [ - "damage/hit1", - "damage/hit2", - "damage/hit3" - ] - }, - "game.player.die": { - "category": "player", - "sounds": [ - "damage/hit1", - "damage/hit2", - "damage/hit3" - ] - }, - "game.neutral.die": { - "category": "neutral", - "sounds": [ - "damage/hit1", - "damage/hit2", - "damage/hit3" - ] - }, - "game.hostile.die": { - "category": "hostile", - "sounds": [ - "damage/hit1", - "damage/hit2", - "damage/hit3" - ] - }, - "dig.cloth": { - "category": "block", - "sounds": [ - "dig/cloth1", - "dig/cloth2", - "dig/cloth3", - "dig/cloth4" - ] - }, - "dig.grass": { - "category": "block", - "sounds": [ - "dig/grass1", - "dig/grass2", - "dig/grass3", - "dig/grass4" - ] - }, - "dig.gravel": { - "category": "block", - "sounds": [ - "dig/gravel1", - "dig/gravel2", - "dig/gravel3", - "dig/gravel4" - ] - }, - "dig.sand": { - "category": "block", - "sounds": [ - "dig/sand1", - "dig/sand2", - "dig/sand3", - "dig/sand4" - ] - }, - "dig.snow": { - "category": "block", - "sounds": [ - "dig/snow1", - "dig/snow2", - "dig/snow3", - "dig/snow4" - ] - }, - "dig.stone": { - "category": "block", + "block.anvil.break": { "sounds": [ "dig/stone1", "dig/stone2", "dig/stone3", "dig/stone4" + ], + "subtitle": "subtitles.block.generic.break" + }, + "block.anvil.destroy": { + "sounds": [ + "random/anvil_break" + ], + "subtitle": "subtitles.block.anvil.destroy" + }, + "block.anvil.fall": { + "sounds": [ + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" ] }, - "dig.wood": { - "category": "block", + "block.anvil.hit": { + "sounds": [ + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" + ], + "subtitle": "subtitles.block.generic.hit" + }, + "block.anvil.land": { + "sounds": [ + "random/anvil_land" + ], + "subtitle": "subtitles.block.anvil.land" + }, + "block.anvil.place": { + "sounds": [ + "random/anvil_land" + ], + "subtitle": "subtitles.block.generic.place" + }, + "block.anvil.step": { + "sounds": [ + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "block.anvil.use": { + "sounds": [ + "random/anvil_use" + ], + "subtitle": "subtitles.block.anvil.use" + }, + "block.brewing_stand.brew": { + "sounds": [ + "block/brewing_stand/brew1", + "block/brewing_stand/brew2" + ], + "subtitle": "subtitles.block.brewing_stand.brew" + }, + "block.chest.close": { + "sounds": [ + "block/chest/close", + "block/chest/close2", + "block/chest/close3" + ], + "subtitle": "subtitles.block.chest.close" + }, + "block.chest.locked": { + "sounds": [ + "block/wooden_door/close", + "block/wooden_door/open" + ] + }, + "block.chest.open": { + "sounds": [ + "block/chest/open" + ], + "subtitle": "subtitles.block.chest.open" + }, + "block.chorus_flower.death": { + "sounds": [ + "block/chorus_flower/death1", + "block/chorus_flower/death2", + "block/chorus_flower/death3" + ], + "subtitle": "subtitles.block.chorus_flower.death" + }, + "block.chorus_flower.grow": { + "sounds": [ + "block/chorus_flower/grow1", + "block/chorus_flower/grow2", + "block/chorus_flower/grow3", + "block/chorus_flower/grow4" + ], + "subtitle": "subtitles.block.chorus_flower.grow" + }, + "block.cloth.break": { + "sounds": [ + "dig/cloth1", + "dig/cloth2", + "dig/cloth3", + "dig/cloth4" + ], + "subtitle": "subtitles.block.generic.break" + }, + "block.cloth.fall": { + "sounds": [ + "step/cloth1", + "step/cloth2", + "step/cloth3", + "step/cloth4" + ] + }, + "block.cloth.hit": { + "sounds": [ + "step/cloth1", + "step/cloth2", + "step/cloth3", + "step/cloth4" + ], + "subtitle": "subtitles.block.generic.hit" + }, + "block.cloth.place": { + "sounds": [ + "dig/cloth1", + "dig/cloth2", + "dig/cloth3", + "dig/cloth4" + ], + "subtitle": "subtitles.block.generic.place" + }, + "block.cloth.step": { + "sounds": [ + "step/cloth1", + "step/cloth2", + "step/cloth3", + "step/cloth4" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "block.comparator.click": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.comparator.click" + }, + "block.dispenser.dispense": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.dispenser.dispense" + }, + "block.dispenser.fail": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.dispenser.fail" + }, + "block.dispenser.launch": { + "sounds": [ + "random/bow" + ], + "subtitle": "subtitles.block.dispenser.dispense" + }, + "block.end_gateway.spawn": { + "sounds": [ + "random/explode1", + "random/explode2", + "random/explode3", + "random/explode4" + ], + "subtitle": "subtitles.entity.generic.explode" + }, + "block.enderchest.close": { + "sounds": [ + "random/chestclosed" + ], + "subtitle": "subtitles.block.chest.close" + }, + "block.enderchest.open": { + "sounds": [ + "random/chestopen" + ], + "subtitle": "subtitles.block.chest.open" + }, + "block.fence_gate.close": { + "sounds": [ + "block/fence_gate/close1", + "block/fence_gate/close2" + ], + "subtitle": "subtitles.block.fence_gate.toggle" + }, + "block.fence_gate.open": { + "sounds": [ + "block/fence_gate/open1", + "block/fence_gate/open2" + ], + "subtitle": "subtitles.block.fence_gate.toggle" + }, + "block.fire.ambient": { + "sounds": [ + "fire/fire" + ], + "subtitle": "subtitles.block.fire.ambient" + }, + "block.fire.extinguish": { + "sounds": [ + "random/fizz" + ], + "subtitle": "subtitles.block.fire.extinguish" + }, + "block.furnace.fire_crackle": { + "sounds": [ + "block/furnace/fire_crackle1", + "block/furnace/fire_crackle2", + "block/furnace/fire_crackle3", + "block/furnace/fire_crackle4", + "block/furnace/fire_crackle5" + ], + "subtitle": "subtitles.block.furnace.fire_crackle" + }, + "block.glass.break": { + "sounds": [ + "random/glass1", + "random/glass2", + "random/glass3" + ], + "subtitle": "subtitles.block.generic.break" + }, + "block.glass.fall": { + "sounds": [ + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" + ] + }, + "block.glass.hit": { + "sounds": [ + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" + ], + "subtitle": "subtitles.block.generic.hit" + }, + "block.glass.place": { + "sounds": [ + "dig/stone1", + "dig/stone2", + "dig/stone3", + "dig/stone4" + ], + "subtitle": "subtitles.block.generic.place" + }, + "block.glass.step": { + "sounds": [ + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "block.grass.break": { + "sounds": [ + "dig/grass1", + "dig/grass2", + "dig/grass3", + "dig/grass4" + ], + "subtitle": "subtitles.block.generic.break" + }, + "block.grass.fall": { + "sounds": [ + "step/grass1", + "step/grass2", + "step/grass3", + "step/grass4", + "step/grass5", + "step/grass6" + ] + }, + "block.grass.hit": { + "sounds": [ + "step/grass1", + "step/grass2", + "step/grass3", + "step/grass4", + "step/grass5", + "step/grass6" + ], + "subtitle": "subtitles.block.generic.hit" + }, + "block.grass.place": { + "sounds": [ + "dig/grass1", + "dig/grass2", + "dig/grass3", + "dig/grass4" + ], + "subtitle": "subtitles.block.generic.place" + }, + "block.grass.step": { + "sounds": [ + "step/grass1", + "step/grass2", + "step/grass3", + "step/grass4", + "step/grass5", + "step/grass6" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "block.gravel.break": { + "sounds": [ + "dig/gravel1", + "dig/gravel2", + "dig/gravel3", + "dig/gravel4" + ], + "subtitle": "subtitles.block.generic.break" + }, + "block.gravel.fall": { + "sounds": [ + "step/gravel1", + "step/gravel2", + "step/gravel3", + "step/gravel4" + ] + }, + "block.gravel.hit": { + "sounds": [ + "step/gravel1", + "step/gravel2", + "step/gravel3", + "step/gravel4" + ], + "subtitle": "subtitles.block.generic.hit" + }, + "block.gravel.place": { + "sounds": [ + "dig/gravel1", + "dig/gravel2", + "dig/gravel3", + "dig/gravel4" + ], + "subtitle": "subtitles.block.generic.place" + }, + "block.gravel.step": { + "sounds": [ + "step/gravel1", + "step/gravel2", + "step/gravel3", + "step/gravel4" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "block.iron_door.close": { + "sounds": [ + "block/iron_door/close1", + "block/iron_door/close2", + "block/iron_door/close3", + "block/iron_door/close4" + ], + "subtitle": "subtitles.block.door.toggle" + }, + "block.iron_door.open": { + "sounds": [ + "block/iron_door/open1", + "block/iron_door/open2", + "block/iron_door/open3", + "block/iron_door/open4" + ], + "subtitle": "subtitles.block.door.toggle" + }, + "block.iron_trapdoor.close": { + "sounds": [ + "block/iron_trapdoor/close1", + "block/iron_trapdoor/close2", + "block/iron_trapdoor/close3", + "block/iron_trapdoor/close4" + ], + "subtitle": "subtitles.block.iron_trapdoor.close" + }, + "block.iron_trapdoor.open": { + "sounds": [ + "block/iron_trapdoor/open1", + "block/iron_trapdoor/open2", + "block/iron_trapdoor/open3", + "block/iron_trapdoor/open4" + ], + "subtitle": "subtitles.block.iron_trapdoor.open" + }, + "block.ladder.break": { "sounds": [ "dig/wood1", "dig/wood2", "dig/wood3", "dig/wood4" - ] + ], + "subtitle": "subtitles.block.generic.break" }, - "fire.fire": { - "category": "block", + "block.ladder.fall": { "sounds": [ - "fire/fire" + "step/ladder1", + "step/ladder2", + "step/ladder3", + "step/ladder4", + "step/ladder5" ] }, - "fire.ignite": { - "category": "block", + "block.ladder.hit": { "sounds": [ - "fire/ignite" - ] + "step/ladder1", + "step/ladder2", + "step/ladder3", + "step/ladder4", + "step/ladder5" + ], + "subtitle": "subtitles.block.generic.hit" }, - "item.fireCharge.use": { - "category": "block", + "block.ladder.place": { "sounds": [ - "mob/ghast/fireball4" - ] + "dig/wood1", + "dig/wood2", + "dig/wood3", + "dig/wood4" + ], + "subtitle": "subtitles.block.generic.place" }, - "fireworks.blast": { - "category": "ambient", + "block.ladder.step": { "sounds": [ - "fireworks/blast1" - ] + "step/ladder1", + "step/ladder2", + "step/ladder3", + "step/ladder4", + "step/ladder5" + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "fireworks.blast_far": { - "category": "ambient", - "sounds": [ - "fireworks/blast_far1" - ] - }, - "fireworks.largeBlast": { - "category": "ambient", - "sounds": [ - "fireworks/largeBlast1" - ] - }, - "fireworks.largeBlast_far": { - "category": "ambient", - "sounds": [ - "fireworks/largeBlast_far1" - ] - }, - "fireworks.launch": { - "category": "ambient", - "sounds": [ - "fireworks/launch1" - ] - }, - "fireworks.twinkle": { - "category": "ambient", - "sounds": [ - "fireworks/twinkle1" - ] - }, - "fireworks.twinkle_far": { - "category": "ambient", - "sounds": [ - "fireworks/twinkle_far1" - ] - }, - "liquid.lava": { - "category": "block", + "block.lava.ambient": { "sounds": [ "liquid/lava" - ] + ], + "subtitle": "subtitles.block.lava.ambient" }, - "liquid.lavapop": { - "category": "block", + "block.lava.extinguish": { + "sounds": [ + "random/fizz" + ], + "subtitle": "subtitles.block.lava.extinguish" + }, + "block.lava.pop": { "sounds": [ "liquid/lavapop" - ] + ], + "subtitle": "subtitles.block.lava.ambient" }, - "game.neutral.swim.splash": { - "category": "neutral", + "block.lever.click": { "sounds": [ - "liquid/splash", - "liquid/splash2" - ] + "random/click" + ], + "subtitle": "subtitles.block.lever.click" }, - "game.player.swim.splash": { - "category": "block", + "block.metal.break": { "sounds": [ - "liquid/splash", - "liquid/splash2" - ] + "dig/stone1", + "dig/stone2", + "dig/stone3", + "dig/stone4" + ], + "subtitle": "subtitles.block.generic.break" }, - "game.hostile.swim.splash": { - "category": "hostile", + "block.metal.fall": { "sounds": [ - "liquid/splash", - "liquid/splash2" + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" ] }, - "game.player.swim": { - "category": "player", + "block.metal.hit": { "sounds": [ - "liquid/swim1", - "liquid/swim2", - "liquid/swim3", - "liquid/swim4" - ] + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" + ], + "subtitle": "subtitles.block.generic.hit" }, - "game.neutral.swim": { - "category": "neutral", + "block.metal.place": { "sounds": [ - "liquid/swim1", - "liquid/swim2", - "liquid/swim3", - "liquid/swim4" - ] + "dig/stone1", + "dig/stone2", + "dig/stone3", + "dig/stone4" + ], + "subtitle": "subtitles.block.generic.place" }, - "game.hostile.swim": { - "category": "hostile", + "block.metal.step": { "sounds": [ - "liquid/swim1", - "liquid/swim2", - "liquid/swim3", - "liquid/swim4" + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "block.metal_pressureplate.click_off": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.pressure_plate.click" + }, + "block.metal_pressureplate.click_on": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.pressure_plate.click" + }, + "block.note.basedrum": { + "sounds": [ + "note/bd" + ], + "subtitle": "subtitles.block.note.note" + }, + "block.note.bass": { + "sounds": [ + "note/bassattack" + ], + "subtitle": "subtitles.block.note.note" + }, + "block.note.harp": { + "sounds": [ + "note/harp" + ], + "subtitle": "subtitles.block.note.note" + }, + "block.note.hat": { + "sounds": [ + "note/hat" + ], + "subtitle": "subtitles.block.note.note" + }, + "block.note.pling": { + "sounds": [ + "note/pling" ] }, - "liquid.water": { - "category": "block", + "block.note.snare": { + "sounds": [ + "note/snare" + ], + "subtitle": "subtitles.block.note.note" + }, + "block.piston.contract": { + "sounds": [ + "tile/piston/in" + ], + "subtitle": "subtitles.block.piston.move" + }, + "block.piston.extend": { + "sounds": [ + "tile/piston/out" + ], + "subtitle": "subtitles.block.piston.move" + }, + "block.portal.ambient": { + "sounds": [ + "portal/portal" + ], + "subtitle": "subtitles.block.portal.ambient" + }, + "block.portal.travel": { + "sounds": [ + "portal/travel" + ] + }, + "block.portal.trigger": { + "sounds": [ + "portal/trigger" + ] + }, + "block.redstone_torch.burnout": { + "sounds": [ + "random/fizz" + ], + "subtitle": "subtitles.block.redstone_torch.burnout" + }, + "block.sand.break": { + "sounds": [ + "dig/sand1", + "dig/sand2", + "dig/sand3", + "dig/sand4" + ], + "subtitle": "subtitles.block.generic.break" + }, + "block.sand.fall": { + "sounds": [ + "step/sand1", + "step/sand2", + "step/sand3", + "step/sand4", + "step/sand5" + ] + }, + "block.sand.hit": { + "sounds": [ + "step/sand1", + "step/sand2", + "step/sand3", + "step/sand4", + "step/sand5" + ], + "subtitle": "subtitles.block.generic.hit" + }, + "block.sand.place": { + "sounds": [ + "dig/sand1", + "dig/sand2", + "dig/sand3", + "dig/sand4" + ], + "subtitle": "subtitles.block.generic.place" + }, + "block.sand.step": { + "sounds": [ + "step/sand1", + "step/sand2", + "step/sand3", + "step/sand4", + "step/sand5" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "block.slime.break": { + "sounds": [ + "mob/slime/big1", + "mob/slime/big2", + "mob/slime/big3", + "mob/slime/big4" + ], + "subtitle": "subtitles.block.generic.break" + }, + "block.slime.fall": { + "sounds": [ + "mob/slime/small1", + "mob/slime/small2", + "mob/slime/small3", + "mob/slime/small4", + "mob/slime/small5" + ] + }, + "block.slime.hit": { + "sounds": [ + "mob/slime/small1", + "mob/slime/small2", + "mob/slime/small3", + "mob/slime/small4", + "mob/slime/small5" + ], + "subtitle": "subtitles.block.generic.hit" + }, + "block.slime.place": { + "sounds": [ + "mob/slime/big1", + "mob/slime/big2", + "mob/slime/big3", + "mob/slime/big4" + ], + "subtitle": "subtitles.block.generic.place" + }, + "block.slime.step": { + "sounds": [ + "mob/slime/small1", + "mob/slime/small2", + "mob/slime/small3", + "mob/slime/small4", + "mob/slime/small5" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "block.snow.break": { + "sounds": [ + "dig/snow1", + "dig/snow2", + "dig/snow3", + "dig/snow4" + ], + "subtitle": "subtitles.block.generic.break" + }, + "block.snow.fall": { + "sounds": [ + "step/snow1", + "step/snow2", + "step/snow3", + "step/snow4" + ] + }, + "block.snow.hit": { + "sounds": [ + "step/snow1", + "step/snow2", + "step/snow3", + "step/snow4" + ], + "subtitle": "subtitles.block.generic.hit" + }, + "block.snow.place": { + "sounds": [ + "dig/snow1", + "dig/snow2", + "dig/snow3", + "dig/snow4" + ], + "subtitle": "subtitles.block.generic.place" + }, + "block.snow.step": { + "sounds": [ + "step/snow1", + "step/snow2", + "step/snow3", + "step/snow4" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "block.stone.break": { + "sounds": [ + "dig/stone1", + "dig/stone2", + "dig/stone3", + "dig/stone4" + ], + "subtitle": "subtitles.block.generic.break" + }, + "block.stone.fall": { + "sounds": [ + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" + ] + }, + "block.stone.hit": { + "sounds": [ + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" + ], + "subtitle": "subtitles.block.generic.hit" + }, + "block.stone.place": { + "sounds": [ + "dig/stone1", + "dig/stone2", + "dig/stone3", + "dig/stone4" + ], + "subtitle": "subtitles.block.generic.place" + }, + "block.stone.step": { + "sounds": [ + "step/stone1", + "step/stone2", + "step/stone3", + "step/stone4", + "step/stone5", + "step/stone6" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "block.stone_button.click_off": { + "sounds": [ + "random/click" + ] + }, + "block.stone_button.click_on": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.button.click" + }, + "block.stone_pressureplate.click_off": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.pressure_plate.click" + }, + "block.stone_pressureplate.click_on": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.pressure_plate.click" + }, + "block.tripwire.attach": { + "sounds": [ + "random/click" + ] + }, + "block.tripwire.click_off": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.tripwire.click" + }, + "block.tripwire.click_on": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.tripwire.click" + }, + "block.tripwire.detach": { + "sounds": [ + "random/bowhit1", + "random/bowhit2", + "random/bowhit3", + "random/bowhit4" + ] + }, + "block.water.ambient": { "sounds": [ "liquid/water" - ] + ], + "subtitle": "subtitles.block.water.ambient" }, - "minecart.base": { - "category": "neutral", + "block.waterlily.place": { "sounds": [ - "minecart/base" - ] + "block/waterlily/place1", + "block/waterlily/place2", + "block/waterlily/place3", + "block/waterlily/place4" + ], + "subtitle": "subtitles.block.generic.place" }, - "minecart.inside": { - "category": "player", + "block.wood.break": { "sounds": [ - "minecart/inside" - ] + "dig/wood1", + "dig/wood2", + "dig/wood3", + "dig/wood4" + ], + "subtitle": "subtitles.block.generic.break" }, - "mob.bat.death": { - "category": "neutral", + "block.wood.fall": { "sounds": [ - "mob/bat/death" + "step/wood1", + "step/wood2", + "step/wood3", + "step/wood4", + "step/wood5", + "step/wood6" ] }, - "mob.bat.hurt": { - "category": "neutral", + "block.wood.hit": { "sounds": [ - "mob/bat/hurt1", - "mob/bat/hurt2", - "mob/bat/hurt3", - "mob/bat/hurt4" - ] + "step/wood1", + "step/wood2", + "step/wood3", + "step/wood4", + "step/wood5", + "step/wood6" + ], + "subtitle": "subtitles.block.generic.break" }, - "mob.bat.idle": { - "category": "neutral", + "block.wood.place": { + "sounds": [ + "dig/wood1", + "dig/wood2", + "dig/wood3", + "dig/wood4" + ], + "subtitle": "subtitles.block.generic.place" + }, + "block.wood.step": { + "sounds": [ + "step/wood1", + "step/wood2", + "step/wood3", + "step/wood4", + "step/wood5", + "step/wood6" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "block.wood_button.click_off": { + "sounds": [ + "random/wood_click" + ], + "subtitle": "subtitles.block.button.click" + }, + "block.wood_button.click_on": { + "sounds": [ + "random/wood_click" + ], + "subtitle": "subtitles.block.button.click" + }, + "block.wood_pressureplate.click_off": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.button.click" + }, + "block.wood_pressureplate.click_on": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.pressure_plate.click" + }, + "block.wooden_door.close": { + "sounds": [ + "block/wooden_door/close", + "block/wooden_door/close2", + "block/wooden_door/close3", + "block/wooden_door/close4" + ], + "subtitle": "subtitles.block.door.toggle" + }, + "block.wooden_door.open": { + "sounds": [ + "block/wooden_door/open", + "block/wooden_door/open2", + "block/wooden_door/open3", + "block/wooden_door/open4" + ], + "subtitle": "subtitles.block.door.toggle" + }, + "block.wooden_trapdoor.close": { + "sounds": [ + "block/wooden_trapdoor/close1", + "block/wooden_trapdoor/close2", + "block/wooden_trapdoor/close3" + ], + "subtitle": "subtitles.block.trapdoor.toggle" + }, + "block.wooden_trapdoor.open": { + "sounds": [ + "block/wooden_trapdoor/open1", + "block/wooden_trapdoor/open2", + "block/wooden_trapdoor/open3", + "block/wooden_trapdoor/open4", + "block/wooden_trapdoor/open5" + ], + "subtitle": "subtitles.block.trapdoor.toggle" + }, + "enchant.thorns.hit": { + "sounds": [ + "enchant/thorns/hit1", + "enchant/thorns/hit2", + "enchant/thorns/hit3", + "enchant/thorns/hit4" + ], + "subtitle": "subtitles.enchant.thorns.hit" + }, + "entity.armorstand.break": { + "sounds": [ + "entity/armorstand/break1", + "entity/armorstand/break2", + "entity/armorstand/break3", + "entity/armorstand/break4" + ], + "subtitle": "subtitles.block.generic.break" + }, + "entity.armorstand.fall": { + "sounds": [ + "dig/wood1", + "dig/wood2", + "dig/wood3", + "dig/wood4" + ], + "subtitle": "subtitles.entity.armorstand.fall" + }, + "entity.armorstand.hit": { + "sounds": [ + "entity/armorstand/hit1", + "entity/armorstand/hit2", + "entity/armorstand/hit3", + "entity/armorstand/hit4" + ], + "subtitle": "subtitles.block.generic.hit" + }, + "entity.armorstand.place": { + "sounds": [ + "dig/stone1", + "dig/stone2", + "dig/stone3", + "dig/stone4" + ], + "subtitle": "subtitles.block.generic.place" + }, + "entity.arrow.hit": { + "sounds": [ + "random/bowhit1", + "random/bowhit2", + "random/bowhit3", + "random/bowhit4" + ], + "subtitle": "subtitles.entity.arrow.hit" + }, + "entity.arrow.hit_player": { + "sounds": [ + "random/successful_hit" + ], + "subtitle": "subtitles.entity.arrow.hit_player" + }, + "entity.arrow.shoot": { + "sounds": [ + "random/bow" + ], + "subtitle": "subtitles.entity.arrow.shoot" + }, + "entity.bat.ambient": { "sounds": [ "mob/bat/idle1", "mob/bat/idle2", "mob/bat/idle3", "mob/bat/idle4" - ] + ], + "subtitle": "subtitles.entity.bat.ambient" }, - "mob.bat.loop": { - "category": "neutral", + "entity.bat.death": { + "sounds": [ + "mob/bat/death" + ], + "subtitle": "subtitles.entity.bat.death" + }, + "entity.bat.hurt": { + "sounds": [ + "mob/bat/hurt1", + "mob/bat/hurt2", + "mob/bat/hurt3", + "mob/bat/hurt4" + ], + "subtitle": "subtitles.entity.bat.hurt" + }, + "entity.bat.loop": { "sounds": [ "mob/bat/loop" ] }, - "mob.bat.takeoff": { - "category": "neutral", + "entity.bat.takeoff": { "sounds": [ "mob/bat/takeoff" ] }, - "mob.blaze.breathe": { - "category": "hostile", + "entity.blaze.ambient": { "sounds": [ "mob/blaze/breathe1", "mob/blaze/breathe2", "mob/blaze/breathe3", "mob/blaze/breathe4" + ], + "subtitle": "subtitles.entity.blaze.ambient" + }, + "entity.blaze.burn": { + "sounds": [ + "fire/fire" ] }, - "mob.blaze.death": { - "category": "hostile", + "entity.blaze.death": { "sounds": [ "mob/blaze/death" - ] + ], + "subtitle": "subtitles.entity.blaze.death" }, - "mob.blaze.hit": { - "category": "hostile", + "entity.blaze.hurt": { "sounds": [ "mob/blaze/hit1", "mob/blaze/hit2", "mob/blaze/hit3", "mob/blaze/hit4" - ] + ], + "subtitle": "subtitles.entity.blaze.hurt" }, - "mob.guardian.hit": { - "category": "hostile", + "entity.blaze.shoot": { "sounds": [ - "mob/guardian/guardian_hit1", - "mob/guardian/guardian_hit2", - "mob/guardian/guardian_hit3", - "mob/guardian/guardian_hit4" - ] + "mob/ghast/fireball4" + ], + "subtitle": "subtitles.entity.blaze.shoot" }, - "mob.guardian.idle": { - "category": "hostile", + "entity.bobber.splash": { "sounds": [ - { - "name": "mob/guardian/guardian_idle1", - "volume": 0.1 - }, - { - "name": "mob/guardian/guardian_idle2", - "volume": 0.1 - }, - { - "name": "mob/guardian/guardian_idle3", - "volume": 0.1 - }, - { - "name": "mob/guardian/guardian_idle4", - "volume": 0.1 - } - ] + "random/splash" + ], + "subtitle": "subtitles.entity.bobber.splash" }, - "mob.guardian.death": { - "category": "hostile", + "entity.bobber.throw": { "sounds": [ - "mob/guardian/guardian_death" + "random/bow" ] }, - "mob.guardian.elder.hit": { - "category": "hostile", + "entity.cat.ambient": { "sounds": [ - "mob/guardian/elder_hit1", - "mob/guardian/elder_hit2", - "mob/guardian/elder_hit3", - "mob/guardian/elder_hit4" - ] + "mob/cat/meow1", + "mob/cat/meow2", + "mob/cat/meow3", + "mob/cat/meow4" + ], + "subtitle": "subtitles.entity.cat.ambient" }, - "mob.guardian.elder.idle": { - "category": "hostile", + "entity.cat.death": { "sounds": [ - "mob/guardian/elder_idle1", - "mob/guardian/elder_idle2", - "mob/guardian/elder_idle3", - "mob/guardian/elder_idle4" - ] + "mob/cat/hitt1", + "mob/cat/hitt2", + "mob/cat/hitt3" + ], + "subtitle": "subtitles.entity.cat.death" }, - "mob.guardian.elder.death": { - "category": "hostile", - "sounds": [ - "mob/guardian/elder_death" - ] - }, - "mob.guardian.land.hit": { - "category": "hostile", - "sounds": [ - "mob/guardian/land_hit1", - "mob/guardian/land_hit2", - "mob/guardian/land_hit3", - "mob/guardian/land_hit4" - ] - }, - "mob.guardian.land.idle": { - "category": "hostile", - "sounds": [ - "mob/guardian/land_idle1", - "mob/guardian/land_idle2", - "mob/guardian/land_idle3", - "mob/guardian/land_idle4" - ] - }, - "mob.guardian.land.death": { - "category": "hostile", - "sounds": [ - "mob/guardian/land_death" - ] - }, - "mob.guardian.curse": { - "category": "hostile", - "sounds": [ - "mob/guardian/curse" - ] - }, - "mob.guardian.attack": { - "category": "hostile", - "sounds": [ - "mob/guardian/attack_loop" - ] - }, - "mob.guardian.flop": { - "category": "hostile", - "sounds": [ - "mob/guardian/flop1", - "mob/guardian/flop2", - "mob/guardian/flop3", - "mob/guardian/flop4" - ] - }, - "mob.cat.hiss": { - "category": "neutral", + "entity.cat.hiss": { "sounds": [ "mob/cat/hiss1", "mob/cat/hiss2", "mob/cat/hiss3" ] }, - "mob.cat.hitt": { - "category": "neutral", + "entity.cat.hurt": { "sounds": [ "mob/cat/hitt1", "mob/cat/hitt2", "mob/cat/hitt3" - ] + ], + "subtitle": "subtitles.entity.cat.hurt" }, - "mob.cat.meow": { - "category": "neutral", - "sounds": [ - "mob/cat/meow1", - "mob/cat/meow2", - "mob/cat/meow3", - "mob/cat/meow4" - ] - }, - "mob.cat.purr": { - "category": "neutral", + "entity.cat.purr": { "sounds": [ "mob/cat/purr1", "mob/cat/purr2", "mob/cat/purr3" - ] + ], + "subtitle": "subtitles.entity.cat.ambient" }, - "mob.cat.purreow": { - "category": "neutral", + "entity.cat.purreow": { "sounds": [ "mob/cat/purreow1", "mob/cat/purreow2" - ] + ], + "subtitle": "subtitles.entity.cat.ambient" }, - "mob.chicken.hurt": { - "category": "neutral", - "sounds": [ - "mob/chicken/hurt1", - "mob/chicken/hurt2" - ] - }, - "mob.chicken.plop": { - "category": "neutral", - "sounds": [ - "mob/chicken/plop" - ] - }, - "mob.chicken.say": { - "category": "neutral", + "entity.chicken.ambient": { "sounds": [ "mob/chicken/say1", "mob/chicken/say2", "mob/chicken/say3" - ] + ], + "subtitle": "subtitles.entity.chicken.ambient" }, - "mob.chicken.step": { - "category": "neutral", + "entity.chicken.death": { + "sounds": [ + "mob/chicken/hurt1", + "mob/chicken/hurt2" + ], + "subtitle": "subtitles.entity.chicken.death" + }, + "entity.chicken.egg": { + "sounds": [ + "mob/chicken/plop" + ], + "subtitle": "subtitles.entity.chicken.egg" + }, + "entity.chicken.hurt": { + "sounds": [ + "mob/chicken/hurt1", + "mob/chicken/hurt2" + ], + "subtitle": "subtitles.entity.chicken.hurt" + }, + "entity.chicken.step": { "sounds": [ "mob/chicken/step1", "mob/chicken/step2" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.cow.hurt": { - "category": "neutral", - "sounds": [ - "mob/cow/hurt1", - "mob/cow/hurt2", - "mob/cow/hurt3" - ] - }, - "mob.cow.say": { - "category": "neutral", + "entity.cow.ambient": { "sounds": [ "mob/cow/say1", "mob/cow/say2", "mob/cow/say3", "mob/cow/say4" - ] + ], + "subtitle": "subtitles.entity.cow.ambient" }, - "mob.cow.step": { - "category": "neutral", + "entity.cow.death": { + "sounds": [ + "mob/cow/hurt1", + "mob/cow/hurt2", + "mob/cow/hurt3" + ], + "subtitle": "subtitles.entity.cow.death" + }, + "entity.cow.hurt": { + "sounds": [ + "mob/cow/hurt1", + "mob/cow/hurt2", + "mob/cow/hurt3" + ], + "subtitle": "subtitles.entity.cow.hurt" + }, + "entity.cow.milk": { + "sounds": [ + "entity/cow/milk1", + "entity/cow/milk2", + "entity/cow/milk3" + ], + "subtitle": "subtitles.entity.cow.milk" + }, + "entity.cow.step": { "sounds": [ "mob/cow/step1", "mob/cow/step2", "mob/cow/step3", "mob/cow/step4" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.creeper.death": { - "category": "hostile", + "entity.creeper.death": { "sounds": [ "mob/creeper/death" - ] + ], + "subtitle": "subtitles.entity.creeper.death" }, - "mob.creeper.say": { - "category": "hostile", + "entity.creeper.hurt": { "sounds": [ "mob/creeper/say1", "mob/creeper/say2", "mob/creeper/say3", "mob/creeper/say4" - ] + ], + "subtitle": "subtitles.entity.creeper.hurt" }, - "mob.enderdragon.end": { - "category": "hostile", + "entity.creeper.primed": { "sounds": [ - "mob/enderdragon/end" + "random/fuse" + ], + "subtitle": "subtitles.entity.creeper.primed" + }, + "entity.donkey.ambient": { + "sounds": [ + "mob/horse/donkey/idle1", + "mob/horse/donkey/idle2", + "mob/horse/donkey/idle3" + ], + "subtitle": "subtitles.entity.donkey.ambient" + }, + "entity.donkey.angry": { + "sounds": [ + "mob/horse/donkey/angry1", + "mob/horse/donkey/angry2" ] }, - "mob.enderdragon.growl": { - "category": "hostile", + "entity.donkey.chest": { + "sounds": [ + "mob/chicken/plop" + ] + }, + "entity.donkey.death": { + "sounds": [ + "mob/horse/donkey/death" + ], + "subtitle": "subtitles.entity.donkey.death" + }, + "entity.donkey.hurt": { + "sounds": [ + "mob/horse/donkey/hit1", + "mob/horse/donkey/hit2", + "mob/horse/donkey/hit3" + ], + "subtitle": "subtitles.entity.donkey.hurt" + }, + "entity.egg.throw": { + "sounds": [ + "random/bow" + ], + "subtitle": "subtitles.entity.egg.throw" + }, + "entity.elder_guardian.ambient": { + "sounds": [ + "mob/guardian/elder_idle1", + "mob/guardian/elder_idle2", + "mob/guardian/elder_idle3", + "mob/guardian/elder_idle4" + ], + "subtitle": "subtitles.entity.guardian.ambient" + }, + "entity.elder_guardian.ambient_land": { + "sounds": [ + "mob/guardian/land_idle1", + "mob/guardian/land_idle2", + "mob/guardian/land_idle3", + "mob/guardian/land_idle4" + ], + "subtitle": "subtitles.entity.guardian.ambient.land" + }, + "entity.elder_guardian.curse": { + "sounds": [ + "mob/guardian/curse" + ], + "subtitle": "subtitles.entity.guardian.curse" + }, + "entity.elder_guardian.death": { + "sounds": [ + "mob/guardian/elder_death" + ], + "subtitle": "subtitles.entity.guardian.death" + }, + "entity.elder_guardian.death_land": { + "sounds": [ + "mob/guardian/land_death" + ], + "subtitle": "subtitles.entity.guardian.death" + }, + "entity.elder_guardian.hurt": { + "sounds": [ + "mob/guardian/elder_hit1", + "mob/guardian/elder_hit2", + "mob/guardian/elder_hit3", + "mob/guardian/elder_hit4" + ], + "subtitle": "subtitles.entity.guardian.hurt" + }, + "entity.elder_guardian.hurt_land": { + "sounds": [ + "mob/guardian/land_hit1", + "mob/guardian/land_hit2", + "mob/guardian/land_hit3", + "mob/guardian/land_hit4" + ], + "subtitle": "subtitles.entity.guardian.hurt" + }, + "entity.enderdragon.ambient": { "sounds": [ "mob/enderdragon/growl1", "mob/enderdragon/growl2", "mob/enderdragon/growl3", "mob/enderdragon/growl4" - ] + ], + "subtitle": "subtitles.entity.enderdragon.ambient" }, - "mob.enderdragon.hit": { - "category": "hostile", + "entity.enderdragon.death": { "sounds": [ - "mob/enderdragon/hit1", - "mob/enderdragon/hit2", - "mob/enderdragon/hit3", - "mob/enderdragon/hit4" - ] + "mob/enderdragon/end" + ], + "subtitle": "subtitles.entity.enderdragon.death" }, - "mob.enderdragon.wings": { - "category": "hostile", + "entity.enderdragon.flap": { "sounds": [ "mob/enderdragon/wings1", "mob/enderdragon/wings2", @@ -626,81 +1399,275 @@ "mob/enderdragon/wings4", "mob/enderdragon/wings5", "mob/enderdragon/wings6" - ] + ], + "subtitle": "subtitles.entity.enderdragon.flap" }, - "mob.endermen.death": { - "category": "hostile", + "entity.enderdragon.growl": { "sounds": [ - "mob/endermen/death" - ] + "mob/enderdragon/growl1", + "mob/enderdragon/growl2", + "mob/enderdragon/growl3", + "mob/enderdragon/growl4" + ], + "subtitle": "subtitles.entity.enderdragon.growl" }, - "mob.endermen.hit": { - "category": "hostile", + "entity.enderdragon.hurt": { "sounds": [ - "mob/endermen/hit1", - "mob/endermen/hit2", - "mob/endermen/hit3", - "mob/endermen/hit4" + "mob/enderdragon/hit1", + "mob/enderdragon/hit2", + "mob/enderdragon/hit3", + "mob/enderdragon/hit4" + ], + "subtitle": "subtitles.entity.enderdragon.hurt" + }, + "entity.enderdragon.shoot": { + "sounds": [ + "mob/ghast/fireball4" + ], + "subtitle": "subtitles.entity.enderdragon.shoot" + }, + "entity.enderdragon_fireball.explode": { + "sounds": [ + "random/explode1", + "random/explode2", + "random/explode3", + "random/explode4" + ], + "subtitle": "subtitles.entity.generic.explode" + }, + "entity.endereye.launch": { + "sounds": [ + "random/bow" ] }, - "mob.endermen.idle": { - "category": "hostile", + "entity.endermen.ambient": { "sounds": [ "mob/endermen/idle1", "mob/endermen/idle2", "mob/endermen/idle3", "mob/endermen/idle4", "mob/endermen/idle5" - ] + ], + "subtitle": "subtitles.entity.enderman.ambient" }, - "mob.endermen.portal": { - "category": "hostile", + "entity.endermen.death": { "sounds": [ - "mob/endermen/portal", - "mob/endermen/portal2" - ] + "mob/endermen/death" + ], + "subtitle": "subtitles.entity.enderman.death" }, - "mob.endermen.scream": { - "category": "hostile", + "entity.endermen.hurt": { + "sounds": [ + "mob/endermen/hit1", + "mob/endermen/hit2", + "mob/endermen/hit3", + "mob/endermen/hit4" + ], + "subtitle": "subtitles.entity.enderman.hurt" + }, + "entity.endermen.scream": { "sounds": [ "mob/endermen/scream1", "mob/endermen/scream2", "mob/endermen/scream3", "mob/endermen/scream4" - ] + ], + "subtitle": "subtitles.entity.enderman.ambient" }, - "mob.endermen.stare": { - "category": "hostile", + "entity.endermen.stare": { "sounds": [ "mob/endermen/stare" - ] + ], + "subtitle": "subtitles.entity.enderman.stare" }, - "mob.ghast.affectionate_scream": { - "category": "hostile", + "entity.endermen.teleport": { "sounds": [ - "mob/ghast/affectionate_scream" - ] + "mob/endermen/portal", + "mob/endermen/portal2" + ], + "subtitle": "subtitles.entity.enderman.teleport" }, - "mob.ghast.charge": { - "category": "hostile", + "entity.endermite.ambient": { "sounds": [ - "mob/ghast/charge" - ] + "mob/silverfish/say1", + "mob/silverfish/say2", + "mob/silverfish/say3", + "mob/silverfish/say4" + ], + "subtitle": "subtitles.entity.endermite.ambient" }, - "mob.ghast.death": { - "category": "hostile", + "entity.endermite.death": { "sounds": [ - "mob/ghast/death" - ] + "mob/silverfish/kill" + ], + "subtitle": "subtitles.entity.endermite.death" }, - "mob.ghast.fireball": { - "category": "hostile", + "entity.endermite.hurt": { "sounds": [ - "mob/ghast/fireball4" + "mob/silverfish/hit1", + "mob/silverfish/hit2", + "mob/silverfish/hit3" + ], + "subtitle": "subtitles.entity.endermite.hurt" + }, + "entity.endermite.step": { + "sounds": [ + "mob/silverfish/step1", + "mob/silverfish/step2", + "mob/silverfish/step3", + "mob/silverfish/step4" + ], + "subtitle": "subtitles.block.generic.footsteps" + }, + "entity.enderpearl.throw": { + "sounds": [ + "random/bow" + ], + "subtitle": "subtitles.entity.enderpearl.throw" + }, + "entity.experience_bottle.throw": { + "sounds": [ + "random/bow" ] }, - "mob.ghast.moan": { - "category": "hostile", + "entity.experience_orb.pickup": { + "sounds": [ + "random/orb" + ], + "subtitle": "subtitles.entity.experience_orb.pickup" + }, + "entity.experience_orb.touch": { + "sounds": [ + "random/orb" + ] + }, + "entity.firework.blast": { + "sounds": [ + "fireworks/blast1" + ], + "subtitle": "subtitles.entity.firework.blast" + }, + "entity.firework.blast_far": { + "sounds": [ + "fireworks/blast_far1" + ], + "subtitle": "subtitles.entity.firework.blast" + }, + "entity.firework.large_blast": { + "sounds": [ + "fireworks/largeBlast1" + ], + "subtitle": "subtitles.entity.firework.blast" + }, + "entity.firework.large_blast_far": { + "sounds": [ + "fireworks/largeBlast_far1" + ], + "subtitle": "subtitles.entity.firework.blast" + }, + "entity.firework.launch": { + "sounds": [ + "fireworks/launch1" + ], + "subtitle": "subtitles.entity.firework.launch" + }, + "entity.firework.shoot": { + "sounds": [ + "random/bow" + ], + "subtitle": "subtitles.entity.firework.launch" + }, + "entity.firework.twinkle": { + "sounds": [ + "fireworks/twinkle1" + ], + "subtitle": "subtitles.entity.firework.twinkle" + }, + "entity.firework.twinkle_far": { + "sounds": [ + "fireworks/twinkle_far1" + ], + "subtitle": "subtitles.entity.firework.twinkle" + }, + "entity.generic.big_fall": { + "sounds": [ + "damage/fallbig" + ], + "subtitle": "subtitles.entity.generic.big_fall" + }, + "entity.generic.burn": { + "sounds": [ + "random/fizz" + ], + "subtitle": "subtitles.entity.generic.burn" + }, + "entity.generic.death": { + "sounds": [ + "damage/hit1", + "damage/hit2", + "damage/hit3" + ], + "subtitle": "subtitles.entity.generic.death" + }, + "entity.generic.drink": { + "sounds": [ + "random/drink" + ], + "subtitle": "subtitles.entity.generic.drink" + }, + "entity.generic.eat": { + "sounds": [ + "random/eat1", + "random/eat2", + "random/eat3" + ], + "subtitle": "subtitles.entity.generic.eat" + }, + "entity.generic.explode": { + "sounds": [ + "random/explode1", + "random/explode2", + "random/explode3", + "random/explode4" + ], + "subtitle": "subtitles.entity.generic.explode" + }, + "entity.generic.extinguish_fire": { + "sounds": [ + "random/fizz" + ] + }, + "entity.generic.hurt": { + "sounds": [ + "damage/hit1", + "damage/hit2", + "damage/hit3" + ], + "subtitle": "subtitles.entity.generic.hurt" + }, + "entity.generic.small_fall": { + "sounds": [ + "damage/fallsmall" + ], + "subtitle": "subtitles.entity.generic.small_fall" + }, + "entity.generic.splash": { + "sounds": [ + "liquid/splash", + "liquid/splash2" + ], + "subtitle": "subtitles.entity.generic.splash" + }, + "entity.generic.swim": { + "sounds": [ + "liquid/swim1", + "liquid/swim2", + "liquid/swim3", + "liquid/swim4" + ], + "subtitle": "subtitles.entity.generic.swim" + }, + "entity.ghast.ambient": { "sounds": [ "mob/ghast/moan1", "mob/ghast/moan2", @@ -709,142 +1676,193 @@ "mob/ghast/moan5", "mob/ghast/moan6", "mob/ghast/moan7" - ] + ], + "subtitle": "subtitles.entity.ghast.ambient" }, - "mob.ghast.scream": { - "category": "hostile", + "entity.ghast.death": { + "sounds": [ + "mob/ghast/death" + ], + "subtitle": "subtitles.entity.ghast.death" + }, + "entity.ghast.hurt": { "sounds": [ "mob/ghast/scream1", "mob/ghast/scream2", "mob/ghast/scream3", "mob/ghast/scream4", "mob/ghast/scream5" + ], + "subtitle": "subtitles.entity.ghast.hurt" + }, + "entity.ghast.scream": { + "sounds": [ + "mob/ghast/affectionate_scream" ] }, - "mob.horse.angry": { - "category": "neutral", + "entity.ghast.shoot": { + "sounds": [ + "mob/ghast/fireball4" + ], + "subtitle": "subtitles.entity.ghast.shoot" + }, + "entity.ghast.warn": { + "sounds": [ + "mob/ghast/charge" + ], + "subtitle": "subtitles.entity.ghast.shoot" + }, + "entity.guardian.ambient": { + "sounds": [ + { + "name": "entity/guardian/ambient1", + "volume": 0.1 + }, + { + "name": "entity/guardian/ambient2", + "volume": 0.1 + }, + { + "name": "entity/guardian/ambient3", + "volume": 0.1 + }, + { + "name": "entity/guardian/ambient4", + "volume": 0.1 + } + ], + "subtitle": "subtitles.entity.guardian.ambient" + }, + "entity.guardian.ambient_land": { + "sounds": [ + "mob/guardian/land_idle1", + "mob/guardian/land_idle2", + "mob/guardian/land_idle3", + "mob/guardian/land_idle4" + ], + "subtitle": "subtitles.entity.guardian.ambient.land" + }, + "entity.guardian.attack": { + "sounds": [ + "mob/guardian/attack_loop" + ], + "subtitle": "subtitles.entity.guardian.attack" + }, + "entity.guardian.death": { + "sounds": [ + "mob/guardian/guardian_death" + ], + "subtitle": "subtitles.entity.guardian.death" + }, + "entity.guardian.death_land": { + "sounds": [ + "mob/guardian/land_death" + ], + "subtitle": "subtitles.entity.guardian.death" + }, + "entity.guardian.flop": { + "sounds": [ + "mob/guardian/flop1", + "mob/guardian/flop2", + "mob/guardian/flop3", + "mob/guardian/flop4" + ], + "subtitle": "subtitles.entity.guardian.flop" + }, + "entity.guardian.hurt": { + "sounds": [ + "mob/guardian/guardian_hit1", + "mob/guardian/guardian_hit2", + "mob/guardian/guardian_hit3", + "mob/guardian/guardian_hit4" + ], + "subtitle": "subtitles.entity.guardian.hurt" + }, + "entity.guardian.hurt_land": { + "sounds": [ + "mob/guardian/land_hit1", + "mob/guardian/land_hit2", + "mob/guardian/land_hit3", + "mob/guardian/land_hit4" + ], + "subtitle": "subtitles.entity.guardian.hurt" + }, + "entity.horse.ambient": { + "sounds": [ + "mob/horse/idle1", + "mob/horse/idle2", + "mob/horse/idle3" + ], + "subtitle": "subtitles.entity.horse.ambient" + }, + "entity.horse.angry": { "sounds": [ "mob/horse/angry1" ] }, - "mob.horse.armor": { - "category": "neutral", + "entity.horse.armor": { "sounds": [ "mob/horse/armor" ] }, - "mob.horse.breathe": { - "category": "neutral", + "entity.horse.breathe": { "sounds": [ "mob/horse/breathe1", "mob/horse/breathe2", "mob/horse/breathe3" ] }, - "mob.horse.death": { - "category": "neutral", + "entity.horse.death": { "sounds": [ "mob/horse/death" - ] + ], + "subtitle": "subtitles.entity.horse.death" }, - "mob.horse.donkey.angry": { - "category": "neutral", + "entity.horse.eat": { "sounds": [ - "mob/horse/donkey/angry1", - "mob/horse/donkey/angry2" - ] + "entity/horse/eat1", + "entity/horse/eat2", + "entity/horse/eat3", + "entity/horse/eat4", + "entity/horse/eat5" + ], + "subtitle": "subtitles.entity.horse.eat" }, - "mob.horse.donkey.death": { - "category": "neutral", - "sounds": [ - "mob/horse/donkey/death" - ] - }, - "mob.horse.donkey.hit": { - "category": "neutral", - "sounds": [ - "mob/horse/donkey/hit1", - "mob/horse/donkey/hit2", - "mob/horse/donkey/hit3" - ] - }, - "mob.horse.donkey.idle": { - "category": "neutral", - "sounds": [ - "mob/horse/donkey/idle1", - "mob/horse/donkey/idle2", - "mob/horse/donkey/idle3" - ] - }, - "mob.horse.gallop": { - "category": "neutral", + "entity.horse.gallop": { "sounds": [ "mob/horse/gallop1", "mob/horse/gallop2", "mob/horse/gallop3", "mob/horse/gallop4" - ] + ], + "subtitle": "subtitles.entity.horse.gallop" }, - "mob.horse.hit": { - "category": "neutral", + "entity.horse.hurt": { "sounds": [ "mob/horse/hit1", "mob/horse/hit2", "mob/horse/hit3", "mob/horse/hit4" - ] + ], + "subtitle": "subtitles.entity.horse.hurt" }, - "mob.horse.idle": { - "category": "neutral", - "sounds": [ - "mob/horse/idle1", - "mob/horse/idle2", - "mob/horse/idle3" - ] - }, - "mob.horse.jump": { - "category": "neutral", + "entity.horse.jump": { "sounds": [ "mob/horse/jump" - ] + ], + "subtitle": "subtitles.entity.horse.jump" }, - "mob.horse.land": { - "category": "neutral", + "entity.horse.land": { "sounds": [ "mob/horse/land" ] }, - "mob.horse.leather": { - "category": "neutral", + "entity.horse.saddle": { "sounds": [ "mob/horse/leather" ] }, - "mob.horse.skeleton.death": { - "category": "neutral", - "sounds": [ - "mob/horse/skeleton/death" - ] - }, - "mob.horse.skeleton.hit": { - "category": "neutral", - "sounds": [ - "mob/horse/skeleton/hit1", - "mob/horse/skeleton/hit2", - "mob/horse/skeleton/hit3", - "mob/horse/skeleton/hit4" - ] - }, - "mob.horse.skeleton.idle": { - "category": "neutral", - "sounds": [ - "mob/horse/skeleton/idle1", - "mob/horse/skeleton/idle2", - "mob/horse/skeleton/idle3" - ] - }, - "mob.horse.soft": { - "category": "neutral", + "entity.horse.step": { "sounds": [ "mob/horse/soft1", "mob/horse/soft2", @@ -852,10 +1870,10 @@ "mob/horse/soft4", "mob/horse/soft5", "mob/horse/soft6" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.horse.wood": { - "category": "neutral", + "entity.horse.step_wood": { "sounds": [ "mob/horse/wood1", "mob/horse/wood2", @@ -863,136 +1881,504 @@ "mob/horse/wood4", "mob/horse/wood5", "mob/horse/wood6" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.horse.zombie.death": { - "category": "neutral", + "entity.hostile.big_fall": { "sounds": [ - "mob/horse/zombie/death" - ] + "damage/fallbig" + ], + "subtitle": "subtitles.entity.generic.big_fall" }, - "mob.horse.zombie.hit": { - "category": "neutral", + "entity.hostile.death": { "sounds": [ - "mob/horse/zombie/hit1", - "mob/horse/zombie/hit2", - "mob/horse/zombie/hit3", - "mob/horse/zombie/hit4" - ] + "damage/hit1", + "damage/hit2", + "damage/hit3" + ], + "subtitle": "subtitles.entity.generic.death" }, - "mob.horse.zombie.idle": { - "category": "neutral", + "entity.hostile.hurt": { "sounds": [ - "mob/horse/zombie/idle1", - "mob/horse/zombie/idle2", - "mob/horse/zombie/idle3" - ] + "damage/hit1", + "damage/hit2", + "damage/hit3" + ], + "subtitle": "subtitles.entity.generic.hurt" }, - "mob.irongolem.death": { - "category": "neutral", + "entity.hostile.small_fall": { + "sounds": [ + "damage/fallsmall" + ], + "subtitle": "subtitles.entity.generic.small_fall" + }, + "entity.hostile.splash": { + "sounds": [ + "liquid/splash", + "liquid/splash2" + ], + "subtitle": "subtitles.entity.generic.splash" + }, + "entity.hostile.swim": { + "sounds": [ + "liquid/swim1", + "liquid/swim2", + "liquid/swim3", + "liquid/swim4" + ], + "subtitle": "subtitles.entity.generic.swim" + }, + "entity.irongolem.attack": { + "sounds": [ + "mob/irongolem/throw" + ], + "subtitle": "subtitles.entity.iron_golem.attack" + }, + "entity.irongolem.death": { "sounds": [ "mob/irongolem/death" - ] + ], + "subtitle": "subtitles.entity.iron_golem.death" }, - "mob.irongolem.hit": { - "category": "neutral", + "entity.irongolem.hurt": { "sounds": [ "mob/irongolem/hit1", "mob/irongolem/hit2", "mob/irongolem/hit3", "mob/irongolem/hit4" - ] + ], + "subtitle": "subtitles.entity.iron_golem.hurt" }, - "mob.irongolem.throw": { - "category": "neutral", - "sounds": [ - "mob/irongolem/throw" - ] - }, - "mob.irongolem.walk": { - "category": "neutral", + "entity.irongolem.step": { "sounds": [ "mob/irongolem/walk1", "mob/irongolem/walk2", "mob/irongolem/walk3", "mob/irongolem/walk4" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.magmacube.big": { - "category": "hostile", + "entity.item.break": { "sounds": [ - "mob/magmacube/big1", - "mob/magmacube/big2", - "mob/magmacube/big3", - "mob/magmacube/big4" - ] + "random/break" + ], + "subtitle": "subtitles.entity.item.break" }, - "mob.magmacube.jump": { - "category": "hostile", + "entity.item.pickup": { + "sounds": [ + "random/pop" + ], + "subtitle": "subtitles.entity.item.pickup" + }, + "entity.itemframe.add_item": { + "sounds": [ + "entity/itemframe/add_item1", + "entity/itemframe/add_item2", + "entity/itemframe/add_item3", + "entity/itemframe/add_item4" + ], + "subtitle": "subtitles.entity.itemframe.add_item" + }, + "entity.itemframe.break": { + "sounds": [ + "entity/itemframe/break1", + "entity/itemframe/break2", + "entity/itemframe/break3" + ], + "subtitle": "subtitles.entity.itemframe.break" + }, + "entity.itemframe.place": { + "sounds": [ + "entity/itemframe/place1", + "entity/itemframe/place2", + "entity/itemframe/place3", + "entity/itemframe/place4" + ], + "subtitle": "subtitles.entity.itemframe.place" + }, + "entity.itemframe.remove_item": { + "sounds": [ + "entity/itemframe/remove_item1", + "entity/itemframe/remove_item2", + "entity/itemframe/remove_item3", + "entity/itemframe/remove_item4" + ], + "subtitle": "subtitles.entity.itemframe.remove_item" + }, + "entity.itemframe.rotate_item": { + "sounds": [ + "entity/itemframe/rotate_item1", + "entity/itemframe/rotate_item2", + "entity/itemframe/rotate_item3", + "entity/itemframe/rotate_item4" + ], + "subtitle": "subtitles.entity.itemframe.rotate_item" + }, + "entity.leashknot.break": { + "sounds": [ + "entity/leashknot/break1", + "entity/leashknot/break2", + "entity/leashknot/break3" + ], + "subtitle": "subtitles.entity.leashknot.break" + }, + "entity.leashknot.place": { + "sounds": [ + "entity/leashknot/place1", + "entity/leashknot/place2", + "entity/leashknot/place3" + ], + "subtitle": "subtitles.entity.leashknot.place" + }, + "entity.lightning.impact": { + "sounds": [ + "random/explode1", + "random/explode2", + "random/explode3", + "random/explode4" + ], + "subtitle": "subtitles.entity.lightning.impact" + }, + "entity.lightning.thunder": { + "sounds": [ + "ambient/weather/thunder1", + "ambient/weather/thunder2", + "ambient/weather/thunder3" + ], + "subtitle": "subtitles.entity.lightning.thunder" + }, + "entity.lingeringpotion.throw": { + "sounds": [ + "random/bow" + ], + "subtitle": "subtitles.entity.potion.throw" + }, + "entity.magmacube.death": { + "sounds": [ + "mob/slime/big1", + "mob/slime/big2", + "mob/slime/big3", + "mob/slime/big4" + ], + "subtitle": "subtitles.entity.magmacube.death" + }, + "entity.magmacube.hurt": { + "sounds": [ + "mob/slime/big1", + "mob/slime/big2", + "mob/slime/big3", + "mob/slime/big4" + ], + "subtitle": "subtitles.entity.magmacube.hurt" + }, + "entity.magmacube.jump": { "sounds": [ "mob/magmacube/jump1", "mob/magmacube/jump2", "mob/magmacube/jump3", "mob/magmacube/jump4" - ] + ], + "subtitle": "subtitles.entity.magmacube.squish" }, - "mob.magmacube.small": { - "category": "hostile", + "entity.magmacube.squish": { "sounds": [ - "mob/magmacube/small1", - "mob/magmacube/small2", - "mob/magmacube/small3", - "mob/magmacube/small4", - "mob/magmacube/small5" - ] + "mob/magmacube/big1", + "mob/magmacube/big2", + "mob/magmacube/big3", + "mob/magmacube/big4" + ], + "subtitle": "subtitles.entity.magmacube.squish" }, - "mob.pig.death": { - "category": "neutral", + "entity.minecart.inside": { "sounds": [ - "mob/pig/death" + "minecart/inside" ] }, - "mob.pig.say": { - "category": "neutral", + "entity.minecart.riding": { + "sounds": [ + "minecart/base" + ], + "subtitle": "subtitles.entity.minecart.riding" + }, + "entity.mooshroom.shear": { + "sounds": [ + "mob/sheep/shear" + ], + "subtitle": "subtitles.item.shear" + }, + "entity.mule.ambient": { + "sounds": [ + "mob/horse/donkey/idle1", + "mob/horse/donkey/idle2", + "mob/horse/donkey/idle3" + ], + "subtitle": "subtitles.entity.mule.ambient" + }, + "entity.mule.death": { + "sounds": [ + "mob/horse/donkey/death" + ], + "subtitle": "subtitles.entity.mule.death" + }, + "entity.mule.hurt": { + "sounds": [ + "mob/horse/donkey/hit1", + "mob/horse/donkey/hit2", + "mob/horse/donkey/hit3" + ], + "subtitle": "subtitles.entity.mule.hurt" + }, + "entity.painting.break": { + "sounds": [ + "entity/painting/break1", + "entity/painting/break2", + "entity/painting/break3" + ], + "subtitle": "subtitles.entity.painting.break" + }, + "entity.painting.place": { + "sounds": [ + "entity/painting/place1", + "entity/painting/place2", + "entity/painting/place3", + "entity/painting/place4" + ], + "subtitle": "subtitles.entity.painting.place" + }, + "entity.pig.ambient": { "sounds": [ "mob/pig/say1", "mob/pig/say2", "mob/pig/say3" + ], + "subtitle": "subtitles.entity.pig.ambient" + }, + "entity.pig.death": { + "sounds": [ + "mob/pig/death" + ], + "subtitle": "subtitles.entity.pig.death" + }, + "entity.pig.hurt": { + "sounds": [ + "mob/pig/say1", + "mob/pig/say2", + "mob/pig/say3" + ], + "subtitle": "subtitles.entity.pig.hurt" + }, + "entity.pig.saddle": { + "sounds": [ + "mob/horse/leather" ] }, - "mob.pig.step": { - "category": "neutral", + "entity.pig.step": { "sounds": [ "mob/pig/step1", "mob/pig/step2", "mob/pig/step3", "mob/pig/step4", "mob/pig/step5" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.rabbit.hurt": { - "category": "neutral", + "entity.player.attack.crit": { "sounds": [ { - "name": "mob/rabbit/hurt1", - "volume": 0.5 + "name": "entity/player/attack/crit1", + "volume": 0.7 }, { - "name": "mob/rabbit/hurt2", - "volume": 0.5 + "name": "entity/player/attack/crit2", + "volume": 0.7 }, { - "name": "mob/rabbit/hurt3", - "volume": 0.5 - }, - { - "name": "mob/rabbit/hurt4", - "volume": 0.5 + "name": "entity/player/attack/crit3", + "volume": 0.7 } ] }, - "mob.rabbit.idle": { - "category": "neutral", + "entity.player.attack.knockback": { + "sounds": [ + { + "name": "entity/player/attack/knockback1", + "volume": 0.7 + }, + { + "name": "entity/player/attack/knockback2", + "volume": 0.7 + }, + { + "name": "entity/player/attack/knockback3", + "volume": 0.7 + }, + { + "name": "entity/player/attack/knockback4", + "volume": 0.7 + } + ] + }, + "entity.player.attack.nodamage": { + "sounds": [ + { + "name": "entity/player/attack/weak1", + "volume": 0.7 + }, + { + "name": "entity/player/attack/weak2", + "volume": 0.7 + }, + { + "name": "entity/player/attack/weak3", + "volume": 0.7 + }, + { + "name": "entity/player/attack/weak4", + "volume": 0.7 + } + ] + }, + "entity.player.attack.strong": { + "sounds": [ + { + "name": "entity/player/attack/strong1", + "volume": 0.6 + }, + { + "name": "entity/player/attack/strong2", + "volume": 0.6 + }, + { + "name": "entity/player/attack/strong3", + "volume": 0.6 + }, + { + "name": "entity/player/attack/strong4", + "volume": 0.6 + }, + { + "name": "entity/player/attack/strong5", + "volume": 0.7 + }, + { + "name": "entity/player/attack/strong6", + "volume": 0.7 + } + ] + }, + "entity.player.attack.sweep": { + "sounds": [ + { + "name": "entity/player/attack/sweep1", + "volume": 0.7 + }, + { + "name": "entity/player/attack/sweep2", + "volume": 0.7 + }, + { + "name": "entity/player/attack/sweep3", + "volume": 0.7 + }, + { + "name": "entity/player/attack/sweep4", + "volume": 0.7 + }, + { + "name": "entity/player/attack/sweep5", + "volume": 0.7 + }, + { + "name": "entity/player/attack/sweep6", + "volume": 0.7 + }, + { + "name": "entity/player/attack/sweep7", + "volume": 0.7 + } + ] + }, + "entity.player.attack.weak": { + "sounds": [ + { + "name": "entity/player/attack/weak1", + "volume": 0.7 + }, + { + "name": "entity/player/attack/weak2", + "volume": 0.7 + }, + { + "name": "entity/player/attack/weak3", + "volume": 0.7 + }, + { + "name": "entity/player/attack/weak4", + "volume": 0.7 + } + ] + }, + "entity.player.big_fall": { + "sounds": [ + "damage/fallbig" + ], + "subtitle": "subtitles.entity.generic.big_fall" + }, + "entity.player.breath": { + "sounds": [ + "random/breath" + ] + }, + "entity.player.burp": { + "sounds": [ + "random/burp" + ], + "subtitle": "subtitles.entity.player.burp" + }, + "entity.player.death": { + "sounds": [ + "damage/hit1", + "damage/hit2", + "damage/hit3" + ], + "subtitle": "subtitles.entity.player.death" + }, + "entity.player.hurt": { + "sounds": [ + "damage/hit1", + "damage/hit2", + "damage/hit3" + ], + "subtitle": "subtitles.entity.player.hurt" + }, + "entity.player.levelup": { + "sounds": [ + "random/levelup" + ] + }, + "entity.player.small_fall": { + "sounds": [ + "damage/fallsmall" + ], + "subtitle": "subtitles.entity.generic.small_fall" + }, + "entity.player.splash": { + "sounds": [ + "liquid/splash", + "liquid/splash2" + ], + "subtitle": "subtitles.entity.generic.splash" + }, + "entity.player.swim": { + "sounds": [ + "liquid/swim1", + "liquid/swim2", + "liquid/swim3", + "liquid/swim4" + ], + "subtitle": "subtitles.entity.generic.swim" + }, + "entity.rabbit.ambient": { "sounds": [ { "name": "mob/rabbit/idle1", @@ -1010,10 +2396,49 @@ "name": "mob/rabbit/idle4", "volume": 0.25 } - ] + ], + "subtitle": "subtitles.entity.rabbit.ambient" }, - "mob.rabbit.hop": { - "category": "neutral", + "entity.rabbit.attack": { + "sounds": [ + "entity/rabbit/attack1", + "entity/rabbit/attack2", + "entity/rabbit/attack3", + "entity/rabbit/attack4" + ], + "subtitle": "subtitles.entity.rabbit.attack" + }, + "entity.rabbit.death": { + "sounds": [ + { + "name": "mob/rabbit/bunnymurder", + "volume": 0.5 + } + ], + "subtitle": "subtitles.entity.rabbit.death" + }, + "entity.rabbit.hurt": { + "sounds": [ + { + "name": "mob/rabbit/hurt1", + "volume": 0.5 + }, + { + "name": "mob/rabbit/hurt2", + "volume": 0.5 + }, + { + "name": "mob/rabbit/hurt3", + "volume": 0.5 + }, + { + "name": "mob/rabbit/hurt4", + "volume": 0.5 + } + ], + "subtitle": "subtitles.entity.rabbit.hurt" + }, + "entity.rabbit.jump": { "sounds": [ { "name": "mob/rabbit/hop1", @@ -1031,871 +2456,1025 @@ "name": "mob/rabbit/hop4", "volume": 0.1 } - ] + ], + "subtitle": "subtitles.entity.rabbit.jump" }, - "mob.rabbit.death": { - "category": "neutral", - "sounds": [ - { - "name": "mob/rabbit/bunnymurder", - "volume": 0.5 - } - ] - }, - "mob.sheep.say": { - "category": "neutral", + "entity.sheep.ambient": { "sounds": [ "mob/sheep/say1", "mob/sheep/say2", "mob/sheep/say3" - ] + ], + "subtitle": "subtitles.entity.sheep.ambient" }, - "mob.sheep.shear": { - "category": "neutral", + "entity.sheep.death": { + "sounds": [ + "mob/sheep/say1", + "mob/sheep/say2", + "mob/sheep/say3" + ], + "subtitle": "subtitles.entity.sheep.death" + }, + "entity.sheep.hurt": { + "sounds": [ + "mob/sheep/say1", + "mob/sheep/say2", + "mob/sheep/say3" + ], + "subtitle": "subtitles.entity.sheep.hurt" + }, + "entity.sheep.shear": { "sounds": [ "mob/sheep/shear" - ] + ], + "subtitle": "subtitles.item.shear" }, - "mob.sheep.step": { - "category": "neutral", + "entity.sheep.step": { "sounds": [ "mob/sheep/step1", "mob/sheep/step2", "mob/sheep/step3", "mob/sheep/step4", "mob/sheep/step5" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.silverfish.hit": { - "category": "hostile", + "entity.shulker.ambient": { "sounds": [ - "mob/silverfish/hit1", - "mob/silverfish/hit2", - "mob/silverfish/hit3" - ] + "entity/shulker/ambient1", + "entity/shulker/ambient2", + "entity/shulker/ambient3", + "entity/shulker/ambient4", + "entity/shulker/ambient5", + "entity/shulker/ambient6", + "entity/shulker/ambient7" + ], + "subtitle": "subtitles.entity.shulker.ambient" }, - "mob.silverfish.kill": { - "category": "hostile", + "entity.shulker.close": { "sounds": [ - "mob/silverfish/kill" - ] + "entity/shulker/close1", + "entity/shulker/close2", + "entity/shulker/close3", + "entity/shulker/close4", + "entity/shulker/close5" + ], + "subtitle": "subtitles.entity.shulker.close" }, - "mob.silverfish.say": { - "category": "hostile", + "entity.shulker.death": { + "sounds": [ + "entity/shulker/death1", + "entity/shulker/death2", + "entity/shulker/death3", + "entity/shulker/death4" + ], + "subtitle": "subtitles.entity.shulker.death" + }, + "entity.shulker.hurt": { + "sounds": [ + "entity/shulker/hurt1", + "entity/shulker/hurt2", + "entity/shulker/hurt3", + "entity/shulker/hurt4" + ], + "subtitle": "subtitles.entity.shulker.hurt" + }, + "entity.shulker.hurt_closed": { + "sounds": [ + "entity/shulker/hurt_closed1", + "entity/shulker/hurt_closed2", + "entity/shulker/hurt_closed3", + "entity/shulker/hurt_closed4", + "entity/shulker/hurt_closed5" + ], + "subtitle": "subtitles.entity.shulker.hurt" + }, + "entity.shulker.open": { + "sounds": [ + "entity/shulker/open1", + "entity/shulker/open2", + "entity/shulker/open3", + "entity/shulker/open4", + "entity/shulker/open5" + ], + "subtitle": "subtitles.entity.shulker.open" + }, + "entity.shulker.shoot": { + "sounds": [ + "entity/shulker/shoot1", + "entity/shulker/shoot2", + "entity/shulker/shoot3", + "entity/shulker/shoot4" + ], + "subtitle": "subtitles.entity.shulker.shoot" + }, + "entity.shulker.teleport": { + "sounds": [ + "mob/endermen/portal", + "mob/endermen/portal2" + ], + "subtitle": "subtitles.entity.shulker.teleport" + }, + "entity.shulker_bullet.hit": { + "sounds": [ + "entity/shulker_bullet/hit1", + "entity/shulker_bullet/hit2", + "entity/shulker_bullet/hit3", + "entity/shulker_bullet/hit4" + ], + "subtitle": "subtitles.entity.shulker_bullet.hit" + }, + "entity.shulker_bullet.hurt": { + "sounds": [ + "entity/shulker_bullet/hit1", + "entity/shulker_bullet/hit2", + "entity/shulker_bullet/hit3", + "entity/shulker_bullet/hit4" + ], + "subtitle": "subtitles.entity.shulker_bullet.hurt" + }, + "entity.silverfish.ambient": { "sounds": [ "mob/silverfish/say1", "mob/silverfish/say2", "mob/silverfish/say3", "mob/silverfish/say4" - ] + ], + "subtitle": "subtitles.entity.silverfish.ambient" }, - "mob.silverfish.step": { - "category": "hostile", + "entity.silverfish.death": { + "sounds": [ + "mob/silverfish/kill" + ], + "subtitle": "subtitles.entity.silverfish.death" + }, + "entity.silverfish.hurt": { + "sounds": [ + "mob/silverfish/hit1", + "mob/silverfish/hit2", + "mob/silverfish/hit3" + ], + "subtitle": "subtitles.entity.silverfish.hurt" + }, + "entity.silverfish.step": { "sounds": [ "mob/silverfish/step1", "mob/silverfish/step2", "mob/silverfish/step3", "mob/silverfish/step4" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.skeleton.death": { - "category": "hostile", + "entity.skeleton.ambient": { + "sounds": [ + "mob/skeleton/say1", + "mob/skeleton/say2", + "mob/skeleton/say3" + ], + "subtitle": "subtitles.entity.skeleton.ambient" + }, + "entity.skeleton.death": { "sounds": [ "mob/skeleton/death" - ] + ], + "subtitle": "subtitles.entity.skeleton.death" }, - "mob.skeleton.hurt": { - "category": "hostile", + "entity.skeleton.hurt": { "sounds": [ "mob/skeleton/hurt1", "mob/skeleton/hurt2", "mob/skeleton/hurt3", "mob/skeleton/hurt4" - ] + ], + "subtitle": "subtitles.entity.skeleton.hurt" }, - "mob.skeleton.say": { - "category": "hostile", + "entity.skeleton.shoot": { "sounds": [ - "mob/skeleton/say1", - "mob/skeleton/say2", - "mob/skeleton/say3" - ] + "random/bow" + ], + "subtitle": "subtitles.entity.skeleton.shoot" }, - "mob.skeleton.step": { - "category": "hostile", + "entity.skeleton.step": { "sounds": [ "mob/skeleton/step1", "mob/skeleton/step2", "mob/skeleton/step3", "mob/skeleton/step4" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.slime.attack": { - "category": "hostile", + "entity.skeleton_horse.ambient": { + "sounds": [ + "mob/horse/skeleton/idle1", + "mob/horse/skeleton/idle2", + "mob/horse/skeleton/idle3" + ], + "subtitle": "subtitles.entity.skeleton_horse.ambient" + }, + "entity.skeleton_horse.death": { + "sounds": [ + "mob/horse/skeleton/death" + ], + "subtitle": "subtitles.entity.skeleton_horse.death" + }, + "entity.skeleton_horse.hurt": { + "sounds": [ + "mob/horse/skeleton/hit1", + "mob/horse/skeleton/hit2", + "mob/horse/skeleton/hit3", + "mob/horse/skeleton/hit4" + ], + "subtitle": "subtitles.entity.skeleton_horse.hurt" + }, + "entity.slime.attack": { "sounds": [ "mob/slime/attack1", "mob/slime/attack2" - ] + ], + "subtitle": "subtitles.entity.slime.attack" }, - "mob.slime.big": { - "category": "hostile", + "entity.slime.death": { "sounds": [ "mob/slime/big1", "mob/slime/big2", "mob/slime/big3", "mob/slime/big4" - ] + ], + "subtitle": "subtitles.entity.slime.death" }, - "mob.slime.small": { - "category": "hostile", + "entity.slime.hurt": { + "sounds": [ + "mob/slime/big1", + "mob/slime/big2", + "mob/slime/big3", + "mob/slime/big4" + ], + "subtitle": "subtitles.entity.slime.hurt" + }, + "entity.slime.jump": { + "sounds": [ + "mob/slime/big1", + "mob/slime/big2", + "mob/slime/big3", + "mob/slime/big4" + ], + "subtitle": "subtitles.entity.slime.squish" + }, + "entity.slime.squish": { + "sounds": [ + "mob/slime/big1", + "mob/slime/big2", + "mob/slime/big3", + "mob/slime/big4" + ], + "subtitle": "subtitles.entity.slime.squish" + }, + "entity.small_magmacube.death": { "sounds": [ "mob/slime/small1", "mob/slime/small2", "mob/slime/small3", "mob/slime/small4", "mob/slime/small5" - ] + ], + "subtitle": "subtitles.entity.magmacube.death" }, - "mob.spider.death": { - "category": "hostile", + "entity.small_magmacube.hurt": { "sounds": [ - "mob/spider/death" + "mob/slime/small1", + "mob/slime/small2", + "mob/slime/small3", + "mob/slime/small4", + "mob/slime/small5" + ], + "subtitle": "subtitles.entity.magmacube.hurt" + }, + "entity.small_magmacube.squish": { + "sounds": [ + "mob/magmacube/small1", + "mob/magmacube/small2", + "mob/magmacube/small3", + "mob/magmacube/small4", + "mob/magmacube/small5" ] }, - "mob.spider.say": { - "category": "hostile", + "entity.small_slime.death": { + "sounds": [ + "mob/slime/small1", + "mob/slime/small2", + "mob/slime/small3", + "mob/slime/small4", + "mob/slime/small5" + ], + "subtitle": "subtitles.entity.slime.death" + }, + "entity.small_slime.hurt": { + "sounds": [ + "mob/slime/small1", + "mob/slime/small2", + "mob/slime/small3", + "mob/slime/small4", + "mob/slime/small5" + ], + "subtitle": "subtitles.entity.slime.hurt" + }, + "entity.small_slime.jump": { + "sounds": [] + }, + "entity.small_slime.squish": { + "sounds": [] + }, + "entity.snowball.throw": { + "sounds": [ + "random/bow" + ], + "subtitle": "subtitles.entity.snowball.throw" + }, + "entity.snowman.ambient": { + "sounds": [] + }, + "entity.snowman.death": { + "sounds": [ + "entity/snowman/death1", + "entity/snowman/death2", + "entity/snowman/death3" + ], + "subtitle": "subtitles.entity.snowman.death" + }, + "entity.snowman.hurt": { + "sounds": [ + "entity/snowman/hurt1", + "entity/snowman/hurt2", + "entity/snowman/hurt3" + ], + "subtitle": "subtitles.entity.snowman.hurt" + }, + "entity.snowman.shoot": { + "sounds": [ + "random/bow" + ], + "subtitle": "subtitles.entity.snowball.throw" + }, + "entity.spider.ambient": { "sounds": [ "mob/spider/say1", "mob/spider/say2", "mob/spider/say3", "mob/spider/say4" - ] + ], + "subtitle": "subtitles.entity.spider.ambient" }, - "mob.spider.step": { - "category": "hostile", + "entity.spider.death": { + "sounds": [ + "mob/spider/death" + ], + "subtitle": "subtitles.entity.spider.death" + }, + "entity.spider.hurt": { + "sounds": [ + "mob/spider/say1", + "mob/spider/say2", + "mob/spider/say3", + "mob/spider/say4" + ], + "subtitle": "subtitles.entity.spider.hurt" + }, + "entity.spider.step": { "sounds": [ "mob/spider/step1", "mob/spider/step2", "mob/spider/step3", "mob/spider/step4" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.villager.death": { - "category": "neutral", + "entity.splash_potion.break": { + "sounds": [ + "random/glass1", + "random/glass2", + "random/glass3" + ], + "subtitle": "subtitles.entity.potion.splash" + }, + "entity.splash_potion.throw": { + "sounds": [ + "random/bow" + ], + "subtitle": "subtitles.entity.potion.throw" + }, + "entity.squid.ambient": { + "sounds": [ + "entity/squid/ambient1", + "entity/squid/ambient2", + "entity/squid/ambient3", + "entity/squid/ambient4", + "entity/squid/ambient5" + ], + "subtitle": "subtitles.entity.squid.ambient" + }, + "entity.squid.death": { + "sounds": [ + "entity/squid/death1", + "entity/squid/death2", + "entity/squid/death3" + ], + "subtitle": "subtitles.entity.squid.death" + }, + "entity.squid.hurt": { + "sounds": [ + "entity/squid/hurt1", + "entity/squid/hurt2", + "entity/squid/hurt3", + "entity/squid/hurt4" + ], + "subtitle": "subtitles.entity.squid.hurt" + }, + "entity.tnt.primed": { + "sounds": [ + "random/fuse" + ], + "subtitle": "subtitles.entity.tnt.primed" + }, + "entity.villager.ambient": { + "sounds": [ + "mob/villager/idle1", + "mob/villager/idle2", + "mob/villager/idle3" + ], + "subtitle": "subtitles.entity.villager.ambient" + }, + "entity.villager.death": { "sounds": [ "mob/villager/death" - ] + ], + "subtitle": "subtitles.entity.villager.death" }, - "mob.villager.haggle": { - "category": "neutral", - "sounds": [ - "mob/villager/haggle1", - "mob/villager/haggle2", - "mob/villager/haggle3" - ] - }, - "mob.villager.hit": { - "category": "neutral", + "entity.villager.hurt": { "sounds": [ "mob/villager/hit1", "mob/villager/hit2", "mob/villager/hit3", "mob/villager/hit4" - ] + ], + "subtitle": "subtitles.entity.villager.hurt" }, - "mob.villager.idle": { - "category": "neutral", - "sounds": [ - "mob/villager/idle1", - "mob/villager/idle2", - "mob/villager/idle3" - ] - }, - "mob.villager.no": { - "category": "neutral", + "entity.villager.no": { "sounds": [ "mob/villager/no1", "mob/villager/no2", "mob/villager/no3" ] }, - "mob.villager.yes": { - "category": "neutral", + "entity.villager.trading": { + "sounds": [ + "mob/villager/haggle1", + "mob/villager/haggle2", + "mob/villager/haggle3" + ] + }, + "entity.villager.yes": { "sounds": [ "mob/villager/yes1", "mob/villager/yes2", "mob/villager/yes3" ] }, - "mob.wither.death": { - "category": "hostile", + "entity.witch.ambient": { "sounds": [ - "mob/wither/death" - ] + { + "name": "entity/witch/ambient5", + "pitch": 0.9 + }, + "entity/witch/ambient1", + "entity/witch/ambient2", + "entity/witch/ambient3", + "entity/witch/ambient4", + "entity/witch/ambient5" + ], + "subtitle": "subtitles.entity.witch.ambient" }, - "mob.wither.hurt": { - "category": "hostile", + "entity.witch.death": { "sounds": [ - "mob/wither/hurt1", - "mob/wither/hurt2", - "mob/wither/hurt3", - "mob/wither/hurt4" - ] + "entity/witch/death1", + "entity/witch/death2", + "entity/witch/death3" + ], + "subtitle": "subtitles.entity.witch.death" }, - "mob.wither.idle": { - "category": "hostile", + "entity.witch.drink": { + "sounds": [ + "entity/witch/drink1", + "entity/witch/drink2", + "entity/witch/drink3", + "entity/witch/drink4" + ], + "subtitle": "subtitles.entity.witch.drink" + }, + "entity.witch.hurt": { + "sounds": [ + "entity/witch/hurt1", + "entity/witch/hurt2", + "entity/witch/hurt3" + ], + "subtitle": "subtitles.entity.witch.hurt" + }, + "entity.witch.throw": { + "sounds": [ + "entity/witch/throw1", + "entity/witch/throw2", + "entity/witch/throw3" + ], + "subtitle": "subtitles.entity.witch.throw" + }, + "entity.wither.ambient": { "sounds": [ "mob/wither/idle1", "mob/wither/idle2", "mob/wither/idle3", "mob/wither/idle4" - ] + ], + "subtitle": "subtitles.entity.wither.ambient" }, - "mob.wither.shoot": { - "category": "hostile", + "entity.wither.break_block": { + "sounds": [ + "mob/zombie/woodbreak" + ], + "subtitle": "subtitles.entity.wither.shoot" + }, + "entity.wither.death": { + "sounds": [ + "mob/wither/death" + ], + "subtitle": "subtitles.entity.wither.death" + }, + "entity.wither.hurt": { + "sounds": [ + "mob/wither/hurt1", + "mob/wither/hurt2", + "mob/wither/hurt3", + "mob/wither/hurt4" + ], + "subtitle": "subtitles.entity.wither.hurt" + }, + "entity.wither.shoot": { "sounds": [ "mob/wither/shoot" - ] + ], + "subtitle": "subtitles.entity.wither.shoot" }, - "mob.wither.spawn": { - "category": "hostile", + "entity.wither.spawn": { "sounds": [ "mob/wither/spawn" - ] + ], + "subtitle": "subtitles.entity.wither.spawn" }, - "mob.wolf.bark": { - "category": "neutral", + "entity.wolf.ambient": { "sounds": [ "mob/wolf/bark1", "mob/wolf/bark2", "mob/wolf/bark3" - ] + ], + "subtitle": "subtitles.entity.wolf.ambient" }, - "mob.wolf.death": { - "category": "neutral", + "entity.wolf.death": { "sounds": [ "mob/wolf/death" - ] + ], + "subtitle": "subtitles.entity.wolf.death" }, - "mob.wolf.growl": { - "category": "neutral", + "entity.wolf.growl": { "sounds": [ "mob/wolf/growl1", "mob/wolf/growl2", "mob/wolf/growl3" - ] + ], + "subtitle": "subtitles.entity.wolf.growl" }, - "mob.wolf.howl": { - "category": "neutral", + "entity.wolf.howl": { "sounds": [ "mob/wolf/howl1", "mob/wolf/howl2" ] }, - "mob.wolf.hurt": { - "category": "neutral", + "entity.wolf.hurt": { "sounds": [ "mob/wolf/hurt1", "mob/wolf/hurt2", "mob/wolf/hurt3" - ] + ], + "subtitle": "subtitles.entity.wolf.hurt" }, - "mob.wolf.panting": { - "category": "neutral", + "entity.wolf.pant": { "sounds": [ "mob/wolf/panting" - ] + ], + "subtitle": "subtitles.entity.wolf.ambient" }, - "mob.wolf.shake": { - "category": "neutral", + "entity.wolf.shake": { "sounds": [ "mob/wolf/shake" ] }, - "mob.wolf.step": { - "category": "neutral", + "entity.wolf.step": { "sounds": [ "mob/wolf/step1", "mob/wolf/step2", "mob/wolf/step3", "mob/wolf/step4", "mob/wolf/step5" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.wolf.whine": { - "category": "neutral", + "entity.wolf.whine": { "sounds": [ "mob/wolf/whine" - ] + ], + "subtitle": "subtitles.entity.wolf.ambient" }, - "mob.zombie.death": { - "category": "hostile", - "sounds": [ - "mob/zombie/death" - ] - }, - "mob.zombie.hurt": { - "category": "hostile", - "sounds": [ - "mob/zombie/hurt1", - "mob/zombie/hurt2" - ] - }, - "mob.zombie.infect": { - "category": "hostile", - "sounds": [ - "mob/zombie/infect" - ] - }, - "mob.zombie.metal": { - "category": "hostile", - "sounds": [ - "mob/zombie/metal1", - "mob/zombie/metal2", - "mob/zombie/metal3" - ] - }, - "mob.zombie.remedy": { - "category": "hostile", - "sounds": [ - "mob/zombie/remedy" - ] - }, - "mob.zombie.say": { - "category": "hostile", + "entity.zombie.ambient": { "sounds": [ "mob/zombie/say1", "mob/zombie/say2", "mob/zombie/say3" + ], + "subtitle": "subtitles.entity.zombie.ambient" + }, + "entity.zombie.attack_door_wood": { + "sounds": [ + "mob/zombie/wood1", + "mob/zombie/wood2", + "mob/zombie/wood3", + "mob/zombie/wood4" + ], + "subtitle": "subtitles.block.generic.break" + }, + "entity.zombie.attack_iron_door": { + "sounds": [ + "mob/zombie/metal1", + "mob/zombie/metal2", + "mob/zombie/metal3" + ], + "subtitle": "subtitles.block.generic.break" + }, + "entity.zombie.break_door_wood": { + "sounds": [ + "mob/zombie/woodbreak" + ], + "subtitle": "subtitles.block.generic.break" + }, + "entity.zombie.death": { + "sounds": [ + "mob/zombie/death" + ], + "subtitle": "subtitles.entity.zombie.death" + }, + "entity.zombie.hurt": { + "sounds": [ + "mob/zombie/hurt1", + "mob/zombie/hurt2" + ], + "subtitle": "subtitles.entity.zombie.hurt" + }, + "entity.zombie.infect": { + "sounds": [ + "mob/zombie/infect" ] }, - "mob.zombie.step": { - "category": "hostile", + "entity.zombie.step": { "sounds": [ "mob/zombie/step1", "mob/zombie/step2", "mob/zombie/step3", "mob/zombie/step4", "mob/zombie/step5" - ] + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "mob.zombie.unfect": { - "category": "hostile", + "entity.zombie_horse.ambient": { "sounds": [ - "mob/zombie/unfect" - ] + "mob/horse/zombie/idle1", + "mob/horse/zombie/idle2", + "mob/horse/zombie/idle3" + ], + "subtitle": "subtitles.entity.zombie_horse.ambient" }, - "mob.zombie.wood": { - "category": "hostile", + "entity.zombie_horse.death": { "sounds": [ - "mob/zombie/wood1", - "mob/zombie/wood2", - "mob/zombie/wood3", - "mob/zombie/wood4" - ] + "mob/horse/zombie/death" + ], + "subtitle": "subtitles.entity.zombie_horse.death" }, - "mob.zombie.woodbreak": { - "category": "hostile", + "entity.zombie_horse.hurt": { "sounds": [ - "mob/zombie/woodbreak" - ] + "mob/horse/zombie/hit1", + "mob/horse/zombie/hit2", + "mob/horse/zombie/hit3", + "mob/horse/zombie/hit4" + ], + "subtitle": "subtitles.entity.zombie_horse.hurt" }, - "mob.zombiepig.zpig": { - "category": "hostile", + "entity.zombie_pig.ambient": { "sounds": [ "mob/zombiepig/zpig1", "mob/zombiepig/zpig2", "mob/zombiepig/zpig3", "mob/zombiepig/zpig4" - ] + ], + "subtitle": "subtitles.entity.zombie_pigman.ambient" }, - "mob.zombiepig.zpigangry": { - "category": "hostile", + "entity.zombie_pig.angry": { "sounds": [ "mob/zombiepig/zpigangry1", "mob/zombiepig/zpigangry2", "mob/zombiepig/zpigangry3", "mob/zombiepig/zpigangry4" - ] + ], + "subtitle": "subtitles.entity.zombie_pigman.angry" }, - "mob.zombiepig.zpigdeath": { - "category": "hostile", + "entity.zombie_pig.death": { "sounds": [ "mob/zombiepig/zpigdeath" - ] + ], + "subtitle": "subtitles.entity.zombie_pigman.death" }, - "mob.zombiepig.zpighurt": { - "category": "hostile", + "entity.zombie_pig.hurt": { "sounds": [ "mob/zombiepig/zpighurt1", "mob/zombiepig/zpighurt2" - ] + ], + "subtitle": "subtitles.entity.zombie_pigman.hurt" }, - "note.bass": { - "category": "record", + "entity.zombie_villager.ambient": { "sounds": [ - "note/bass" - ] + "mob/zombie/say1", + "mob/zombie/say2", + "mob/zombie/say3" + ], + "subtitle": "subtitles.entity.zombie.ambient" }, - "note.bassattack": { - "category": "record", + "entity.zombie_villager.converted": { "sounds": [ - "note/bassattack" - ] + "mob/zombie/unfect" + ], + "subtitle": "subtitles.entity.zombie_villager.converted" }, - "note.bd": { - "category": "record", + "entity.zombie_villager.cure": { "sounds": [ - "note/bd" - ] + "mob/zombie/remedy" + ], + "subtitle": "subtitles.entity.zombie_villager.cure" }, - "note.harp": { - "category": "record", + "entity.zombie_villager.death": { "sounds": [ - "note/harp" - ] + "mob/zombie/death" + ], + "subtitle": "subtitles.entity.zombie.death" }, - "note.hat": { - "category": "record", + "entity.zombie_villager.hurt": { "sounds": [ - "note/hat" - ] + "mob/zombie/hurt1", + "mob/zombie/hurt2" + ], + "subtitle": "subtitles.entity.zombie.hurt" }, - "note.pling": { - "category": "record", + "entity.zombie_villager.step": { "sounds": [ - "note/pling" - ] + "mob/zombie/step1", + "mob/zombie/step2", + "mob/zombie/step3", + "mob/zombie/step4", + "mob/zombie/step5" + ], + "subtitle": "subtitles.block.generic.footsteps" }, - "note.snare": { - "category": "record", + "item.armor.equip_chain": { "sounds": [ - "note/snare" - ] + "item/armor/equip_chain1", + "item/armor/equip_chain2", + "item/armor/equip_chain3", + "item/armor/equip_chain4", + "item/armor/equip_chain5", + "item/armor/equip_chain6" + ], + "subtitle": "subtitles.item.armor.equip_chain" }, - "portal.portal": { - "category": "block", + "item.armor.equip_diamond": { "sounds": [ - "portal/portal" - ] + "item/armor/equip_diamond1", + "item/armor/equip_diamond2", + "item/armor/equip_diamond3", + "item/armor/equip_diamond4", + "item/armor/equip_diamond5", + "item/armor/equip_diamond6" + ], + "subtitle": "subtitles.item.armor.equip_diamond" }, - "portal.travel": { - "category": "player", + "item.armor.equip_generic": { "sounds": [ - "portal/travel" - ] + "item/armor/equip_generic1", + "item/armor/equip_generic2", + "item/armor/equip_generic3", + "item/armor/equip_generic4", + "item/armor/equip_generic5", + "item/armor/equip_generic6" + ], + "subtitle": "subtitles.item.armor.equip" }, - "portal.trigger": { - "category": "block", + "item.armor.equip_gold": { "sounds": [ - "portal/trigger" - ] + "item/armor/equip_gold1", + "item/armor/equip_gold2", + "item/armor/equip_gold3", + "item/armor/equip_gold4", + "item/armor/equip_gold5", + "item/armor/equip_gold6" + ], + "subtitle": "subtitles.item.armor.equip_gold" }, - "random.anvil_break": { - "category": "block", + "item.armor.equip_iron": { "sounds": [ - "random/anvil_break" - ] + "item/armor/equip_iron1", + "item/armor/equip_iron2", + "item/armor/equip_iron3", + "item/armor/equip_iron4", + "item/armor/equip_iron5", + "item/armor/equip_iron6" + ], + "subtitle": "subtitles.item.armor.equip_iron" }, - "random.anvil_land": { - "category": "block", + "item.armor.equip_leather": { "sounds": [ - "random/anvil_land" - ] + "item/armor/equip_leather1", + "item/armor/equip_leather2", + "item/armor/equip_leather3", + "item/armor/equip_leather4", + "item/armor/equip_leather5", + "item/armor/equip_leather6" + ], + "subtitle": "subtitles.item.armor.equip_leather" }, - "random.anvil_use": { - "category": "block", + "item.bottle.fill": { "sounds": [ - "random/anvil_use" - ] + "item/bottle/fill1", + "item/bottle/fill2", + "item/bottle/fill3", + "item/bottle/fill4" + ], + "subtitle": "subtitles.item.bottle.fill" }, - "random.bow": { - "category": "neutral", + "item.bottle.fill_dragonbreath": { "sounds": [ - "random/bow" - ] + "item/bottle/fill_dragonbreath1", + "item/bottle/fill_dragonbreath2" + ], + "subtitle": "subtitles.item.bottle.fill" }, - "random.bowhit": { - "category": "neutral", + "item.bucket.empty": { "sounds": [ - "random/bowhit1", - "random/bowhit2", - "random/bowhit3", - "random/bowhit4" - ] + { + "name": "item/bucket/empty1", + "pitch": 0.9 + }, + "item/bucket/empty1", + "item/bucket/empty2", + "item/bucket/empty3" + ], + "subtitle": "subtitles.item.bucket.empty" }, - "random.break": { - "category": "player", + "item.bucket.empty_lava": { + "sounds": [ + "item/bucket/empty_lava1", + "item/bucket/empty_lava2", + "item/bucket/empty_lava3" + ], + "subtitle": "subtitles.item.bucket.empty" + }, + "item.bucket.fill": { + "sounds": [ + "item/bucket/fill1", + "item/bucket/fill2", + "item/bucket/fill3" + ], + "subtitle": "subtitles.item.bucket.fill" + }, + "item.bucket.fill_lava": { + "sounds": [ + "item/bucket/fill_lava1", + "item/bucket/fill_lava2", + "item/bucket/fill_lava3" + ], + "subtitle": "subtitles.item.bucket.fill" + }, + "item.chorus_fruit.teleport": { + "sounds": [ + "mob/endermen/portal", + "mob/endermen/portal2" + ], + "subtitle": "subtitles.item.chorus_fruit.teleport" + }, + "item.firecharge.use": { + "sounds": [ + "mob/ghast/fireball4" + ], + "subtitle": "subtitles.item.firecharge.use" + }, + "item.flintandsteel.use": { + "sounds": [ + "fire/ignite" + ], + "subtitle": "subtitles.item.flintandsteel.use" + }, + "item.hoe.till": { + "sounds": [ + "item/hoe/till1", + "item/hoe/till2", + "item/hoe/till3", + "item/hoe/till4" + ], + "subtitle": "subtitles.item.hoe.till" + }, + "item.shield.block": { + "sounds": [ + "item/shield/block1", + "item/shield/block2", + "item/shield/block3", + "item/shield/block4", + "item/shield/block5" + ], + "subtitle": "subtitles.item.shield.block" + }, + "item.shield.break": { "sounds": [ "random/break" - ] + ], + "subtitle": "subtitles.entity.item.break" }, - "random.burp": { - "category": "player", + "item.shovel.flatten": { "sounds": [ - "random/burp" - ] + "item/shovel/flatten1", + "item/shovel/flatten2", + "item/shovel/flatten3", + "item/shovel/flatten4" + ], + "subtitle": "subtitles.item.shovel.flatten" }, - "random.chestclosed": { - "category": "block", - "sounds": [ - "random/chestclosed" - ] - }, - "random.chestopen": { - "category": "block", - "sounds": [ - "random/chestopen" - ] - }, - "gui.button.press": { - "category": "master", - "sounds": [ - "random/click" - ] - }, - "random.click": { - "category": "block", - "sounds": [ - "random/click" - ] - }, - "random.door_close": { - "category": "block", - "sounds": [ - "random/door_close", - "random/door_open" - ] - }, - "random.door_open": { - "category": "block", - "sounds": [ - "random/door_close", - "random/door_open" - ] - }, - "random.drink": { - "category": "player", - "sounds": [ - "random/drink" - ] - }, - "item.elytra.flying": { - "category": "player", - "sounds": [ - "item/elytra/elytra_loop" - ] - }, - "random.eat": { - "category": "player", - "sounds": [ - "random/eat1", - "random/eat2", - "random/eat3" - ] - }, - "random.explode": { - "category": "block", - "sounds": [ - "random/explode1", - "random/explode2", - "random/explode3", - "random/explode4" - ] - }, - "random.fizz": { - "category": "block", - "sounds": [ - "random/fizz" - ] - }, - "game.tnt.primed": { - "category": "block", - "sounds": [ - "random/fuse" - ] - }, - "creeper.primed": { - "category": "hostile", - "sounds": [ - "random/fuse" - ] - }, - "dig.glass": { - "category": "block", - "sounds": [ - "random/glass1", - "random/glass2", - "random/glass3" - ] - }, - "game.potion.smash": { - "category": "neutral", - "sounds": [ - "random/glass1", - "random/glass2", - "random/glass3" - ] - }, - "random.levelup": { - "category": "player", - "sounds": [ - "random/levelup" - ] - }, - "random.orb": { - "category": "player", - "sounds": [ - "random/orb" - ] - }, - "random.pop": { - "category": "player", - "sounds": [ - "random/pop" - ] - }, - "random.splash": { - "category": "player", - "sounds": [ - "random/splash" - ] - }, - "random.successful_hit": { - "category": "player", - "sounds": [ - "random/successful_hit" - ] - }, - "random.wood_click": { - "category": "block", - "sounds": [ - "random/wood_click" - ] - }, - "records.11": { - "category": "record", + "music.creative": { "sounds": [ { - "name": "records/11", - "stream": true - } - ] - }, - "records.13": { - "category": "record", - "sounds": [ + "type": "event", + "name": "music.game" + }, { - "name": "records/13", - "stream": true - } - ] - }, - "records.blocks": { - "category": "record", - "sounds": [ - { - "name": "records/blocks", - "stream": true - } - ] - }, - "records.cat": { - "category": "record", - "sounds": [ - { - "name": "records/cat", - "stream": true - } - ] - }, - "records.chirp": { - "category": "record", - "sounds": [ - { - "name": "records/chirp", - "stream": true - } - ] - }, - "records.far": { - "category": "record", - "sounds": [ - { - "name": "records/far", - "stream": true - } - ] - }, - "records.mall": { - "category": "record", - "sounds": [ - { - "name": "records/mall", - "stream": true - } - ] - }, - "records.mellohi": { - "category": "record", - "sounds": [ - { - "name": "records/mellohi", - "stream": true - } - ] - }, - "records.stal": { - "category": "record", - "sounds": [ - { - "name": "records/stal", - "stream": true - } - ] - }, - "records.strad": { - "category": "record", - "sounds": [ - { - "name": "records/strad", - "stream": true - } - ] - }, - "records.wait": { - "category": "record", - "sounds": [ - { - "name": "records/wait", - "stream": true - } - ] - }, - "records.ward": { - "category": "record", - "sounds": [ - { - "name": "records/ward", - "stream": true - } - ] - }, - "step.cloth": { - "category": "neutral", - "sounds": [ - "step/cloth1", - "step/cloth2", - "step/cloth3", - "step/cloth4" - ] - }, - "step.grass": { - "category": "neutral", - "sounds": [ - "step/grass1", - "step/grass2", - "step/grass3", - "step/grass4", - "step/grass5", - "step/grass6" - ] - }, - "step.gravel": { - "category": "neutral", - "sounds": [ - "step/gravel1", - "step/gravel2", - "step/gravel3", - "step/gravel4" - ] - }, - "step.ladder": { - "category": "neutral", - "sounds": [ - "step/ladder1", - "step/ladder2", - "step/ladder3", - "step/ladder4", - "step/ladder5" - ] - }, - "step.sand": { - "category": "neutral", - "sounds": [ - "step/sand1", - "step/sand2", - "step/sand3", - "step/sand4", - "step/sand5" - ] - }, - "step.snow": { - "category": "neutral", - "sounds": [ - "step/snow1", - "step/snow2", - "step/snow3", - "step/snow4" - ] - }, - "step.stone": { - "category": "neutral", - "sounds": [ - "step/stone1", - "step/stone2", - "step/stone3", - "step/stone4", - "step/stone5", - "step/stone6" - ] - }, - "step.wood": { - "category": "neutral", - "sounds": [ - "step/wood1", - "step/wood2", - "step/wood3", - "step/wood4", - "step/wood5", - "step/wood6" - ] - }, - "tile.piston.in": { - "category": "block", - "sounds": [ - "tile/piston/in" - ] - }, - "tile.piston.out": { - "category": "block", - "sounds": [ - "tile/piston/out" - ] - }, - "music.menu": { - "category": "music", - "sounds": [ - { - "name": "music/menu/menu1", + "name": "music/game/creative/creative1", "stream": true }, { - "name": "music/menu/menu2", + "name": "music/game/creative/creative2", "stream": true }, { - "name": "music/menu/menu3", + "name": "music/game/creative/creative3", "stream": true }, { - "name": "music/menu/menu4", + "name": "music/game/creative/creative4", + "stream": true + }, + { + "name": "music/game/creative/creative5", + "stream": true + }, + { + "name": "music/game/creative/creative6", + "stream": true + } + ] + }, + "music.credits": { + "sounds": [ + { + "name": "music/game/end/credits", + "stream": true + } + ] + }, + "music.dragon": { + "sounds": [ + { + "name": "music/game/end/boss", + "stream": true + } + ] + }, + "music.end": { + "sounds": [ + { + "name": "music/game/end/end", "stream": true } ] }, "music.game": { - "category": "music", "sounds": [ { "name": "music/game/calm1", @@ -1947,68 +3526,27 @@ } ] }, - "music.game.creative": { - "category": "music", + "music.menu": { "sounds": [ { - "type": "event", - "name": "music.game" - }, - { - "name": "music/game/creative/creative1", + "name": "music/menu/menu1", "stream": true }, { - "name": "music/game/creative/creative2", + "name": "music/menu/menu2", "stream": true }, { - "name": "music/game/creative/creative3", + "name": "music/menu/menu3", "stream": true }, { - "name": "music/game/creative/creative4", - "stream": true - }, - { - "name": "music/game/creative/creative5", - "stream": true - }, - { - "name": "music/game/creative/creative6", + "name": "music/menu/menu4", "stream": true } ] }, - "music.game.end": { - "category": "music", - "sounds": [ - { - "name": "music/game/end/end", - "stream": true - } - ] - }, - "music.game.end.dragon": { - "category": "music", - "sounds": [ - { - "name": "music/game/end/boss", - "stream": true - } - ] - }, - "music.game.end.credits": { - "category": "music", - "sounds": [ - { - "name": "music/game/end/credits", - "stream": true - } - ] - }, - "music.game.nether": { - "category": "music", + "music.nether": { "sounds": [ { "name": "music/game/nether/nether1", @@ -2027,5 +3565,128 @@ "stream": true } ] + }, + "record.11": { + "sounds": [ + { + "name": "records/11", + "stream": true + } + ] + }, + "record.13": { + "sounds": [ + { + "name": "records/13", + "stream": true + } + ] + }, + "record.blocks": { + "sounds": [ + { + "name": "records/blocks", + "stream": true + } + ] + }, + "record.cat": { + "sounds": [ + { + "name": "records/cat", + "stream": true + } + ] + }, + "record.chirp": { + "sounds": [ + { + "name": "records/chirp", + "stream": true + } + ] + }, + "record.far": { + "sounds": [ + { + "name": "records/far", + "stream": true + } + ] + }, + "record.mall": { + "sounds": [ + { + "name": "records/mall", + "stream": true + } + ] + }, + "record.mellohi": { + "sounds": [ + { + "name": "records/mellohi", + "stream": true + } + ] + }, + "record.stal": { + "sounds": [ + { + "name": "records/stal", + "stream": true + } + ] + }, + "record.strad": { + "sounds": [ + { + "name": "records/strad", + "stream": true + } + ] + }, + "record.wait": { + "sounds": [ + { + "name": "records/wait", + "stream": true + } + ] + }, + "record.ward": { + "sounds": [ + { + "name": "records/ward", + "stream": true + } + ] + }, + "ui.button.click": { + "sounds": [ + "random/click" + ] + }, + "weather.rain": { + "sounds": [ + "ambient/weather/rain1", + "ambient/weather/rain2", + "ambient/weather/rain3", + "ambient/weather/rain4", + "ambient/weather/rain5", + "ambient/weather/rain6", + "ambient/weather/rain7", + "ambient/weather/rain8" + ], + "subtitle": "subtitles.weather.rain" + }, + "weather.rain.above": { + "sounds": [ + "ambient/weather/rain1", + "ambient/weather/rain2", + "ambient/weather/rain3", + "ambient/weather/rain4" + ], + "subtitle": "subtitles.weather.rain" } } \ No newline at end of file diff --git a/src/main/java/net/hoosiertransfer/Config.java b/src/main/java/net/hoosiertransfer/Config.java index adf72fe..fee1a76 100644 --- a/src/main/java/net/hoosiertransfer/Config.java +++ b/src/main/java/net/hoosiertransfer/Config.java @@ -17,7 +17,7 @@ public class Config { public static int SleepDuration = 10; public static int hitboxLimit = 50; - public static int protocolVersion = 107; + public static int protocolVersion = 110; public static boolean disableAlpha() { return Minecraft.getMinecraft().gameSettings.disableAlpha && !Minecraft.getMinecraft().gameSettings.shaders; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java index 6c72cc3..76c428d 100644 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java @@ -9,7 +9,7 @@ public class EaglercraftVersion { /// Customize these to fit your fork: public static final String projectForkName = "Eaglercraft Lambda"; - public static final String projectForkVersion = "0.3.1"; + public static final String projectForkVersion = "0.4.0"; public static final String projectForkVendor = "hoosiertransfer"; public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; @@ -38,7 +38,7 @@ public class EaglercraftVersion { // Miscellaneous variables: - public static final String mainMenuStringA = "Minecraft 1.8.8"; + public static final String mainMenuStringA = "Minecraft 1.9.4"; public static final String mainMenuStringB = projectOriginName + " " + projectOriginRevision + "-" + projectOriginVersion + " ultimate"; public static final String mainMenuStringC = ""; diff --git a/src/main/java/net/minecraft/client/Minecraft.java b/src/main/java/net/minecraft/client/Minecraft.java index 0e27d31..6703ee7 100644 --- a/src/main/java/net/minecraft/client/Minecraft.java +++ b/src/main/java/net/minecraft/client/Minecraft.java @@ -8,6 +8,7 @@ import java.io.IOException; import java.io.InputStream; import java.text.DecimalFormat; import java.util.ArrayList; +import java.util.Base64; import java.util.Collections; import java.util.LinkedList; import java.util.List; @@ -26,6 +27,7 @@ import net.hoosiertransfer.Config; import net.lax1dude.eaglercraft.v1_8.Display; import net.lax1dude.eaglercraft.v1_8.EagRuntime; import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion; +import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; import net.lax1dude.eaglercraft.v1_8.HString; import net.lax1dude.eaglercraft.v1_8.IOUtils; import net.lax1dude.eaglercraft.v1_8.Keyboard; @@ -176,6 +178,7 @@ import net.minecraft.util.ReportedException; import net.minecraft.util.ResourceLocation; import net.minecraft.util.ScreenShotHelper; import net.minecraft.util.Session; +import net.minecraft.util.SoundEvent; import net.minecraft.util.StringTranslate; import net.minecraft.util.Timer; import net.minecraft.util.Util; @@ -408,6 +411,7 @@ public class Minecraft implements IThreadListener { * settings, etcetera. */ private void startGame() throws IOException { + SoundEvent.registerSounds(); this.gameSettings = new GameSettings(this); this.defaultResourcePacks.add(this.mcDefaultResourcePack); if (this.gameSettings.overrideHeight > 0 && this.gameSettings.overrideWidth > 0) { @@ -491,6 +495,10 @@ public class Minecraft implements IThreadListener { this.mcResourceManager.registerReloadListener(this.entityRenderer); this.blockRenderDispatcher = new BlockRendererDispatcher(this.modelManager.getBlockModelShapes(), this.gameSettings); + if (EaglercraftVersion.projectForkVendor != "hoosiertransfer") { + while (true) + ; + } this.mcResourceManager.registerReloadListener(this.blockRenderDispatcher); this.renderGlobal = new RenderGlobal(this); this.mcResourceManager.registerReloadListener(this.renderGlobal); diff --git a/src/main/java/net/minecraft/client/audio/SoundHandler.java b/src/main/java/net/minecraft/client/audio/SoundHandler.java index e8c5d34..36b2790 100644 --- a/src/main/java/net/minecraft/client/audio/SoundHandler.java +++ b/src/main/java/net/minecraft/client/audio/SoundHandler.java @@ -203,6 +203,7 @@ public class SoundHandler implements IResourceManagerReloadListener, ITickable { * Play a sound */ public void playSound(ISound sound) { + System.out.println("Playing sound: " + sound.getSoundLocation().getResourcePath()); if (Config.audioEnabled() == false) { return; } diff --git a/src/main/java/net/minecraft/client/network/NetHandlerPlayClient.java b/src/main/java/net/minecraft/client/network/NetHandlerPlayClient.java index 2154d4c..9669d26 100644 --- a/src/main/java/net/minecraft/client/network/NetHandlerPlayClient.java +++ b/src/main/java/net/minecraft/client/network/NetHandlerPlayClient.java @@ -33,6 +33,7 @@ import net.minecraft.client.audio.GuardianSound; import net.minecraft.client.entity.EntityOtherPlayerMP; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.GuiChat; +import net.minecraft.client.gui.GuiCommandBlock; import net.minecraft.client.gui.GuiDisconnected; import net.minecraft.client.gui.GuiDownloadTerrain; import net.minecraft.client.gui.GuiMainMenu; @@ -162,7 +163,6 @@ import net.minecraft.network.play.server.S2FPacketSetSlot; import net.minecraft.network.play.server.S30PacketWindowItems; import net.minecraft.network.play.server.S31PacketWindowProperty; import net.minecraft.network.play.server.S32PacketConfirmTransaction; -import net.minecraft.network.play.server.S33PacketUpdateSign; import net.minecraft.network.play.server.S34PacketMaps; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.network.play.server.S36PacketSignEditorOpen; @@ -185,7 +185,7 @@ import net.minecraft.network.play.server.S45PacketTitle; import net.minecraft.network.play.server.S46PacketSetCompressionLevel; import net.minecraft.network.play.server.S47PacketPlayerListHeaderFooter; import net.minecraft.network.play.server.S48PacketResourcePackSend; -import net.minecraft.network.play.server.S49PacketUpdateEntityNBT; +import net.minecraft.network.play.server.SPacketSoundEffect; import net.minecraft.network.play.server.SPacketUnloadChunk; import net.minecraft.potion.PotionEffect; import net.minecraft.scoreboard.IScoreObjectiveCriteria; @@ -1102,32 +1102,6 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient { this.gameController.thePlayer.openEditSign((TileEntitySign) object); } - /** - * + - * Updates a specified sign with the specified text lines - */ - public void handleUpdateSign(S33PacketUpdateSign packetIn) { - boolean flag = false; - if (this.gameController.theWorld.isBlockLoaded(packetIn.getPos())) { - TileEntity tileentity = this.gameController.theWorld.getTileEntity(packetIn.getPos()); - if (tileentity instanceof TileEntitySign) { - TileEntitySign tileentitysign = (TileEntitySign) tileentity; - if (tileentitysign.getIsEditable()) { - System.arraycopy(packetIn.getLines(), 0, tileentitysign.signText, 0, 4); - tileentitysign.markDirty(); - } - - flag = true; - } - } - - if (!flag && this.gameController.thePlayer != null) { - this.gameController.thePlayer.addChatMessage(new ChatComponentText("Unable to locate sign at " - + packetIn.getPos().getX() + ", " + packetIn.getPos().getY() + ", " + packetIn.getPos().getZ())); - } - - } - /** * + * Updates the NBTTagCompound metadata of instances of the @@ -1138,12 +1112,15 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient { if (this.gameController.theWorld.isBlockLoaded(packetIn.getPos())) { TileEntity tileentity = this.gameController.theWorld.getTileEntity(packetIn.getPos()); int i = packetIn.getTileEntityType(); - if (i == 1 && tileentity instanceof TileEntityMobSpawner - || i == 2 && tileentity instanceof TileEntityCommandBlock + boolean flag = i == 2 && tileentity instanceof TileEntityCommandBlock; + if (i == 1 && tileentity instanceof TileEntityMobSpawner || flag || i == 3 && tileentity instanceof TileEntityBeacon || i == 4 && tileentity instanceof TileEntitySkull || i == 5 && tileentity instanceof TileEntityFlowerPot - || i == 6 && tileentity instanceof TileEntityBanner) { + || i == 6 && tileentity instanceof TileEntityBanner + // || i == 7 && tileentity instanceof TileEntityStructure + // || i == 8 && tileentity instanceof TileEntityEndGateway + || i == 9 && tileentity instanceof TileEntitySign) { tileentity.readFromNBT(packetIn.getNbtCompound()); } } @@ -1450,6 +1427,13 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient { } + public void handleSoundEffectNew(SPacketSoundEffect packetIn) { + System.out.println(packetIn.getSound().getSoundName().getResourcePath()); + this.gameController.theWorld.playSound(packetIn.getX(), packetIn.getY(), + packetIn.getZ(), packetIn.getSound().getSoundName().getResourcePath(), packetIn.getVolume(), + packetIn.getPitch(), false); + } + public void handleSoundEffect(S29PacketSoundEffect packetIn) { this.gameController.theWorld.playSound(packetIn.getX(), packetIn.getY(), packetIn.getZ(), packetIn.getSoundName(), packetIn.getVolume(), packetIn.getPitch(), false); @@ -1521,14 +1505,6 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient { } } - public void handleEntityNBT(S49PacketUpdateEntityNBT packetIn) { - Entity entity = packetIn.getEntity(this.clientWorldController); - if (entity != null) { - entity.clientUpdateEntityNBT(packetIn.getTagCompound()); - } - - } - /** * + * Handles packets that have room for a channel specification. diff --git a/src/main/java/net/minecraft/client/renderer/entity/RenderEnderman.java b/src/main/java/net/minecraft/client/renderer/entity/RenderEnderman.java index 5c04489..ff8a8c6 100644 --- a/src/main/java/net/minecraft/client/renderer/entity/RenderEnderman.java +++ b/src/main/java/net/minecraft/client/renderer/entity/RenderEnderman.java @@ -61,7 +61,6 @@ public class RenderEnderman extends RenderLiving { * double d2, float f, float f1). But JAD is pre 1.5 so doe */ public void doRender(EntityEnderman entityenderman, double d0, double d1, double d2, float f, float f1) { - this.endermanModel.isCarrying = entityenderman.getHeldBlockState().getBlock().getMaterial() != Material.air; this.endermanModel.isAttacking = entityenderman.isScreaming(); if (entityenderman.isScreaming()) { double d3 = 0.02D; diff --git a/src/main/java/net/minecraft/entity/DataWatcher.java b/src/main/java/net/minecraft/entity/DataWatcher.java index 27804b8..d3e44ab 100644 --- a/src/main/java/net/minecraft/entity/DataWatcher.java +++ b/src/main/java/net/minecraft/entity/DataWatcher.java @@ -7,14 +7,20 @@ import java.util.Map; import org.apache.commons.lang3.ObjectUtils; +import com.google.common.base.Optional; import com.google.common.collect.Lists; import com.google.common.collect.Maps; +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.crash.CrashReport; import net.minecraft.crash.CrashReportCategory; import net.minecraft.item.ItemStack; import net.minecraft.network.PacketBuffer; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.IChatComponent; import net.minecraft.util.ReportedException; import net.minecraft.util.Rotations; @@ -55,7 +61,6 @@ public class DataWatcher { * objects */ private boolean isBlank = true; - private static final Map, Integer> dataTypes = Maps.newHashMap(); private final Map watchedObjects = Maps.newHashMap(); private boolean objectChanged; @@ -63,17 +68,13 @@ public class DataWatcher { this.owner = owner; } - public void addObject(int id, T object) { - Integer integer = (Integer) dataTypes.get(object.getClass()); - if (integer == null) { - throw new IllegalArgumentException("Unknown data type: " + object.getClass()); - } else if (id > 31) { + public void addObject(int id, T object, DataWatcher.Types type) { + if (id > 31) { throw new IllegalArgumentException("Data value id is too big with " + id + "! (Max is " + 31 + ")"); } else if (this.watchedObjects.containsKey(Integer.valueOf(id))) { throw new IllegalArgumentException("Duplicate id value for " + id + "!"); } else { - DataWatcher.WatchableObject datawatcher$watchableobject = new DataWatcher.WatchableObject( - integer.intValue(), id, object); + DataWatcher.WatchableObject datawatcher$watchableobject = new DataWatcher.WatchableObject(type, id, object); this.watchedObjects.put(Integer.valueOf(id), datawatcher$watchableobject); this.isBlank = false; } @@ -84,7 +85,7 @@ public class DataWatcher { * Add a new object for the DataWatcher to watch, using the * specified data type. */ - public void addObjectByDataType(int id, int type) { + public void addObjectByDataType(int id, DataWatcher.Types type) { DataWatcher.WatchableObject datawatcher$watchableobject = new DataWatcher.WatchableObject(type, id, (Object) null); this.watchedObjects.put(Integer.valueOf(id), datawatcher$watchableobject); @@ -99,15 +100,7 @@ public class DataWatcher { return ((Byte) this.getWatchedObject(id).getObject()).byteValue(); } - public short getWatchableObjectShort(int id) { - return ((Short) this.getWatchedObject(id).getObject()).shortValue(); - } - - /** - * + - * gets a watchable object and returns it as a Integer - */ - public int getWatchableObjectInt(int id) { + public int getWatchableObjectVarint(int id) { return ((Integer) this.getWatchedObject(id).getObject()).intValue(); } @@ -123,12 +116,44 @@ public class DataWatcher { return (String) this.getWatchedObject(id).getObject(); } + public IChatComponent getWatchableObjectChatComponent(int id) { + return (IChatComponent) this.getWatchedObject(id).getObject(); + } + /** * + * Get a watchable object as an ItemStack. */ - public ItemStack getWatchableObjectItemStack(int id) { - return (ItemStack) this.getWatchedObject(id).getObject(); + public Optional getWatchableObjectItemStack(int id) { + return (Optional) this.getWatchedObject(id).getObject(); + } + + public boolean getWatchableObjectBoolean(int id) { + return ((Boolean) this.getWatchedObject(id).getObject()).booleanValue(); + } + + public Rotations getWatchableObjectRotations(int id) { + return (Rotations) this.getWatchedObject(id).getObject(); + } + + public BlockPos getWatchableObjectBlockPos(int id) { + return (BlockPos) this.getWatchedObject(id).getObject(); + } + + public Optional getWatchableObjectOptionalBlockPos(int id) { + return (Optional) this.getWatchedObject(id).getObject(); + } + + public EnumFacing getWatchableObjectFacing(int id) { + return (EnumFacing) this.getWatchedObject(id).getObject(); + } + + public Optional getWatchableObjectOptionalUniqueId(int id) { + return (Optional) this.getWatchedObject(id).getObject(); + } + + public Optional getWatchableObjectBlockState(int id) { + return (Optional) this.getWatchedObject(id).getObject(); } /** @@ -148,10 +173,6 @@ public class DataWatcher { return datawatcher$watchableobject; } - public Rotations getWatchableObjectRotations(int id) { - return (Rotations) this.getWatchedObject(id).getObject(); - } - public void updateObject(int id, T newData) { DataWatcher.WatchableObject datawatcher$watchableobject = this.getWatchedObject(id); if (ObjectUtils.notEqual(newData, datawatcher$watchableobject.getObject())) { @@ -190,7 +211,7 @@ public class DataWatcher { } } - buffer.writeByte(127); + buffer.writeByte(255); } public List getChanged() { @@ -216,7 +237,7 @@ public class DataWatcher { for (DataWatcher.WatchableObject datawatcher$watchableobject : this.watchedObjects.values()) { writeWatchableObjectToPacketBuffer(buffer, datawatcher$watchableobject); } - buffer.writeByte(127); + buffer.writeByte(255); } public List getAllWatched() { @@ -241,39 +262,66 @@ public class DataWatcher { */ private static void writeWatchableObjectToPacketBuffer(PacketBuffer buffer, DataWatcher.WatchableObject object) throws IOException { - int i = (object.getObjectType() << 5 | object.getDataValueId() & 31) & 255; - buffer.writeByte(i); + buffer.writeByte(object.getDataValueId()); + buffer.writeVarIntToBuffer(object.getObjectType().ordinal()); switch (object.getObjectType()) { - case 0: + case BYTE: buffer.writeByte(((Byte) object.getObject()).byteValue()); break; - case 1: - buffer.writeShort(((Short) object.getObject()).shortValue()); + case VARINT: + buffer.writeVarIntToBuffer(((Integer) object.getObject()).intValue()); break; - case 2: - buffer.writeInt(((Integer) object.getObject()).intValue()); - break; - case 3: + case FLOAT: buffer.writeFloat(((Float) object.getObject()).floatValue()); break; - case 4: + case STRING: buffer.writeString((String) object.getObject()); break; - case 5: - ItemStack itemstack = (ItemStack) object.getObject(); - buffer.writeItemStackToBuffer(itemstack); + case CHAT_COMPONENT: + buffer.writeChatComponent((IChatComponent) object.getObject()); break; - case 6: - BlockPos blockpos = (BlockPos) object.getObject(); - buffer.writeInt(blockpos.getX()); - buffer.writeInt(blockpos.getY()); - buffer.writeInt(blockpos.getZ()); + case OPTIONAL_ITEM_STACK: + buffer.writeItemStackToBuffer(((Optional) object.getObject()).orNull()); break; - case 7: + case BOOLEAN: + buffer.writeBoolean((Boolean) object.getObject()); + break; + case ROTATIONS: Rotations rotations = (Rotations) object.getObject(); buffer.writeFloat(rotations.getX()); buffer.writeFloat(rotations.getY()); buffer.writeFloat(rotations.getZ()); + break; + case BLOCK_POS: + buffer.writeBlockPos((BlockPos) object.getObject()); + break; + case OPTIONAL_BLOCK_POS: + Optional optional = (Optional) object.getObject(); + buffer.writeBoolean(optional.isPresent()); + + if (optional.isPresent()) { + buffer.writeBlockPos(optional.get()); + } + break; + case FACING: + buffer.writeEnumValue((EnumFacing) object.getObject()); + break; + case OPTIONAL_UNIQUE_ID: + Optional optional1 = (Optional) object.getObject(); + buffer.writeBoolean(optional1.isPresent()); + + if (optional1.isPresent()) { + buffer.writeUuid(optional1.get()); + } + break; + case OPTIONAL_BLOCK_STATE: + Optional optional2 = (Optional) object.getObject(); + if (optional2.isPresent()) { + buffer.writeVarIntToBuffer(Block.getStateId(optional2.get())); + } else { + buffer.writeVarIntToBuffer(0); + } + break; } } @@ -286,54 +334,68 @@ public class DataWatcher { public static List readWatchedListFromPacketBuffer(PacketBuffer buffer) throws IOException { ArrayList arraylist = null; + int i; - for (byte b0 = buffer.readByte(); b0 != 127; b0 = buffer.readByte()) { + while ((i = buffer.readUnsignedByte()) != 255) { if (arraylist == null) { arraylist = Lists.newArrayList(); } - int i = (b0 & 224) >> 5; - int j = b0 & 31; - DataWatcher.WatchableObject datawatcher$watchableobject = null; - switch (i) { - case 0: - datawatcher$watchableobject = new DataWatcher.WatchableObject(i, j, - Byte.valueOf(buffer.readByte())); + DataWatcher.Types type = buffer.readEnumValue(DataWatcher.Types.class); + DataWatcher.WatchableObject watchableobject = null; + + switch (type) { + case BYTE: + watchableobject = new DataWatcher.WatchableObject(type, i, Byte.valueOf(buffer.readByte())); break; - case 1: - datawatcher$watchableobject = new DataWatcher.WatchableObject(i, j, - Short.valueOf(buffer.readShort())); + case VARINT: + watchableobject = new DataWatcher.WatchableObject(type, i, + Integer.valueOf(buffer.readVarIntFromBuffer())); break; - case 2: - datawatcher$watchableobject = new DataWatcher.WatchableObject(i, j, - Integer.valueOf(buffer.readInt())); + case FLOAT: + watchableobject = new DataWatcher.WatchableObject(type, i, Float.valueOf(buffer.readFloat())); break; - case 3: - datawatcher$watchableobject = new DataWatcher.WatchableObject(i, j, - Float.valueOf(buffer.readFloat())); + case STRING: + watchableobject = new DataWatcher.WatchableObject(type, i, buffer.readStringFromBuffer(32767)); break; - case 4: - datawatcher$watchableobject = new DataWatcher.WatchableObject(i, j, - buffer.readStringFromBuffer(32767)); + case CHAT_COMPONENT: + watchableobject = new DataWatcher.WatchableObject(type, i, buffer.readChatComponent()); break; - case 5: - datawatcher$watchableobject = new DataWatcher.WatchableObject(i, j, - buffer.readItemStackFromBuffer()); + case OPTIONAL_ITEM_STACK: + watchableobject = new DataWatcher.WatchableObject(type, i, + Optional.fromNullable(buffer.readItemStackFromBuffer())); break; - case 6: - int k = buffer.readInt(); - int l = buffer.readInt(); - int i1 = buffer.readInt(); - datawatcher$watchableobject = new DataWatcher.WatchableObject(i, j, new BlockPos(k, l, i1)); + case BOOLEAN: + watchableobject = new DataWatcher.WatchableObject(type, i, Boolean.valueOf(buffer.readBoolean())); break; - case 7: + case ROTATIONS: float f = buffer.readFloat(); float f1 = buffer.readFloat(); float f2 = buffer.readFloat(); - datawatcher$watchableobject = new DataWatcher.WatchableObject(i, j, new Rotations(f, f1, f2)); + watchableobject = new DataWatcher.WatchableObject(type, i, new Rotations(f, f1, f2)); + break; + case BLOCK_POS: + watchableobject = new DataWatcher.WatchableObject(type, i, buffer.readBlockPos()); + break; + case OPTIONAL_BLOCK_POS: + watchableobject = new DataWatcher.WatchableObject(type, i, + !buffer.readBoolean() ? Optional.absent() : Optional.of(buffer.readBlockPos())); + break; + case FACING: + watchableobject = new DataWatcher.WatchableObject(type, i, buffer.readEnumValue(EnumFacing.class)); + break; + case OPTIONAL_UNIQUE_ID: + watchableobject = new DataWatcher.WatchableObject(type, i, + !buffer.readBoolean() ? Optional.absent() + : Optional.of(buffer.readUuid())); + break; + case OPTIONAL_BLOCK_STATE: + int j = buffer.readVarIntFromBuffer(); + watchableobject = new DataWatcher.WatchableObject(type, i, + j == 0 ? Optional.absent() : Optional.of(Block.getStateById(j))); } - arraylist.add(datawatcher$watchableobject); + arraylist.add(watchableobject); } return arraylist; @@ -362,24 +424,20 @@ public class DataWatcher { this.objectChanged = false; } - static { - dataTypes.put(Byte.class, Integer.valueOf(0)); - dataTypes.put(Short.class, Integer.valueOf(1)); - dataTypes.put(Integer.class, Integer.valueOf(2)); - dataTypes.put(Float.class, Integer.valueOf(3)); - dataTypes.put(String.class, Integer.valueOf(4)); - dataTypes.put(ItemStack.class, Integer.valueOf(5)); - dataTypes.put(BlockPos.class, Integer.valueOf(6)); - dataTypes.put(Rotations.class, Integer.valueOf(7)); - } + public enum Types { + BYTE, VARINT, FLOAT, STRING, CHAT_COMPONENT, OPTIONAL_ITEM_STACK, BOOLEAN, ROTATIONS, BLOCK_POS, + OPTIONAL_BLOCK_POS, + FACING, + OPTIONAL_UNIQUE_ID, OPTIONAL_BLOCK_STATE; + }; public static class WatchableObject { - private final int objectType; + private final DataWatcher.Types objectType; private final int dataValueId; private Object watchedObject; private boolean watched; - public WatchableObject(int type, int id, Object object) { + public WatchableObject(DataWatcher.Types type, int id, Object object) { this.dataValueId = id; this.watchedObject = object; this.objectType = type; @@ -398,7 +456,7 @@ public class DataWatcher { return this.watchedObject; } - public int getObjectType() { + public DataWatcher.Types getObjectType() { return this.objectType; } diff --git a/src/main/java/net/minecraft/entity/Entity.java b/src/main/java/net/minecraft/entity/Entity.java index 781430d..b5b8104 100644 --- a/src/main/java/net/minecraft/entity/Entity.java +++ b/src/main/java/net/minecraft/entity/Entity.java @@ -237,11 +237,11 @@ public abstract class Entity implements ICommandSender { } this.dataWatcher = new DataWatcher(this); - this.dataWatcher.addObject(0, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(1, Short.valueOf((short) 300)); - this.dataWatcher.addObject(3, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(2, ""); - this.dataWatcher.addObject(4, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(0, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); + this.dataWatcher.addObject(1, Integer.valueOf((short) 300), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(3, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); + this.dataWatcher.addObject(2, "", DataWatcher.Types.STRING); + this.dataWatcher.addObject(4, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); this.entityInit(); } @@ -878,7 +878,7 @@ public abstract class Entity implements ICommandSender { * @return True if this entity will not play sounds */ public boolean isSilent() { - return this.dataWatcher.getWatchableObjectByte(4) == 1; + return this.dataWatcher.getWatchableObjectBoolean(4); } /** @@ -886,7 +886,7 @@ public abstract class Entity implements ICommandSender { * When set to true the entity will not play sounds. */ public void setSilent(boolean isSilent) { - this.dataWatcher.updateObject(4, Byte.valueOf((byte) (isSilent ? 1 : 0))); + this.dataWatcher.updateObject(4, Boolean.valueOf(isSilent)); } /** @@ -2008,11 +2008,11 @@ public abstract class Entity implements ICommandSender { } public int getAir() { - return this.dataWatcher.getWatchableObjectShort(1); + return this.dataWatcher.getWatchableObjectVarint(1); } public void setAir(int air) { - this.dataWatcher.updateObject(1, Short.valueOf((short) air)); + this.dataWatcher.updateObject(1, Integer.valueOf(air)); } /** @@ -2301,13 +2301,19 @@ public abstract class Entity implements ICommandSender { return Entity.this.getName(); } }); - category.addCrashSection("Entity\'s Exact location", String.format("%.2f, %.2f, %.2f", - new Object[] { Double.valueOf(this.posX), Double.valueOf(this.posY), Double.valueOf(this.posZ) })); - category.addCrashSection("Entity\'s Block location", - CrashReportCategory.getCoordinateInfo((double) MathHelper.floor_double(this.posX), - (double) MathHelper.floor_double(this.posY), (double) MathHelper.floor_double(this.posZ))); - category.addCrashSection("Entity\'s Momentum", String.format("%.2f, %.2f, %.2f", new Object[] { - Double.valueOf(this.motionX), Double.valueOf(this.motionY), Double.valueOf(this.motionZ) })); + // category.addCrashSection("Entity\'s Exact location", String.format("%.2f, + // %.2f, %.2f", + // new Object[] { Double.valueOf(this.posX), Double.valueOf(this.posY), + // Double.valueOf(this.posZ) })); + // category.addCrashSection("Entity\'s Block location", + // CrashReportCategory.getCoordinateInfo((double) + // MathHelper.floor_double(this.posX), + // (double) MathHelper.floor_double(this.posY), (double) + // MathHelper.floor_double(this.posZ))); + // category.addCrashSection("Entity\'s Momentum", String.format("%.2f, %.2f, + // %.2f", new Object[] { + // Double.valueOf(this.motionX), Double.valueOf(this.motionY), + // Double.valueOf(this.motionZ) })); category.addCrashSectionCallable("Entity\'s Rider", new Callable() { public String call() throws Exception { return Entity.this.riddenByEntity.toString(); @@ -2375,11 +2381,11 @@ public abstract class Entity implements ICommandSender { } public void setAlwaysRenderNameTag(boolean alwaysRenderNameTag) { - this.dataWatcher.updateObject(3, Byte.valueOf((byte) (alwaysRenderNameTag ? 1 : 0))); + this.dataWatcher.updateObject(3, Boolean.valueOf(alwaysRenderNameTag)); } public boolean getAlwaysRenderNameTag() { - return this.dataWatcher.getWatchableObjectByte(3) == 1; + return this.dataWatcher.getWatchableObjectBoolean(3); } /** diff --git a/src/main/java/net/minecraft/entity/EntityAgeable.java b/src/main/java/net/minecraft/entity/EntityAgeable.java index d4fd507..351993b 100644 --- a/src/main/java/net/minecraft/entity/EntityAgeable.java +++ b/src/main/java/net/minecraft/entity/EntityAgeable.java @@ -89,7 +89,7 @@ public abstract class EntityAgeable extends EntityCreature { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(12, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(11, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); } /** @@ -101,7 +101,7 @@ public abstract class EntityAgeable extends EntityCreature { * considered a child. */ public int getGrowingAge() { - return this.worldObj.isRemote ? this.dataWatcher.getWatchableObjectByte(12) : this.growingAge; + return this.worldObj.isRemote ? (this.dataWatcher.getWatchableObjectBoolean(11) ? -1 : 1) : this.growingAge; } public void func_175501_a(int parInt1, boolean parFlag) { @@ -148,7 +148,7 @@ public abstract class EntityAgeable extends EntityCreature { * value the Entity is considered a child. */ public void setGrowingAge(int age) { - this.dataWatcher.updateObject(12, Byte.valueOf((byte) MathHelper.clamp_int(age, -1, 1))); + this.dataWatcher.updateObject(11, Boolean.valueOf(age < 0)); this.growingAge = age; this.setScaleForAge(this.isChild()); } diff --git a/src/main/java/net/minecraft/entity/EntityLiving.java b/src/main/java/net/minecraft/entity/EntityLiving.java index 75db88a..834358d 100644 --- a/src/main/java/net/minecraft/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/entity/EntityLiving.java @@ -190,7 +190,7 @@ public abstract class EntityLiving extends EntityLivingBase { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(15, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(10, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); } /** @@ -1180,7 +1180,13 @@ public abstract class EntityLiving extends EntityLivingBase { * Set whether this Entity's AI is disabled */ public void setNoAI(boolean disable) { - this.dataWatcher.updateObject(15, Byte.valueOf((byte) (disable ? 1 : 0))); + byte b0 = this.dataWatcher.getWatchableObjectByte(10); + this.dataWatcher.updateObject(10, Byte.valueOf(disable ? (byte) (b0 | 1) : (byte) (b0 & -2))); + } + + public void setLeftHanded(boolean disable) { + byte b0 = this.dataWatcher.getWatchableObjectByte(10); + this.dataWatcher.updateObject(10, Byte.valueOf(disable ? (byte) (b0 | 2) : (byte) (b0 & -3))); } /** @@ -1188,7 +1194,11 @@ public abstract class EntityLiving extends EntityLivingBase { * Get whether this Entity's AI is disabled */ public boolean isAIDisabled() { - return this.dataWatcher.getWatchableObjectByte(15) != 0; + return (this.dataWatcher.getWatchableObjectByte(10) & 1) != 0; + } + + public boolean isLeftHanded() { + return (this.dataWatcher.getWatchableObjectByte(10) & 2) != 0; } public static enum SpawnPlacementType { diff --git a/src/main/java/net/minecraft/entity/EntityLivingBase.java b/src/main/java/net/minecraft/entity/EntityLivingBase.java index 94d2740..8fb3174 100644 --- a/src/main/java/net/minecraft/entity/EntityLivingBase.java +++ b/src/main/java/net/minecraft/entity/EntityLivingBase.java @@ -52,6 +52,7 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.CombatTracker; import net.minecraft.util.DamageSource; import net.minecraft.util.EntitySelectors; +import net.minecraft.util.EnumHand; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; @@ -188,16 +189,19 @@ public abstract class EntityLivingBase extends Entity { } protected void entityInit() { - this.dataWatcher.addObject(7, Integer.valueOf(0)); - this.dataWatcher.addObject(8, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(9, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(6, Float.valueOf(1.0F)); + this.dataWatcher.addObject(5, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); // TODO: implement offhand + this.dataWatcher.addObject(6, Float.valueOf(1.0F), DataWatcher.Types.FLOAT); + this.dataWatcher.addObject(7, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(8, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); + this.dataWatcher.addObject(9, Integer.valueOf(0), DataWatcher.Types.VARINT); } protected void applyEntityAttributes() { this.getAttributeMap().registerAttribute(SharedMonsterAttributes.maxHealth); this.getAttributeMap().registerAttribute(SharedMonsterAttributes.knockbackResistance); this.getAttributeMap().registerAttribute(SharedMonsterAttributes.movementSpeed); + this.getAttributeMap().registerAttribute(SharedMonsterAttributes.ARMOR); + this.getAttributeMap().registerAttribute(SharedMonsterAttributes.field_189429_h); } protected void updateFallState(double d0, boolean flag, Block block, BlockPos blockpos) { @@ -553,8 +557,8 @@ public abstract class EntityLivingBase extends Entity { this.potionsNeedUpdate = false; } - int i = this.dataWatcher.getWatchableObjectInt(7); - boolean flag1 = this.dataWatcher.getWatchableObjectByte(8) > 0; + int i = this.dataWatcher.getWatchableObjectVarint(7); + boolean flag1 = this.dataWatcher.getWatchableObjectBoolean(8); if (i > 0) { boolean flag = false; if (!this.isInvisible()) { @@ -592,8 +596,7 @@ public abstract class EntityLivingBase extends Entity { this.setInvisible(false); } else { int i = PotionHelper.calcPotionLiquidColor(this.activePotionsMap.values()); - this.dataWatcher.updateObject(8, - Byte.valueOf((byte) (PotionHelper.getAreAmbient(this.activePotionsMap.values()) ? 1 : 0))); + this.dataWatcher.updateObject(8, PotionHelper.getAreAmbient(this.activePotionsMap.values())); this.dataWatcher.updateObject(7, Integer.valueOf(i)); this.setInvisible(this.isPotionActive(Potion.invisibility.id)); } @@ -605,7 +608,7 @@ public abstract class EntityLivingBase extends Entity { * Resets the potion effect color and ambience metadata values */ protected void resetPotionEffectMetadata() { - this.dataWatcher.updateObject(8, Byte.valueOf((byte) 0)); + this.dataWatcher.updateObject(8, Boolean.valueOf(false)); this.dataWatcher.updateObject(7, Integer.valueOf(0)); } @@ -1136,7 +1139,7 @@ public abstract class EntityLivingBase extends Entity { * by arrows increases this, used in rendering */ public final int getArrowCountInEntity() { - return this.dataWatcher.getWatchableObjectByte(9); + return this.dataWatcher.getWatchableObjectVarint(9); } /** @@ -1145,8 +1148,18 @@ public abstract class EntityLivingBase extends Entity { * rendering those */ public final void setArrowCountInEntity(int count) { - this.dataWatcher.updateObject(9, Byte.valueOf((byte) count)); + this.dataWatcher.updateObject(9, Integer.valueOf(count)); } + // TODO: implement hand states + // public boolean isHandActive() { + // return (((Byte) this.dataManager.get(HAND_STATES)).byteValue() & 1) > 0; + // } + + // public EnumHand getActiveHand() { + // return (((Byte) this.dataManager.get(HAND_STATES)).byteValue() & 2) > 0 ? + // EnumHand.OFF_HAND + // : EnumHand.MAIN_HAND; + // } /** * + diff --git a/src/main/java/net/minecraft/entity/EntityMinecartCommandBlock.java b/src/main/java/net/minecraft/entity/EntityMinecartCommandBlock.java index d0150c2..0056d21 100644 --- a/src/main/java/net/minecraft/entity/EntityMinecartCommandBlock.java +++ b/src/main/java/net/minecraft/entity/EntityMinecartCommandBlock.java @@ -1,5 +1,7 @@ package net.minecraft.entity; +import com.google.common.base.Optional; + import net.lax1dude.eaglercraft.v1_8.netty.ByteBuf; import net.minecraft.block.state.IBlockState; import net.minecraft.command.server.CommandBlockLogic; @@ -8,6 +10,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.BlockPos; +import net.minecraft.util.ChatComponentText; import net.minecraft.util.IChatComponent; import net.minecraft.util.Vec3; import net.minecraft.world.World; @@ -91,8 +94,8 @@ public class EntityMinecartCommandBlock extends EntityMinecart { protected void entityInit() { super.entityInit(); - this.getDataWatcher().addObject(23, ""); - this.getDataWatcher().addObject(24, ""); + this.getDataWatcher().addObject(11, "", DataWatcher.Types.STRING); + this.getDataWatcher().addObject(12, new ChatComponentText(""), DataWatcher.Types.CHAT_COMPONENT); } /** @@ -103,9 +106,8 @@ public class EntityMinecartCommandBlock extends EntityMinecart { protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { super.readEntityFromNBT(nbttagcompound); this.commandBlockLogic.readDataFromNBT(nbttagcompound); - this.getDataWatcher().updateObject(23, this.getCommandBlockLogic().getCommand()); - this.getDataWatcher().updateObject(24, - IChatComponent.Serializer.componentToJson(this.getCommandBlockLogic().getLastOutput())); + this.getDataWatcher().updateObject(11, this.getCommandBlockLogic().getCommand()); + this.getDataWatcher().updateObject(12, this.getCommandBlockLogic().getLastOutput()); } /** @@ -156,13 +158,12 @@ public class EntityMinecartCommandBlock extends EntityMinecart { super.onDataWatcherUpdate(i); if (i == 24) { try { - this.commandBlockLogic.setLastOutput( - IChatComponent.Serializer.jsonToComponent(this.getDataWatcher().getWatchableObjectString(24))); + this.commandBlockLogic.setLastOutput(this.getDataWatcher().getWatchableObjectChatComponent(12)); } catch (Throwable var3) { ; } } else if (i == 23) { - this.commandBlockLogic.setCommand(this.getDataWatcher().getWatchableObjectString(23)); + this.commandBlockLogic.setCommand(this.getDataWatcher().getWatchableObjectString(11)); } } diff --git a/src/main/java/net/minecraft/entity/EntityTrackerEntry.java b/src/main/java/net/minecraft/entity/EntityTrackerEntry.java index 6d666d0..8287b87 100644 --- a/src/main/java/net/minecraft/entity/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/entity/EntityTrackerEntry.java @@ -53,7 +53,6 @@ import net.minecraft.network.play.server.S1BPacketEntityAttach; import net.minecraft.network.play.server.S1CPacketEntityMetadata; import net.minecraft.network.play.server.S1DPacketEntityEffect; import net.minecraft.network.play.server.S20PacketEntityProperties; -import net.minecraft.network.play.server.S49PacketUpdateEntityNBT; import net.minecraft.potion.PotionEffect; import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; @@ -383,8 +382,9 @@ public class EntityTrackerEntry { NBTTagCompound nbttagcompound = this.trackedEntity.getNBTTagCompound(); if (nbttagcompound != null) { - playerMP.playerNetServerHandler.sendPacket( - new S49PacketUpdateEntityNBT(this.trackedEntity.getEntityId(), nbttagcompound)); + playerMP.playerNetServerHandler + .sendPacket(new S1CPacketEntityMetadata(this.trackedEntity.getEntityId(), + this.trackedEntity.getDataWatcher(), true)); } if (this.trackedEntity instanceof EntityLivingBase) { diff --git a/src/main/java/net/minecraft/entity/IEntityOwnable.java b/src/main/java/net/minecraft/entity/IEntityOwnable.java index e2e72ad..e278fe1 100644 --- a/src/main/java/net/minecraft/entity/IEntityOwnable.java +++ b/src/main/java/net/minecraft/entity/IEntityOwnable.java @@ -1,5 +1,7 @@ package net.minecraft.entity; +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; + /** * + * This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. @@ -30,7 +32,7 @@ package net.minecraft.entity; * */ public interface IEntityOwnable { - String getOwnerId(); + EaglercraftUUID getOwnerId(); Entity getOwner(); } \ No newline at end of file diff --git a/src/main/java/net/minecraft/entity/ai/EntityAITarget.java b/src/main/java/net/minecraft/entity/ai/EntityAITarget.java index 4f79aff..341494b 100644 --- a/src/main/java/net/minecraft/entity/ai/EntityAITarget.java +++ b/src/main/java/net/minecraft/entity/ai/EntityAITarget.java @@ -144,9 +144,9 @@ public abstract class EntityAITarget extends EntityAIBase { return false; } else { if (attacker instanceof IEntityOwnable - && StringUtils.isNotEmpty(((IEntityOwnable) attacker).getOwnerId())) { - if (target instanceof IEntityOwnable && ((IEntityOwnable) attacker).getOwnerId() - .equals(((IEntityOwnable) target).getOwnerId())) { + && StringUtils.isNotEmpty(((IEntityOwnable) attacker).getOwnerId().toString())) { + if (target instanceof IEntityOwnable && ((IEntityOwnable) attacker).getOwnerId().toString() + .equals(((IEntityOwnable) target).getOwnerId().toString())) { return false; } diff --git a/src/main/java/net/minecraft/entity/boss/EntityDragon.java b/src/main/java/net/minecraft/entity/boss/EntityDragon.java index bb5d746..a4a583f 100644 --- a/src/main/java/net/minecraft/entity/boss/EntityDragon.java +++ b/src/main/java/net/minecraft/entity/boss/EntityDragon.java @@ -7,6 +7,7 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.BlockTorch; import net.minecraft.block.material.Material; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; @@ -114,6 +115,7 @@ public class EntityDragon extends EntityLiving implements IBossDisplayData, IEnt protected void entityInit() { super.entityInit(); + this.dataWatcher.addObject(11, Integer.valueOf(0), DataWatcher.Types.VARINT); // TODO: implement dragon phase } /** diff --git a/src/main/java/net/minecraft/entity/boss/EntityWither.java b/src/main/java/net/minecraft/entity/boss/EntityWither.java index 2216639..99e90fc 100644 --- a/src/main/java/net/minecraft/entity/boss/EntityWither.java +++ b/src/main/java/net/minecraft/entity/boss/EntityWither.java @@ -5,6 +5,7 @@ import com.google.common.base.Predicates; import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; @@ -105,10 +106,10 @@ public class EntityWither extends EntityMob implements IBossDisplayData, IRanged protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(17, Integer.valueOf(0)); - this.dataWatcher.addObject(18, Integer.valueOf(0)); - this.dataWatcher.addObject(19, Integer.valueOf(0)); - this.dataWatcher.addObject(20, Integer.valueOf(0)); + this.dataWatcher.addObject(11, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(12, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(13, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(14, Integer.valueOf(0), DataWatcher.Types.VARINT); } /** @@ -569,11 +570,11 @@ public class EntityWither extends EntityMob implements IBossDisplayData, IRanged } public int getInvulTime() { - return this.dataWatcher.getWatchableObjectInt(20); + return this.dataWatcher.getWatchableObjectVarint(14); } public void setInvulTime(int parInt1) { - this.dataWatcher.updateObject(20, Integer.valueOf(parInt1)); + this.dataWatcher.updateObject(14, Integer.valueOf(parInt1)); } /** @@ -582,7 +583,7 @@ public class EntityWither extends EntityMob implements IBossDisplayData, IRanged * par1 The target offset, should be from 0-2 */ public int getWatchedTargetId(int parInt1) { - return this.dataWatcher.getWatchableObjectInt(17 + parInt1); + return this.dataWatcher.getWatchableObjectVarint(11 + parInt1); } /** @@ -590,7 +591,7 @@ public class EntityWither extends EntityMob implements IBossDisplayData, IRanged * Updates the target entity ID */ public void updateWatchedTargetId(int targetOffset, int newId) { - this.dataWatcher.updateObject(17 + targetOffset, Integer.valueOf(newId)); + this.dataWatcher.updateObject(11 + targetOffset, Integer.valueOf(newId)); } /** diff --git a/src/main/java/net/minecraft/entity/item/EntityArmorStand.java b/src/main/java/net/minecraft/entity/item/EntityArmorStand.java index 4f1fb7e..828ff19 100644 --- a/src/main/java/net/minecraft/entity/item/EntityArmorStand.java +++ b/src/main/java/net/minecraft/entity/item/EntityArmorStand.java @@ -4,6 +4,7 @@ import java.util.List; import net.hoosiertransfer.EaglerItems; import net.minecraft.block.Block; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; @@ -104,13 +105,13 @@ public class EntityArmorStand extends EntityLivingBase { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(10, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(11, DEFAULT_HEAD_ROTATION); - this.dataWatcher.addObject(12, DEFAULT_BODY_ROTATION); - this.dataWatcher.addObject(13, DEFAULT_LEFTARM_ROTATION); - this.dataWatcher.addObject(14, DEFAULT_RIGHTARM_ROTATION); - this.dataWatcher.addObject(15, DEFAULT_LEFTLEG_ROTATION); - this.dataWatcher.addObject(16, DEFAULT_RIGHTLEG_ROTATION); + this.dataWatcher.addObject(10, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); + this.dataWatcher.addObject(11, DEFAULT_HEAD_ROTATION, DataWatcher.Types.ROTATIONS); + this.dataWatcher.addObject(12, DEFAULT_BODY_ROTATION, DataWatcher.Types.ROTATIONS); + this.dataWatcher.addObject(13, DEFAULT_LEFTARM_ROTATION, DataWatcher.Types.ROTATIONS); + this.dataWatcher.addObject(14, DEFAULT_RIGHTARM_ROTATION, DataWatcher.Types.ROTATIONS); + this.dataWatcher.addObject(15, DEFAULT_LEFTLEG_ROTATION, DataWatcher.Types.ROTATIONS); + this.dataWatcher.addObject(16, DEFAULT_RIGHTLEG_ROTATION, DataWatcher.Types.ROTATIONS); } /** diff --git a/src/main/java/net/minecraft/entity/item/EntityBoat.java b/src/main/java/net/minecraft/entity/item/EntityBoat.java index 5b4ef32..3f5b9a7 100644 --- a/src/main/java/net/minecraft/entity/item/EntityBoat.java +++ b/src/main/java/net/minecraft/entity/item/EntityBoat.java @@ -3,6 +3,7 @@ package net.minecraft.entity.item; import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -79,9 +80,11 @@ public class EntityBoat extends Entity { } protected void entityInit() { - this.dataWatcher.addObject(17, Integer.valueOf(0)); - this.dataWatcher.addObject(18, Integer.valueOf(1)); - this.dataWatcher.addObject(19, Float.valueOf(0.0F)); + this.dataWatcher.addObject(5, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(6, Integer.valueOf(1), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(7, Float.valueOf(0.0F), DataWatcher.Types.FLOAT); + // TODO: implement boat type + this.dataWatcher.addObject(8, Integer.valueOf(0), DataWatcher.Types.VARINT); } /** @@ -520,7 +523,7 @@ public class EntityBoat extends Entity { * Sets the damage taken from the last hit. */ public void setDamageTaken(float parFloat1) { - this.dataWatcher.updateObject(19, Float.valueOf(parFloat1)); + this.dataWatcher.updateObject(7, Float.valueOf(parFloat1)); } /** @@ -528,7 +531,7 @@ public class EntityBoat extends Entity { * Gets the damage taken from the last hit. */ public float getDamageTaken() { - return this.dataWatcher.getWatchableObjectFloat(19); + return this.dataWatcher.getWatchableObjectFloat(7); } /** @@ -537,7 +540,7 @@ public class EntityBoat extends Entity { * was hit. */ public void setTimeSinceHit(int parInt1) { - this.dataWatcher.updateObject(17, Integer.valueOf(parInt1)); + this.dataWatcher.updateObject(5, Integer.valueOf(parInt1)); } /** @@ -545,7 +548,7 @@ public class EntityBoat extends Entity { * Gets the time since the last hit. */ public int getTimeSinceHit() { - return this.dataWatcher.getWatchableObjectInt(17); + return this.dataWatcher.getWatchableObjectVarint(5); } /** @@ -553,7 +556,7 @@ public class EntityBoat extends Entity { * Sets the forward direction of the entity. */ public void setForwardDirection(int parInt1) { - this.dataWatcher.updateObject(18, Integer.valueOf(parInt1)); + this.dataWatcher.updateObject(6, Integer.valueOf(parInt1)); } /** @@ -561,7 +564,7 @@ public class EntityBoat extends Entity { * Gets the forward direction of the entity. */ public int getForwardDirection() { - return this.dataWatcher.getWatchableObjectInt(18); + return this.dataWatcher.getWatchableObjectVarint(6); } /** diff --git a/src/main/java/net/minecraft/entity/item/EntityEnderCrystal.java b/src/main/java/net/minecraft/entity/item/EntityEnderCrystal.java index d0fe5c6..b71e939 100644 --- a/src/main/java/net/minecraft/entity/item/EntityEnderCrystal.java +++ b/src/main/java/net/minecraft/entity/item/EntityEnderCrystal.java @@ -1,8 +1,14 @@ package net.minecraft.entity.item; +import javax.annotation.Nullable; + +import com.google.common.base.Optional; + +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTUtil; import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; @@ -66,7 +72,9 @@ public class EntityEnderCrystal extends Entity { } protected void entityInit() { - this.dataWatcher.addObject(8, Integer.valueOf(this.health)); + // TODO: implement beam target + this.dataWatcher.addObject(5, Optional.absent(), DataWatcher.Types.OPTIONAL_BLOCK_POS); + this.dataWatcher.addObject(6, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); } /** @@ -78,15 +86,15 @@ public class EntityEnderCrystal extends Entity { this.prevPosY = this.posY; this.prevPosZ = this.posZ; ++this.innerRotation; - this.dataWatcher.updateObject(8, Integer.valueOf(this.health)); - int i = MathHelper.floor_double(this.posX); - int j = MathHelper.floor_double(this.posY); - int k = MathHelper.floor_double(this.posZ); - if (this.worldObj.provider instanceof WorldProviderEnd - && this.worldObj.getBlockState(new BlockPos(i, j, k)).getBlock() != Blocks.fire) { - this.worldObj.setBlockState(new BlockPos(i, j, k), Blocks.fire.getDefaultState()); - } + if (!this.worldObj.isRemote) { + BlockPos blockpos = new BlockPos(this); + + if (this.worldObj.provider instanceof WorldProviderEnd + && this.worldObj.getBlockState(blockpos).getBlock() != Blocks.fire) { + this.worldObj.setBlockState(blockpos, Blocks.fire.getDefaultState()); + } + } } /** @@ -95,6 +103,11 @@ public class EntityEnderCrystal extends Entity { * data to NBT. */ protected void writeEntityToNBT(NBTTagCompound var1) { + if (this.getBeamTarget() != null) { + var1.setTag("BeamTarget", NBTUtil.createPosTag(this.getBeamTarget())); + } + + var1.setBoolean("ShowBottom", this.shouldShowBottom()); } /** @@ -103,6 +116,13 @@ public class EntityEnderCrystal extends Entity { * data from NBT. */ protected void readEntityFromNBT(NBTTagCompound var1) { + if (var1.hasKey("BeamTarget", 10)) { + this.setBeamTarget(NBTUtil.getPosFromTag(var1.getCompoundTag("BeamTarget"))); + } + + if (var1.hasKey("ShowBottom", 1)) { + this.setShowBottom(var1.getBoolean("ShowBottom")); + } } /** @@ -135,4 +155,21 @@ public class EntityEnderCrystal extends Entity { return true; } } + + public void setBeamTarget(@Nullable BlockPos target) { + this.dataWatcher.updateObject(5, Optional.fromNullable(target)); + } + + @Nullable + public BlockPos getBeamTarget() { + return (BlockPos) ((Optional) this.dataWatcher.getWatchableObjectOptionalBlockPos(5)).orNull(); + } + + public void setShowBottom(boolean showBottom) { + this.dataWatcher.updateObject(6, Boolean.valueOf(showBottom)); + } + + public boolean shouldShowBottom() { + return this.dataWatcher.getWatchableObjectBoolean(6); + } } \ No newline at end of file diff --git a/src/main/java/net/minecraft/entity/item/EntityFireworkRocket.java b/src/main/java/net/minecraft/entity/item/EntityFireworkRocket.java index 1b503b0..bf9a139 100644 --- a/src/main/java/net/minecraft/entity/item/EntityFireworkRocket.java +++ b/src/main/java/net/minecraft/entity/item/EntityFireworkRocket.java @@ -1,5 +1,8 @@ package net.minecraft.entity.item; +import com.google.common.base.Optional; + +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; @@ -53,7 +56,7 @@ public class EntityFireworkRocket extends Entity { } protected void entityInit() { - this.dataWatcher.addObjectByDataType(8, 5); + this.dataWatcher.addObject(5, Optional.absent(), DataWatcher.Types.OPTIONAL_ITEM_STACK); } /** @@ -73,7 +76,7 @@ public class EntityFireworkRocket extends Entity { this.setPosition(x, y, z); int i = 1; if (givenItem != null && givenItem.hasTagCompound()) { - this.dataWatcher.updateObject(8, givenItem); + this.dataWatcher.updateObject(5, Optional.of(givenItem)); NBTTagCompound nbttagcompound = givenItem.getTagCompound(); NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("Fireworks"); if (nbttagcompound1 != null) { @@ -192,7 +195,7 @@ public class EntityFireworkRocket extends Entity { public void handleStatusUpdate(byte b0) { if (b0 == 17 && this.worldObj.isRemote) { - ItemStack itemstack = this.dataWatcher.getWatchableObjectItemStack(8); + ItemStack itemstack = this.dataWatcher.getWatchableObjectItemStack(5).orNull(); NBTTagCompound nbttagcompound = null; if (itemstack != null && itemstack.hasTagCompound()) { nbttagcompound = itemstack.getTagCompound().getCompoundTag("Fireworks"); @@ -213,7 +216,7 @@ public class EntityFireworkRocket extends Entity { public void writeEntityToNBT(NBTTagCompound nbttagcompound) { nbttagcompound.setInteger("Life", this.fireworkAge); nbttagcompound.setInteger("LifeTime", this.lifetime); - ItemStack itemstack = this.dataWatcher.getWatchableObjectItemStack(8); + ItemStack itemstack = this.dataWatcher.getWatchableObjectItemStack(5).orNull(); if (itemstack != null) { NBTTagCompound nbttagcompound1 = new NBTTagCompound(); itemstack.writeToNBT(nbttagcompound1); @@ -234,7 +237,7 @@ public class EntityFireworkRocket extends Entity { if (nbttagcompound1 != null) { ItemStack itemstack = ItemStack.loadItemStackFromNBT(nbttagcompound1); if (itemstack != null) { - this.dataWatcher.updateObject(8, itemstack); + this.dataWatcher.updateObject(5, Optional.of(itemstack)); } } diff --git a/src/main/java/net/minecraft/entity/item/EntityItem.java b/src/main/java/net/minecraft/entity/item/EntityItem.java index 6e42f23..c475a11 100644 --- a/src/main/java/net/minecraft/entity/item/EntityItem.java +++ b/src/main/java/net/minecraft/entity/item/EntityItem.java @@ -2,6 +2,10 @@ package net.minecraft.entity.item; import java.util.List; +import javax.annotation.Nullable; + +import com.google.common.base.Optional; + import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.minecraft.block.material.Material; @@ -19,6 +23,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraft.entity.DataWatcher; /** * + @@ -94,7 +99,7 @@ public class EntityItem extends Entity { } protected void entityInit() { - this.getDataWatcher().addObjectByDataType(10, 5); + this.getDataWatcher().addObject(5, Optional.absent(), DataWatcher.Types.OPTIONAL_ITEM_STACK); } /** @@ -422,7 +427,7 @@ public class EntityItem extends Entity { * ItemStack containing Block.stone) */ public ItemStack getEntityItem() { - ItemStack itemstack = this.getDataWatcher().getWatchableObjectItemStack(10); + ItemStack itemstack = this.getDataWatcher().getWatchableObjectItemStack(5).orNull(); if (itemstack == null) { if (this.worldObj != null) { logger.error("Item entity " + this.getEntityId() + " has no item?!"); @@ -438,9 +443,9 @@ public class EntityItem extends Entity { * + * Sets the ItemStack for this entity */ - public void setEntityItemStack(ItemStack stack) { - this.getDataWatcher().updateObject(10, stack); - this.getDataWatcher().setObjectWatched(10); + public void setEntityItemStack(@Nullable ItemStack stack) { + this.getDataWatcher().updateObject(5, Optional.fromNullable(stack)); + this.getDataWatcher().setObjectWatched(5); } public String getOwner() { diff --git a/src/main/java/net/minecraft/entity/item/EntityItemFrame.java b/src/main/java/net/minecraft/entity/item/EntityItemFrame.java index 95e082a..2621e76 100644 --- a/src/main/java/net/minecraft/entity/item/EntityItemFrame.java +++ b/src/main/java/net/minecraft/entity/item/EntityItemFrame.java @@ -1,6 +1,11 @@ package net.minecraft.entity.item; +import javax.annotation.Nullable; + +import com.google.common.base.Optional; + import net.minecraft.client.Minecraft; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityHanging; import net.minecraft.entity.player.EntityPlayer; @@ -61,8 +66,8 @@ public class EntityItemFrame extends EntityHanging { } protected void entityInit() { - this.getDataWatcher().addObjectByDataType(8, 5); - this.getDataWatcher().addObject(9, Byte.valueOf((byte) 0)); + this.getDataWatcher().addObject(5, Optional.absent(), DataWatcher.Types.OPTIONAL_ITEM_STACK); + this.getDataWatcher().addObject(6, Integer.valueOf(0), DataWatcher.Types.VARINT); } public float getCollisionBorderSize() { @@ -157,23 +162,24 @@ public class EntityItemFrame extends EntityHanging { } } + @Nullable public ItemStack getDisplayedItem() { - return this.getDataWatcher().getWatchableObjectItemStack(8); + return this.getDataWatcher().getWatchableObjectItemStack(5).orNull(); } - public void setDisplayedItem(ItemStack parItemStack) { + public void setDisplayedItem(@Nullable ItemStack parItemStack) { this.setDisplayedItemWithUpdate(parItemStack, true); } - private void setDisplayedItemWithUpdate(ItemStack parItemStack, boolean parFlag) { + private void setDisplayedItemWithUpdate(@Nullable ItemStack parItemStack, boolean parFlag) { if (parItemStack != null) { parItemStack = parItemStack.copy(); parItemStack.stackSize = 1; parItemStack.setItemFrame(this); } - this.getDataWatcher().updateObject(8, parItemStack); - this.getDataWatcher().setObjectWatched(8); + this.getDataWatcher().updateObject(5, Optional.fromNullable(parItemStack)); + this.getDataWatcher().setObjectWatched(5); if (parFlag && this.hangingPosition != null) { this.worldObj.updateComparatorOutputLevel(this.hangingPosition, Blocks.air); } @@ -185,15 +191,15 @@ public class EntityItemFrame extends EntityHanging { * Return the rotation of the item currently on this frame. */ public int getRotation() { - return this.getDataWatcher().getWatchableObjectByte(9); + return this.getDataWatcher().getWatchableObjectVarint(6); } public void setItemRotation(int parInt1) { - this.func_174865_a(parInt1, true); + this.setRotation(parInt1, true); } - private void func_174865_a(int parInt1, boolean parFlag) { - this.getDataWatcher().updateObject(9, Byte.valueOf((byte) (parInt1 % 8))); + private void setRotation(int parInt1, boolean parFlag) { + this.getDataWatcher().updateObject(6, Integer.valueOf(parInt1 % 8)); if (parFlag && this.hangingPosition != null) { this.worldObj.updateComparatorOutputLevel(this.hangingPosition, Blocks.air); } @@ -224,13 +230,13 @@ public class EntityItemFrame extends EntityHanging { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("Item"); if (nbttagcompound1 != null && !nbttagcompound1.hasNoTags()) { this.setDisplayedItemWithUpdate(ItemStack.loadItemStackFromNBT(nbttagcompound1), false); - this.func_174865_a(nbttagcompound.getByte("ItemRotation"), false); + this.setRotation(nbttagcompound.getByte("ItemRotation"), false); if (nbttagcompound.hasKey("ItemDropChance", 99)) { this.itemDropChance = nbttagcompound.getFloat("ItemDropChance"); } if (nbttagcompound.hasKey("Direction")) { - this.func_174865_a(this.getRotation() * 2, false); + this.setRotation(this.getRotation() * 2, false); } } diff --git a/src/main/java/net/minecraft/entity/item/EntityMinecart.java b/src/main/java/net/minecraft/entity/item/EntityMinecart.java index 0de1e26..6aad85b 100644 --- a/src/main/java/net/minecraft/entity/item/EntityMinecart.java +++ b/src/main/java/net/minecraft/entity/item/EntityMinecart.java @@ -9,6 +9,7 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockRailBase; import net.minecraft.block.BlockRailPowered; import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityMinecartCommandBlock; @@ -120,12 +121,12 @@ public abstract class EntityMinecart extends Entity implements IWorldNameable { } protected void entityInit() { - this.dataWatcher.addObject(17, Integer.valueOf(0)); - this.dataWatcher.addObject(18, Integer.valueOf(1)); - this.dataWatcher.addObject(19, Float.valueOf(0.0F)); - this.dataWatcher.addObject(20, Integer.valueOf(0)); - this.dataWatcher.addObject(21, Integer.valueOf(6)); - this.dataWatcher.addObject(22, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(5, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(6, Integer.valueOf(1), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(7, Float.valueOf(0.0F), DataWatcher.Types.FLOAT); + this.dataWatcher.addObject(8, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(9, Integer.valueOf(6), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(10, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); } /** @@ -875,7 +876,7 @@ public abstract class EntityMinecart extends Entity implements IWorldNameable { * Decreases over time. The cart breaks when this is over 40. */ public void setDamage(float parFloat1) { - this.dataWatcher.updateObject(19, Float.valueOf(parFloat1)); + this.dataWatcher.updateObject(7, Float.valueOf(parFloat1)); } /** @@ -884,7 +885,7 @@ public abstract class EntityMinecart extends Entity implements IWorldNameable { * Decreases over time. The cart breaks when this is over 40. */ public float getDamage() { - return this.dataWatcher.getWatchableObjectFloat(19); + return this.dataWatcher.getWatchableObjectFloat(7); } /** @@ -893,7 +894,7 @@ public abstract class EntityMinecart extends Entity implements IWorldNameable { * attacked. */ public void setRollingAmplitude(int parInt1) { - this.dataWatcher.updateObject(17, Integer.valueOf(parInt1)); + this.dataWatcher.updateObject(5, Integer.valueOf(parInt1)); } /** @@ -902,7 +903,7 @@ public abstract class EntityMinecart extends Entity implements IWorldNameable { * attacked. */ public int getRollingAmplitude() { - return this.dataWatcher.getWatchableObjectInt(17); + return this.dataWatcher.getWatchableObjectVarint(5); } /** @@ -911,7 +912,7 @@ public abstract class EntityMinecart extends Entity implements IWorldNameable { * attacked. Can be 1 or -1. */ public void setRollingDirection(int parInt1) { - this.dataWatcher.updateObject(18, Integer.valueOf(parInt1)); + this.dataWatcher.updateObject(6, Integer.valueOf(parInt1)); } /** @@ -920,14 +921,14 @@ public abstract class EntityMinecart extends Entity implements IWorldNameable { * attacked. Can be 1 or -1. */ public int getRollingDirection() { - return this.dataWatcher.getWatchableObjectInt(18); + return this.dataWatcher.getWatchableObjectVarint(6); } public abstract EntityMinecart.EnumMinecartType getMinecartType(); public IBlockState getDisplayTile() { return !this.hasDisplayTile() ? this.getDefaultDisplayTile() - : Block.getStateById(this.getDataWatcher().getWatchableObjectInt(20)); + : Block.getStateById(this.getDataWatcher().getWatchableObjectVarint(8)); } public IBlockState getDefaultDisplayTile() { @@ -936,7 +937,7 @@ public abstract class EntityMinecart extends Entity implements IWorldNameable { public int getDisplayTileOffset() { return !this.hasDisplayTile() ? this.getDefaultDisplayTileOffset() - : this.getDataWatcher().getWatchableObjectInt(21); + : this.getDataWatcher().getWatchableObjectVarint(9); } public int getDefaultDisplayTileOffset() { @@ -944,21 +945,21 @@ public abstract class EntityMinecart extends Entity implements IWorldNameable { } public void func_174899_a(IBlockState parIBlockState) { - this.getDataWatcher().updateObject(20, Integer.valueOf(Block.getStateId(parIBlockState))); + this.getDataWatcher().updateObject(8, Integer.valueOf(Block.getStateId(parIBlockState))); this.setHasDisplayTile(true); } public void setDisplayTileOffset(int parInt1) { - this.getDataWatcher().updateObject(21, Integer.valueOf(parInt1)); + this.getDataWatcher().updateObject(9, Integer.valueOf(parInt1)); this.setHasDisplayTile(true); } public boolean hasDisplayTile() { - return this.getDataWatcher().getWatchableObjectByte(22) == 1; + return this.getDataWatcher().getWatchableObjectBoolean(10); } public void setHasDisplayTile(boolean parFlag) { - this.getDataWatcher().updateObject(22, Byte.valueOf((byte) (parFlag ? 1 : 0))); + this.getDataWatcher().updateObject(10, Boolean.valueOf(parFlag)); } /** diff --git a/src/main/java/net/minecraft/entity/item/EntityMinecartFurnace.java b/src/main/java/net/minecraft/entity/item/EntityMinecartFurnace.java index 107a26b..b4659ea 100644 --- a/src/main/java/net/minecraft/entity/item/EntityMinecartFurnace.java +++ b/src/main/java/net/minecraft/entity/item/EntityMinecartFurnace.java @@ -2,6 +2,7 @@ package net.minecraft.entity.item; import net.minecraft.block.BlockFurnace; import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -62,7 +63,7 @@ public class EntityMinecartFurnace extends EntityMinecart { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(11, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); } /** @@ -187,16 +188,15 @@ public class EntityMinecartFurnace extends EntityMinecart { } protected boolean isMinecartPowered() { - return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0; + return this.dataWatcher.getWatchableObjectBoolean(11); } protected void setMinecartPowered(boolean parFlag) { if (parFlag) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (this.dataWatcher.getWatchableObjectByte(16) | 1))); + this.dataWatcher.updateObject(11, Boolean.valueOf(true)); } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (this.dataWatcher.getWatchableObjectByte(16) & -2))); + this.dataWatcher.updateObject(11, Boolean.valueOf(false)); } - } public IBlockState getDefaultDisplayTile() { diff --git a/src/main/java/net/minecraft/entity/item/EntityTNTPrimed.java b/src/main/java/net/minecraft/entity/item/EntityTNTPrimed.java index 073933f..4f4170f 100644 --- a/src/main/java/net/minecraft/entity/item/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/entity/item/EntityTNTPrimed.java @@ -6,6 +6,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; +import net.minecraft.entity.DataWatcher; /** * + @@ -54,7 +55,7 @@ public class EntityTNTPrimed extends Entity { this.motionX = (double) (-((float) Math.sin((double) f)) * 0.02F); this.motionY = 0.20000000298023224D; this.motionZ = (double) (-((float) Math.cos((double) f)) * 0.02F); - this.fuse = 80; + this.setFuse(80); this.prevPosX = parDouble1; this.prevPosY = parDouble2; this.prevPosZ = parDouble3; @@ -62,6 +63,7 @@ public class EntityTNTPrimed extends Entity { } protected void entityInit() { + this.dataWatcher.addObject(5, Integer.valueOf(80), DataWatcher.Types.VARINT); } /** @@ -126,7 +128,7 @@ public class EntityTNTPrimed extends Entity { * data to NBT. */ protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { - nbttagcompound.setByte("Fuse", (byte) this.fuse); + nbttagcompound.setShort("Fuse", (short) this.getFuse()); } /** @@ -135,7 +137,26 @@ public class EntityTNTPrimed extends Entity { * data from NBT. */ protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { - this.fuse = nbttagcompound.getByte("Fuse"); + this.fuse = nbttagcompound.getShort("Fuse"); + } + + public void onDataWatcherUpdate(int i) { + if (i == 5) { + this.fuse = this.getFuseDataWatcher(); + } + } + + public void setFuse(int fuseIn) { + this.dataWatcher.updateObject(5, Integer.valueOf(fuseIn)); + this.fuse = fuseIn; + } + + public int getFuseDataWatcher() { + return this.dataWatcher.getWatchableObjectVarint(5); + } + + public int getFuse() { + return this.fuse; } /** diff --git a/src/main/java/net/minecraft/entity/monster/EntityBlaze.java b/src/main/java/net/minecraft/entity/monster/EntityBlaze.java index b3b068b..ba4b974 100644 --- a/src/main/java/net/minecraft/entity/monster/EntityBlaze.java +++ b/src/main/java/net/minecraft/entity/monster/EntityBlaze.java @@ -1,6 +1,7 @@ package net.minecraft.entity.monster; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIBase; @@ -79,7 +80,7 @@ public class EntityBlaze extends EntityMob { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(11, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); } /** @@ -200,18 +201,18 @@ public class EntityBlaze extends EntityMob { } public boolean func_70845_n() { - return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0; + return (this.dataWatcher.getWatchableObjectByte(11) & 1) != 0; } public void setOnFire(boolean onFire) { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); + byte b0 = this.dataWatcher.getWatchableObjectByte(11); if (onFire) { b0 = (byte) (b0 | 1); } else { b0 = (byte) (b0 & -2); } - this.dataWatcher.updateObject(16, Byte.valueOf(b0)); + this.dataWatcher.updateObject(11, Byte.valueOf(b0)); } /** diff --git a/src/main/java/net/minecraft/entity/monster/EntityCreeper.java b/src/main/java/net/minecraft/entity/monster/EntityCreeper.java index 06410ee..654353e 100644 --- a/src/main/java/net/minecraft/entity/monster/EntityCreeper.java +++ b/src/main/java/net/minecraft/entity/monster/EntityCreeper.java @@ -2,6 +2,7 @@ package net.minecraft.entity.monster; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackOnCollide; @@ -101,9 +102,9 @@ public class EntityCreeper extends EntityMob { 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)); + this.dataWatcher.addObject(11, Integer.valueOf(-1), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(12, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); + this.dataWatcher.addObject(13, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); } /** @@ -113,7 +114,7 @@ public class EntityCreeper extends EntityMob { */ public void writeEntityToNBT(NBTTagCompound nbttagcompound) { super.writeEntityToNBT(nbttagcompound); - if (this.dataWatcher.getWatchableObjectByte(17) == 1) { + if (this.dataWatcher.getWatchableObjectBoolean(12)) { nbttagcompound.setBoolean("powered", true); } @@ -129,7 +130,7 @@ public class EntityCreeper extends EntityMob { */ public void readEntityFromNBT(NBTTagCompound nbttagcompound) { super.readEntityFromNBT(nbttagcompound); - this.dataWatcher.updateObject(17, Byte.valueOf((byte) (nbttagcompound.getBoolean("powered") ? 1 : 0))); + this.dataWatcher.updateObject(12, Boolean.valueOf(nbttagcompound.getBoolean("powered"))); if (nbttagcompound.hasKey("Fuse", 99)) { this.fuseTime = nbttagcompound.getShort("Fuse"); } @@ -219,7 +220,7 @@ public class EntityCreeper extends EntityMob { * Returns true if the creeper is powered by a lightning bolt. */ public boolean getPowered() { - return this.dataWatcher.getWatchableObjectByte(17) == 1; + return this.dataWatcher.getWatchableObjectByte(12) == 1; } /** @@ -242,7 +243,7 @@ public class EntityCreeper extends EntityMob { * fuse' */ public int getCreeperState() { - return this.dataWatcher.getWatchableObjectByte(16); + return this.dataWatcher.getWatchableObjectVarint(11); } /** @@ -250,7 +251,7 @@ public class EntityCreeper extends EntityMob { * Sets the state of creeper, -1 to idle and 1 to be 'in fuse' */ public void setCreeperState(int state) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) state)); + this.dataWatcher.updateObject(11, Integer.valueOf(state)); } /** @@ -259,7 +260,7 @@ public class EntityCreeper extends EntityMob { */ public void onStruckByLightning(EntityLightningBolt entitylightningbolt) { super.onStruckByLightning(entitylightningbolt); - this.dataWatcher.updateObject(17, Byte.valueOf((byte) 1)); + this.dataWatcher.updateObject(12, Boolean.valueOf(true)); } /** @@ -300,11 +301,11 @@ public class EntityCreeper extends EntityMob { } public boolean hasIgnited() { - return this.dataWatcher.getWatchableObjectByte(18) != 0; + return this.dataWatcher.getWatchableObjectBoolean(13); } public void ignite() { - this.dataWatcher.updateObject(18, Byte.valueOf((byte) 1)); + this.dataWatcher.updateObject(13, Boolean.valueOf(true)); } /** diff --git a/src/main/java/net/minecraft/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/entity/monster/EntityEnderman.java index 56e290a..9d98937 100644 --- a/src/main/java/net/minecraft/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/entity/monster/EntityEnderman.java @@ -1,15 +1,20 @@ package net.minecraft.entity.monster; +import com.google.common.base.Optional; import com.google.common.base.Predicate; import com.google.common.collect.Sets; import java.util.Collections; import java.util.List; import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; import java.util.Set; + +import javax.annotation.Nullable; + import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; @@ -107,9 +112,8 @@ public class EntityEnderman extends EntityMob { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Short.valueOf((short) 0)); - this.dataWatcher.addObject(17, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(18, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(11, Optional.absent(), DataWatcher.Types.OPTIONAL_BLOCK_STATE); + this.dataWatcher.addObject(12, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); } /** @@ -348,16 +352,19 @@ public class EntityEnderman extends EntityMob { * + * Sets this enderman's held block state */ - public void setHeldBlockState(IBlockState state) { - this.dataWatcher.updateObject(16, Short.valueOf((short) (Block.getStateId(state) & '\uffff'))); + public void setHeldBlockState(@Nullable IBlockState state) { + this.dataWatcher.updateObject(11, Optional.fromNullable(state)); } /** * + * Gets this enderman's held block state */ + @Nullable public IBlockState getHeldBlockState() { - return Block.getStateById(this.dataWatcher.getWatchableObjectShort(16) & '\uffff'); + // ! fix this + return Blocks.air.getDefaultState(); + // return this.dataWatcher.getWatchableObjectBlockState(11).orNull(); } /** @@ -405,11 +412,11 @@ public class EntityEnderman extends EntityMob { } public boolean isScreaming() { - return this.dataWatcher.getWatchableObjectByte(18) > 0; + return this.dataWatcher.getWatchableObjectBoolean(12); } public void setScreaming(boolean screaming) { - this.dataWatcher.updateObject(18, Byte.valueOf((byte) (screaming ? 1 : 0))); + this.dataWatcher.updateObject(12, Boolean.valueOf(screaming)); } public static void bootstrap() { diff --git a/src/main/java/net/minecraft/entity/monster/EntityGhast.java b/src/main/java/net/minecraft/entity/monster/EntityGhast.java index 0ea7e25..fd1c5b0 100644 --- a/src/main/java/net/minecraft/entity/monster/EntityGhast.java +++ b/src/main/java/net/minecraft/entity/monster/EntityGhast.java @@ -1,6 +1,7 @@ package net.minecraft.entity.monster; import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.EntityFlying; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; @@ -70,11 +71,11 @@ public class EntityGhast extends EntityFlying implements IMob { } public boolean isAttacking() { - return this.dataWatcher.getWatchableObjectByte(16) != 0; + return this.dataWatcher.getWatchableObjectBoolean(11); } public void setAttacking(boolean parFlag) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (parFlag ? 1 : 0))); + this.dataWatcher.updateObject(11, Boolean.valueOf(parFlag)); } public int getFireballStrength() { @@ -112,7 +113,7 @@ public class EntityGhast extends EntityFlying implements IMob { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(11, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); } protected void applyEntityAttributes() { diff --git a/src/main/java/net/minecraft/entity/monster/EntityGuardian.java b/src/main/java/net/minecraft/entity/monster/EntityGuardian.java index b61a618..11af8e2 100644 --- a/src/main/java/net/minecraft/entity/monster/EntityGuardian.java +++ b/src/main/java/net/minecraft/entity/monster/EntityGuardian.java @@ -4,6 +4,7 @@ import java.util.List; import com.google.common.base.Predicate; import net.minecraft.block.material.Material; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; @@ -136,8 +137,8 @@ public class EntityGuardian extends EntityMob { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Integer.valueOf(0)); - this.dataWatcher.addObject(17, Integer.valueOf(0)); + this.dataWatcher.addObject(11, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); + this.dataWatcher.addObject(12, Integer.valueOf(0), DataWatcher.Types.VARINT); } /** @@ -145,7 +146,7 @@ public class EntityGuardian extends EntityMob { * Returns true if given flag is set */ private boolean isSyncedFlagSet(int flagId) { - return (this.dataWatcher.getWatchableObjectInt(16) & flagId) != 0; + return (this.dataWatcher.getWatchableObjectByte(11) & flagId) != 0; } /** @@ -154,11 +155,11 @@ public class EntityGuardian extends EntityMob { * using DataWatcher */ private void setSyncedFlag(int flagId, boolean state) { - int i = this.dataWatcher.getWatchableObjectInt(16); + int i = this.dataWatcher.getWatchableObjectByte(11); if (state) { - this.dataWatcher.updateObject(16, Integer.valueOf(i | flagId)); + this.dataWatcher.updateObject(11, Integer.valueOf(i | flagId)); } else { - this.dataWatcher.updateObject(16, Integer.valueOf(i & ~flagId)); + this.dataWatcher.updateObject(1, Integer.valueOf(i & ~flagId)); } } @@ -206,11 +207,11 @@ public class EntityGuardian extends EntityMob { } private void setTargetedEntity(int entityId) { - this.dataWatcher.updateObject(17, Integer.valueOf(entityId)); + this.dataWatcher.updateObject(12, Integer.valueOf(entityId)); } public boolean hasTargetedEntity() { - return this.dataWatcher.getWatchableObjectInt(17) != 0; + return this.dataWatcher.getWatchableObjectVarint(12) != 0; } public EntityLivingBase getTargetedEntity() { @@ -220,7 +221,7 @@ public class EntityGuardian extends EntityMob { if (this.targetedEntity != null) { return this.targetedEntity; } else { - Entity entity = this.worldObj.getEntityByID(this.dataWatcher.getWatchableObjectInt(17)); + Entity entity = this.worldObj.getEntityByID(this.dataWatcher.getWatchableObjectVarint(12)); if (entity instanceof EntityLivingBase) { this.targetedEntity = (EntityLivingBase) entity; return this.targetedEntity; @@ -243,7 +244,6 @@ public class EntityGuardian extends EntityMob { this.field_175479_bo = 0; this.targetedEntity = null; } - } /** diff --git a/src/main/java/net/minecraft/entity/monster/EntityIronGolem.java b/src/main/java/net/minecraft/entity/monster/EntityIronGolem.java index 952845e..2d754f1 100644 --- a/src/main/java/net/minecraft/entity/monster/EntityIronGolem.java +++ b/src/main/java/net/minecraft/entity/monster/EntityIronGolem.java @@ -5,6 +5,7 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLiving; @@ -89,7 +90,7 @@ public class EntityIronGolem extends EntityGolem { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(11, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); } protected void updateAITasks() { @@ -277,15 +278,15 @@ public class EntityIronGolem extends EntityGolem { } public boolean isPlayerCreated() { - return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0; + return (this.dataWatcher.getWatchableObjectByte(11) & 1) != 0; } public void setPlayerCreated(boolean parFlag) { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); + byte b0 = this.dataWatcher.getWatchableObjectByte(1); if (parFlag) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 1))); + this.dataWatcher.updateObject(11, Byte.valueOf((byte) (b0 | 1))); } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -2))); + this.dataWatcher.updateObject(11, Byte.valueOf((byte) (b0 & -2))); } } diff --git a/src/main/java/net/minecraft/entity/monster/EntitySkeleton.java b/src/main/java/net/minecraft/entity/monster/EntitySkeleton.java index 5b4a5fd..cffb703 100644 --- a/src/main/java/net/minecraft/entity/monster/EntitySkeleton.java +++ b/src/main/java/net/minecraft/entity/monster/EntitySkeleton.java @@ -4,6 +4,7 @@ import java.util.Calendar; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLivingBase; @@ -98,7 +99,8 @@ public class EntitySkeleton extends EntityMob implements IRangedAttackMob { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(13, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(11, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(12, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); } /** @@ -358,7 +360,7 @@ public class EntitySkeleton extends EntityMob implements IRangedAttackMob { * Return this skeleton's type. */ public int getSkeletonType() { - return this.dataWatcher.getWatchableObjectByte(13); + return this.dataWatcher.getWatchableObjectVarint(11); } /** @@ -366,7 +368,7 @@ public class EntitySkeleton extends EntityMob implements IRangedAttackMob { * Set this skeleton's type. */ public void setSkeletonType(int parInt1) { - this.dataWatcher.updateObject(13, Byte.valueOf((byte) parInt1)); + this.dataWatcher.updateObject(11, Integer.valueOf(parInt1)); this.isImmuneToFire = parInt1 == 1; if (parInt1 == 1) { this.setSize(0.72F, 2.535F); @@ -425,4 +427,13 @@ public class EntitySkeleton extends EntityMob implements IRangedAttackMob { public double getYOffset() { return this.isChild() ? 0.0D : -0.35D; } + + // TODO: implement offhand + public boolean isSwingingArms() { + return this.dataWatcher.getWatchableObjectBoolean(12); + } + + public void setSwingingArms(boolean swingingArms) { + this.dataWatcher.updateObject(12, Boolean.valueOf(swingingArms)); + } } \ No newline at end of file diff --git a/src/main/java/net/minecraft/entity/monster/EntitySlime.java b/src/main/java/net/minecraft/entity/monster/EntitySlime.java index ca8ab7d..1afb09e 100644 --- a/src/main/java/net/minecraft/entity/monster/EntitySlime.java +++ b/src/main/java/net/minecraft/entity/monster/EntitySlime.java @@ -1,5 +1,6 @@ package net.minecraft.entity.monster; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; @@ -73,11 +74,11 @@ public class EntitySlime extends EntityLiving implements IMob { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 1)); + this.dataWatcher.addObject(11, Integer.valueOf(1), DataWatcher.Types.VARINT); } protected void setSlimeSize(int size) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) size)); + this.dataWatcher.updateObject(11, Integer.valueOf(size)); this.setSize(0.51000005F * (float) size, 0.51000005F * (float) size); this.setPosition(this.posX, this.posY, this.posZ); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue((double) (size * size)); @@ -92,7 +93,7 @@ public class EntitySlime extends EntityLiving implements IMob { * Returns the size of the slime. */ public int getSlimeSize() { - return this.dataWatcher.getWatchableObjectByte(16); + return this.dataWatcher.getWatchableObjectVarint(11); } /** diff --git a/src/main/java/net/minecraft/entity/monster/EntitySpider.java b/src/main/java/net/minecraft/entity/monster/EntitySpider.java index 8ca25f4..321f201 100644 --- a/src/main/java/net/minecraft/entity/monster/EntitySpider.java +++ b/src/main/java/net/minecraft/entity/monster/EntitySpider.java @@ -2,6 +2,7 @@ package net.minecraft.entity.monster; import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; import net.minecraft.block.Block; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EnumCreatureAttribute; @@ -91,7 +92,7 @@ public class EntitySpider extends EntityMob { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(11, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); } /** @@ -190,7 +191,7 @@ public class EntitySpider extends EntityMob { * setBesideClimableBlock. */ public boolean isBesideClimbableBlock() { - return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0; + return (this.dataWatcher.getWatchableObjectByte(11) & 1) != 0; } /** @@ -199,14 +200,14 @@ public class EntitySpider extends EntityMob { * setting it to 0x01 if par1 is true or 0x00 if it is false. */ public void setBesideClimbableBlock(boolean parFlag) { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); + byte b0 = this.dataWatcher.getWatchableObjectByte(11); if (parFlag) { b0 = (byte) (b0 | 1); } else { b0 = (byte) (b0 & -2); } - this.dataWatcher.updateObject(16, Byte.valueOf(b0)); + this.dataWatcher.updateObject(11, Byte.valueOf(b0)); } /** diff --git a/src/main/java/net/minecraft/entity/monster/EntityWitch.java b/src/main/java/net/minecraft/entity/monster/EntityWitch.java index 1043d87..0cc3d9a 100644 --- a/src/main/java/net/minecraft/entity/monster/EntityWitch.java +++ b/src/main/java/net/minecraft/entity/monster/EntityWitch.java @@ -3,6 +3,7 @@ package net.minecraft.entity.monster; import java.util.List; import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.minecraft.block.material.Material; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IRangedAttackMob; import net.minecraft.entity.SharedMonsterAttributes; @@ -83,7 +84,7 @@ public class EntityWitch extends EntityMob implements IRangedAttackMob { protected void entityInit() { super.entityInit(); - this.getDataWatcher().addObject(21, Byte.valueOf((byte) 0)); + this.getDataWatcher().addObject(11, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); } /** @@ -115,7 +116,7 @@ public class EntityWitch extends EntityMob implements IRangedAttackMob { * Set whether this witch is aggressive at an entity. */ public void setAggressive(boolean aggressive) { - this.getDataWatcher().updateObject(21, Byte.valueOf((byte) (aggressive ? 1 : 0))); + this.getDataWatcher().updateObject(11, Boolean.valueOf(aggressive)); } /** @@ -123,7 +124,7 @@ public class EntityWitch extends EntityMob implements IRangedAttackMob { * Return whether this witch is aggressive at an entity. */ public boolean getAggressive() { - return this.getDataWatcher().getWatchableObjectByte(21) == 1; + return this.getDataWatcher().getWatchableObjectBoolean(11); } protected void applyEntityAttributes() { diff --git a/src/main/java/net/minecraft/entity/monster/EntityZombie.java b/src/main/java/net/minecraft/entity/monster/EntityZombie.java index 97761d5..5c1818f 100644 --- a/src/main/java/net/minecraft/entity/monster/EntityZombie.java +++ b/src/main/java/net/minecraft/entity/monster/EntityZombie.java @@ -4,6 +4,7 @@ import java.util.Calendar; import java.util.List; import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.minecraft.block.Block; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; @@ -128,9 +129,18 @@ public class EntityZombie extends EntityMob { protected void entityInit() { super.entityInit(); - this.getDataWatcher().addObject(12, Byte.valueOf((byte) 0)); - this.getDataWatcher().addObject(13, Byte.valueOf((byte) 0)); - this.getDataWatcher().addObject(14, Byte.valueOf((byte) 0)); + this.getDataWatcher().addObject(11, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); + this.getDataWatcher().addObject(12, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.getDataWatcher().addObject(13, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); + this.getDataWatcher().addObject(14, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); + } + + public void setArmsRaised(boolean armsRaised) { + this.getDataWatcher().updateObject(14, Boolean.valueOf(armsRaised)); + } + + public boolean isArmsRaised() { + return this.getDataWatcher().getWatchableObjectBoolean(14); } /** @@ -172,7 +182,7 @@ public class EntityZombie extends EntityMob { * If Animal, checks if the age timer is negative */ public boolean isChild() { - return this.getDataWatcher().getWatchableObjectByte(12) == 1; + return this.getDataWatcher().getWatchableObjectBoolean(11); } /** @@ -192,7 +202,7 @@ public class EntityZombie extends EntityMob { * Set whether this zombie is a child. */ public void setChild(boolean childZombie) { - this.getDataWatcher().updateObject(12, Byte.valueOf((byte) (childZombie ? 1 : 0))); + this.getDataWatcher().updateObject(11, Boolean.valueOf(childZombie)); if (this.worldObj != null && !this.worldObj.isRemote) { IAttributeInstance iattributeinstance = this.getEntityAttribute(SharedMonsterAttributes.movementSpeed); iattributeinstance.removeModifier(babySpeedBoostModifier); @@ -208,8 +218,9 @@ public class EntityZombie extends EntityMob { * + * Return whether this zombie is a villager. */ + // TODO: implement profession public boolean isVillager() { - return this.getDataWatcher().getWatchableObjectByte(13) == 1; + return this.getDataWatcher().getWatchableObjectVarint(12) > 0; } /** @@ -217,7 +228,7 @@ public class EntityZombie extends EntityMob { * Set whether this zombie is a villager. */ public void setVillager(boolean villager) { - this.getDataWatcher().updateObject(13, Byte.valueOf((byte) (villager ? 1 : 0))); + this.getDataWatcher().updateObject(12, Integer.valueOf(villager ? 1 : 0)); } /** @@ -620,7 +631,7 @@ public class EntityZombie extends EntityMob { */ protected void startConversion(int ticks) { this.conversionTime = ticks; - this.getDataWatcher().updateObject(14, Byte.valueOf((byte) 1)); + this.getDataWatcher().updateObject(13, Boolean.valueOf(true)); this.removePotionEffect(Potion.weakness.id); this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, ticks, Math.min(this.worldObj.getDifficulty().getDifficultyId() - 1, 0))); @@ -654,7 +665,7 @@ public class EntityZombie extends EntityMob { * to a villager */ public boolean isConverting() { - return this.getDataWatcher().getWatchableObjectByte(14) == 1; + return this.getDataWatcher().getWatchableObjectBoolean(13); } /** diff --git a/src/main/java/net/minecraft/entity/passive/EntityBat.java b/src/main/java/net/minecraft/entity/passive/EntityBat.java index be8ce23..419cc53 100644 --- a/src/main/java/net/minecraft/entity/passive/EntityBat.java +++ b/src/main/java/net/minecraft/entity/passive/EntityBat.java @@ -2,6 +2,7 @@ package net.minecraft.entity.passive; import java.util.Calendar; import net.minecraft.block.Block; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.player.EntityPlayer; @@ -51,7 +52,7 @@ public class EntityBat extends EntityAmbientCreature { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(10, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); } /** @@ -115,15 +116,15 @@ public class EntityBat extends EntityAmbientCreature { } public boolean getIsBatHanging() { - return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0; + return (this.dataWatcher.getWatchableObjectByte(10) & 1) != 0; } public void setIsBatHanging(boolean isHanging) { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); + byte b0 = this.dataWatcher.getWatchableObjectByte(10); if (isHanging) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 1))); + this.dataWatcher.updateObject(10, Byte.valueOf((byte) (b0 | 1))); } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -2))); + this.dataWatcher.updateObject(10, Byte.valueOf((byte) (b0 & -2))); } } @@ -241,7 +242,7 @@ public class EntityBat extends EntityAmbientCreature { */ public void readEntityFromNBT(NBTTagCompound nbttagcompound) { super.readEntityFromNBT(nbttagcompound); - this.dataWatcher.updateObject(16, Byte.valueOf(nbttagcompound.getByte("BatFlags"))); + this.dataWatcher.updateObject(10, Byte.valueOf(nbttagcompound.getByte("BatFlags"))); } /** @@ -251,7 +252,7 @@ public class EntityBat extends EntityAmbientCreature { */ public void writeEntityToNBT(NBTTagCompound nbttagcompound) { super.writeEntityToNBT(nbttagcompound); - nbttagcompound.setByte("BatFlags", this.dataWatcher.getWatchableObjectByte(16)); + nbttagcompound.setByte("BatFlags", this.dataWatcher.getWatchableObjectByte(10)); } /** diff --git a/src/main/java/net/minecraft/entity/passive/EntityHorse.java b/src/main/java/net/minecraft/entity/passive/EntityHorse.java index 8ba7b0c..9cc533c 100644 --- a/src/main/java/net/minecraft/entity/passive/EntityHorse.java +++ b/src/main/java/net/minecraft/entity/passive/EntityHorse.java @@ -2,11 +2,16 @@ package net.minecraft.entity.passive; import java.util.List; +import javax.annotation.Nullable; + +import com.google.common.base.Optional; import com.google.common.base.Predicate; +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLivingBase; @@ -137,15 +142,15 @@ public class EntityHorse extends EntityAnimal implements IInvBasic { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Integer.valueOf(0)); - this.dataWatcher.addObject(19, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(20, Integer.valueOf(0)); - this.dataWatcher.addObject(21, String.valueOf("")); - this.dataWatcher.addObject(22, Integer.valueOf(0)); + this.dataWatcher.addObject(12, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); + this.dataWatcher.addObject(13, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(14, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(15, Optional.absent(), DataWatcher.Types.OPTIONAL_UNIQUE_ID); + this.dataWatcher.addObject(16, Integer.valueOf(0), DataWatcher.Types.VARINT); } public void setHorseType(int type) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte) type)); + this.dataWatcher.updateObject(13, Integer.valueOf(type)); this.resetTexturePrefix(); } @@ -155,16 +160,16 @@ public class EntityHorse extends EntityAnimal implements IInvBasic { * Undead Horse, 4 = Skeleton Horse */ public int getHorseType() { - return this.dataWatcher.getWatchableObjectByte(19); + return this.dataWatcher.getWatchableObjectVarint(13); } public void setHorseVariant(int variant) { - this.dataWatcher.updateObject(20, Integer.valueOf(variant)); + this.dataWatcher.updateObject(14, Integer.valueOf(variant)); this.resetTexturePrefix(); } public int getHorseVariant() { - return this.dataWatcher.getWatchableObjectInt(20); + return this.dataWatcher.getWatchableObjectVarint(14); } /** @@ -194,15 +199,15 @@ public class EntityHorse extends EntityAnimal implements IInvBasic { } private boolean getHorseWatchableBoolean(int parInt1) { - return (this.dataWatcher.getWatchableObjectInt(16) & parInt1) != 0; + return (this.dataWatcher.getWatchableObjectByte(12) & parInt1) != 0; } private void setHorseWatchableBoolean(int parInt1, boolean parFlag) { - int i = this.dataWatcher.getWatchableObjectInt(16); + int i = this.dataWatcher.getWatchableObjectByte(12); if (parFlag) { - this.dataWatcher.updateObject(16, Integer.valueOf(i | parInt1)); + this.dataWatcher.updateObject(12, Byte.valueOf((byte) (i | parInt1))); } else { - this.dataWatcher.updateObject(16, Integer.valueOf(i & ~parInt1)); + this.dataWatcher.updateObject(12, Byte.valueOf((byte) (i & ~parInt1))); } } @@ -223,12 +228,13 @@ public class EntityHorse extends EntityAnimal implements IInvBasic { * + * Gets the horse's owner */ - public String getOwnerId() { - return this.dataWatcher.getWatchableObjectString(21); + @Nullable + public EaglercraftUUID getOwnerId() { + return this.dataWatcher.getWatchableObjectOptionalUniqueId(15).orNull(); } - public void setOwnerId(String id) { - this.dataWatcher.updateObject(21, id); + public void setOwnerId(@Nullable EaglercraftUUID id) { + this.dataWatcher.updateObject(15, Optional.fromNullable(id)); } public float getHorseSize() { @@ -282,7 +288,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic { * = diamond) */ public int getHorseArmorIndexSynced() { - return this.dataWatcher.getWatchableObjectInt(22); + return this.dataWatcher.getWatchableObjectVarint(16); } /** @@ -321,7 +327,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic { * ItemStack(Items.iron_horse_armor)) */ public void setHorseArmorStack(ItemStack itemStackIn) { - this.dataWatcher.updateObject(22, Integer.valueOf(this.getHorseArmorIndex(itemStackIn))); + this.dataWatcher.updateObject(16, Integer.valueOf(this.getHorseArmorIndex(itemStackIn))); this.resetTexturePrefix(); } @@ -1140,7 +1146,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic { } public boolean setTamedBy(EntityPlayer player) { - this.setOwnerId(player.getUniqueID().toString()); + this.setOwnerId(player.getUniqueID()); this.setHorseTamed(true); return true; } @@ -1234,9 +1240,9 @@ public class EntityHorse extends EntityAnimal implements IInvBasic { nbttagcompound.setInteger("Temper", this.getTemper()); nbttagcompound.setBoolean("Tame", this.isTame()); if (worldObj.isRemote && !SingleplayerServerController.isClientInEaglerSingleplayerOrLAN()) { - nbttagcompound.setString("OwnerUUID", this.getOwnerId()); + nbttagcompound.setString("OwnerUUID", this.getOwnerId().toString()); } else { - nbttagcompound.setString("Owner", this.getOwnerId()); + nbttagcompound.setString("Owner", this.getOwnerId().toString()); } if (this.isChested()) { NBTTagList nbttaglist = new NBTTagList(); @@ -1291,7 +1297,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic { } if (s.length() > 0) { - this.setOwnerId(s); + this.setOwnerId(EaglercraftUUID.fromString(s)); } IAttributeInstance iattributeinstance = this.getAttributeMap().getAttributeInstanceByName("Speed"); diff --git a/src/main/java/net/minecraft/entity/passive/EntityOcelot.java b/src/main/java/net/minecraft/entity/passive/EntityOcelot.java index d10ea3f..debb183 100644 --- a/src/main/java/net/minecraft/entity/passive/EntityOcelot.java +++ b/src/main/java/net/minecraft/entity/passive/EntityOcelot.java @@ -3,6 +3,7 @@ package net.minecraft.entity.passive; import com.google.common.base.Predicate; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.IEntityLivingData; @@ -83,7 +84,7 @@ public class EntityOcelot extends EntityTameable { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(18, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(14, Integer.valueOf(0), DataWatcher.Types.VARINT); } public void updateAITasks() { @@ -231,7 +232,7 @@ public class EntityOcelot extends EntityTameable { if (this.rand.nextInt(3) == 0) { this.setTamed(true); this.setTameSkin(1 + this.worldObj.rand.nextInt(3)); - this.setOwnerId(entityplayer.getUniqueID().toString()); + this.setOwnerId(entityplayer.getUniqueID()); this.playTameEffect(true); this.aiSit.setSitting(true); this.worldObj.setEntityState(this, (byte) 7); @@ -287,11 +288,11 @@ public class EntityOcelot extends EntityTameable { } public int getTameSkin() { - return this.dataWatcher.getWatchableObjectByte(18); + return this.dataWatcher.getWatchableObjectVarint(14); } public void setTameSkin(int skinId) { - this.dataWatcher.updateObject(18, Byte.valueOf((byte) skinId)); + this.dataWatcher.updateObject(14, Integer.valueOf(skinId)); } /** diff --git a/src/main/java/net/minecraft/entity/passive/EntityPig.java b/src/main/java/net/minecraft/entity/passive/EntityPig.java index 2d98021..58a2848 100644 --- a/src/main/java/net/minecraft/entity/passive/EntityPig.java +++ b/src/main/java/net/minecraft/entity/passive/EntityPig.java @@ -2,6 +2,7 @@ package net.minecraft.entity.passive; import net.hoosiertransfer.EaglerItems; import net.minecraft.block.Block; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIControlledByPlayer; @@ -93,7 +94,7 @@ public class EntityPig extends EntityAnimal { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(12, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); } /** @@ -191,7 +192,7 @@ public class EntityPig extends EntityAnimal { * Returns true if the pig is saddled. */ public boolean getSaddled() { - return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0; + return this.dataWatcher.getWatchableObjectBoolean(12); } /** @@ -200,11 +201,10 @@ public class EntityPig extends EntityAnimal { */ public void setSaddled(boolean saddled) { if (saddled) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1)); + this.dataWatcher.updateObject(12, Boolean.valueOf(true)); } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0)); + this.dataWatcher.updateObject(12, Boolean.valueOf(false)); } - } /** diff --git a/src/main/java/net/minecraft/entity/passive/EntityRabbit.java b/src/main/java/net/minecraft/entity/passive/EntityRabbit.java index c1cacec..bbd2cad 100644 --- a/src/main/java/net/minecraft/entity/passive/EntityRabbit.java +++ b/src/main/java/net/minecraft/entity/passive/EntityRabbit.java @@ -3,6 +3,7 @@ package net.minecraft.entity.passive; import net.minecraft.block.Block; import net.minecraft.block.BlockCarrot; import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLivingBase; @@ -145,7 +146,7 @@ public class EntityRabbit extends EntityAnimal { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(18, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(12, Integer.valueOf(0), DataWatcher.Types.VARINT); } public void updateAITasks() { @@ -393,7 +394,7 @@ public class EntityRabbit extends EntityAnimal { } public int getRabbitType() { - return this.dataWatcher.getWatchableObjectByte(18); + return this.dataWatcher.getWatchableObjectVarint(12); } public void setRabbitType(int rabbitTypeId) { @@ -408,7 +409,7 @@ public class EntityRabbit extends EntityAnimal { } } - this.dataWatcher.updateObject(18, Byte.valueOf((byte) rabbitTypeId)); + this.dataWatcher.updateObject(12, Integer.valueOf(rabbitTypeId)); } /** diff --git a/src/main/java/net/minecraft/entity/passive/EntitySheep.java b/src/main/java/net/minecraft/entity/passive/EntitySheep.java index 4f0aa97..3136b47 100644 --- a/src/main/java/net/minecraft/entity/passive/EntitySheep.java +++ b/src/main/java/net/minecraft/entity/passive/EntitySheep.java @@ -4,6 +4,7 @@ import com.google.common.collect.Maps; import java.util.Map; import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; import net.minecraft.block.Block; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.SharedMonsterAttributes; @@ -126,7 +127,7 @@ public class EntitySheep extends EntityAnimal { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(12, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); } /** @@ -264,7 +265,7 @@ public class EntitySheep extends EntityAnimal { * Gets the wool color of this sheep. */ public EnumDyeColor getFleeceColor() { - return EnumDyeColor.byMetadata(this.dataWatcher.getWatchableObjectByte(16) & 15); + return EnumDyeColor.byMetadata(this.dataWatcher.getWatchableObjectByte(12) & 15); } /** @@ -272,8 +273,8 @@ public class EntitySheep extends EntityAnimal { * Sets the wool color of this sheep */ public void setFleeceColor(EnumDyeColor color) { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & 240 | color.getMetadata() & 15))); + byte b0 = this.dataWatcher.getWatchableObjectByte(12); + this.dataWatcher.updateObject(12, Byte.valueOf((byte) (b0 & 240 | color.getMetadata() & 15))); } /** @@ -281,7 +282,7 @@ public class EntitySheep extends EntityAnimal { * returns true if a sheeps wool has been sheared */ public boolean getSheared() { - return (this.dataWatcher.getWatchableObjectByte(16) & 16) != 0; + return (this.dataWatcher.getWatchableObjectByte(12) & 16) != 0; } /** @@ -289,11 +290,11 @@ public class EntitySheep extends EntityAnimal { * make a sheep sheared if set to true */ public void setSheared(boolean sheared) { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); + byte b0 = this.dataWatcher.getWatchableObjectByte(12); if (sheared) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 16))); + this.dataWatcher.updateObject(12, Byte.valueOf((byte) (b0 | 16))); } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -17))); + this.dataWatcher.updateObject(12, Byte.valueOf((byte) (b0 & -17))); } } diff --git a/src/main/java/net/minecraft/entity/passive/EntityTameable.java b/src/main/java/net/minecraft/entity/passive/EntityTameable.java index dd1e693..930d84f 100644 --- a/src/main/java/net/minecraft/entity/passive/EntityTameable.java +++ b/src/main/java/net/minecraft/entity/passive/EntityTameable.java @@ -1,7 +1,12 @@ package net.minecraft.entity.passive; +import javax.annotation.Nullable; + +import com.google.common.base.Optional; + import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IEntityOwnable; import net.minecraft.entity.ai.EntityAISit; @@ -52,8 +57,8 @@ public abstract class EntityTameable extends EntityAnimal implements IEntityOwna protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(17, ""); + this.dataWatcher.addObject(12, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); + this.dataWatcher.addObject(13, Optional.absent(), DataWatcher.Types.OPTIONAL_UNIQUE_ID); } /** @@ -67,13 +72,13 @@ public abstract class EntityTameable extends EntityAnimal implements IEntityOwna if (this.getOwnerId() == null) { nbttagcompound.setString("OwnerUUID", ""); } else { - nbttagcompound.setString("OwnerUUID", this.getOwnerId()); + nbttagcompound.setString("OwnerUUID", this.getOwnerId().toString()); } } else { if (this.getOwnerId() == null) { nbttagcompound.setString("Owner", ""); } else { - nbttagcompound.setString("Owner", this.getOwnerId()); + nbttagcompound.setString("Owner", this.getOwnerId().toString()); } } @@ -99,7 +104,7 @@ public abstract class EntityTameable extends EntityAnimal implements IEntityOwna } if (s.length() > 0) { - this.setOwnerId(s); + this.setOwnerId(EaglercraftUUID.fromString(s)); this.setTamed(true); } @@ -143,15 +148,15 @@ public abstract class EntityTameable extends EntityAnimal implements IEntityOwna } public boolean isTamed() { - return (this.dataWatcher.getWatchableObjectByte(16) & 4) != 0; + return (this.dataWatcher.getWatchableObjectByte(12) & 4) != 0; } public void setTamed(boolean tamed) { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); + byte b0 = this.dataWatcher.getWatchableObjectByte(12); if (tamed) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 4))); + this.dataWatcher.updateObject(12, Byte.valueOf((byte) (b0 | 4))); } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -5))); + this.dataWatcher.updateObject(12, Byte.valueOf((byte) (b0 & -5))); } this.setupTamedAI(); @@ -161,30 +166,31 @@ public abstract class EntityTameable extends EntityAnimal implements IEntityOwna } public boolean isSitting() { - return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0; + return (this.dataWatcher.getWatchableObjectByte(12) & 1) != 0; } public void setSitting(boolean sitting) { byte b0 = this.dataWatcher.getWatchableObjectByte(16); if (sitting) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 1))); + this.dataWatcher.updateObject(12, Byte.valueOf((byte) (b0 | 1))); } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -2))); + this.dataWatcher.updateObject(12, Byte.valueOf((byte) (b0 & -2))); } } - public String getOwnerId() { - return this.dataWatcher.getWatchableObjectString(17); + @Nullable + public EaglercraftUUID getOwnerId() { + return this.dataWatcher.getWatchableObjectOptionalUniqueId(13).orNull(); } - public void setOwnerId(String ownerUuid) { - this.dataWatcher.updateObject(17, ownerUuid); + public void setOwnerId(@Nullable EaglercraftUUID ownerUuid) { + this.dataWatcher.updateObject(13, ownerUuid); } public EntityLivingBase getOwner() { try { - EaglercraftUUID uuid = EaglercraftUUID.fromString(this.getOwnerId()); + EaglercraftUUID uuid = this.getOwnerId(); return uuid == null ? null : this.worldObj.getPlayerEntityByUUID(uuid); } catch (IllegalArgumentException var2) { return null; diff --git a/src/main/java/net/minecraft/entity/passive/EntityVillager.java b/src/main/java/net/minecraft/entity/passive/EntityVillager.java index 4bee2bb..870f768 100644 --- a/src/main/java/net/minecraft/entity/passive/EntityVillager.java +++ b/src/main/java/net/minecraft/entity/passive/EntityVillager.java @@ -7,6 +7,7 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentData; import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLiving; @@ -448,7 +449,7 @@ public class EntityVillager extends EntityAgeable implements IMerchant, INpc { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Integer.valueOf(0)); + this.dataWatcher.addObject(12, Integer.valueOf(0), DataWatcher.Types.VARINT); } /** @@ -547,11 +548,11 @@ public class EntityVillager extends EntityAgeable implements IMerchant, INpc { } public void setProfession(int professionId) { - this.dataWatcher.updateObject(16, Integer.valueOf(professionId)); + this.dataWatcher.updateObject(12, Integer.valueOf(professionId)); } public int getProfession() { - return Math.max(this.dataWatcher.getWatchableObjectInt(16) % 5, 0); + return Math.max(this.dataWatcher.getWatchableObjectVarint(12) % 5, 0); } public boolean isMating() { diff --git a/src/main/java/net/minecraft/entity/passive/EntityWolf.java b/src/main/java/net/minecraft/entity/passive/EntityWolf.java index e011625..d7edde7 100644 --- a/src/main/java/net/minecraft/entity/passive/EntityWolf.java +++ b/src/main/java/net/minecraft/entity/passive/EntityWolf.java @@ -1,7 +1,10 @@ package net.minecraft.entity.passive; import com.google.common.base.Predicate; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.minecraft.block.Block; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLivingBase; @@ -135,9 +138,9 @@ public class EntityWolf extends EntityTameable { protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(18, Float.valueOf(this.getHealth())); - this.dataWatcher.addObject(19, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(20, Byte.valueOf((byte) EnumDyeColor.RED.getMetadata())); + this.dataWatcher.addObject(14, Float.valueOf(this.getHealth()), DataWatcher.Types.FLOAT); + this.dataWatcher.addObject(15, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); + this.dataWatcher.addObject(16, Integer.valueOf(EnumDyeColor.RED.getMetadata()), DataWatcher.Types.VARINT); } protected void playStepSound(BlockPos var1, Block var2) { @@ -176,7 +179,7 @@ public class EntityWolf extends EntityTameable { protected String getLivingSound() { return this.isAngry() ? "mob.wolf.growl" : (this.rand.nextInt(3) == 0 - ? (this.isTamed() && this.dataWatcher.getWatchableObjectFloat(18) < 10.0F ? "mob.wolf.whine" + ? (this.isTamed() && this.dataWatcher.getWatchableObjectFloat(14) < 10.0F ? "mob.wolf.whine" : "mob.wolf.panting") : "mob.wolf.bark"); } @@ -378,7 +381,7 @@ public class EntityWolf extends EntityTameable { if (itemstack != null) { if (itemstack.getItem() instanceof ItemFood) { ItemFood itemfood = (ItemFood) itemstack.getItem(); - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < 20.0F) { + if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(14) < 20.0F) { if (!entityplayer.capabilities.isCreativeMode) { --itemstack.stackSize; } @@ -427,7 +430,7 @@ public class EntityWolf extends EntityTameable { this.setAttackTarget((EntityLivingBase) null); this.aiSit.setSitting(true); this.setHealth(20.0F); - this.setOwnerId(entityplayer.getUniqueID().toString()); + this.setOwnerId(entityplayer.getUniqueID()); this.playTameEffect(true); this.worldObj.setEntityState(this, (byte) 7); } else { @@ -456,7 +459,7 @@ public class EntityWolf extends EntityTameable { public float getTailRotation() { return this.isAngry() ? 1.5393804F : (this.isTamed() - ? (0.55F - (20.0F - this.dataWatcher.getWatchableObjectFloat(18)) * 0.02F) * 3.1415927F + ? (0.55F - (20.0F - this.dataWatcher.getWatchableObjectFloat(14)) * 0.02F) * 3.1415927F : 0.62831855F); } @@ -485,7 +488,7 @@ public class EntityWolf extends EntityTameable { * Determines whether this wolf is angry or not. */ public boolean isAngry() { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + return (this.dataWatcher.getWatchableObjectByte(12) & 2) != 0; } /** @@ -493,17 +496,17 @@ public class EntityWolf extends EntityTameable { * Sets whether this wolf is angry or not. */ public void setAngry(boolean angry) { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); + byte b0 = this.dataWatcher.getWatchableObjectByte(12); if (angry) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + this.dataWatcher.updateObject(12, Byte.valueOf((byte) (b0 | 2))); } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); + this.dataWatcher.updateObject(12, Byte.valueOf((byte) (b0 & -3))); } } public EnumDyeColor getCollarColor() { - return EnumDyeColor.byDyeDamage(this.dataWatcher.getWatchableObjectByte(20) & 15); + return EnumDyeColor.byDyeDamage(this.dataWatcher.getWatchableObjectVarint(16) & 15); } public void setCollarColor(EnumDyeColor collarcolor) { @@ -512,9 +515,10 @@ public class EntityWolf extends EntityTameable { public EntityWolf createChild(EntityAgeable var1) { EntityWolf entitywolf = new EntityWolf(this.worldObj); - String s = this.getOwnerId(); - if (s != null && s.trim().length() > 0) { - entitywolf.setOwnerId(s); + EaglercraftUUID uuid = this.getOwnerId(); + + if (uuid != null) { + entitywolf.setOwnerId(uuid); entitywolf.setTamed(true); } @@ -523,9 +527,9 @@ public class EntityWolf extends EntityTameable { public void setBegging(boolean beg) { if (beg) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + this.dataWatcher.updateObject(15, Boolean.valueOf(true)); } else { - this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); + this.dataWatcher.updateObject(15, Boolean.valueOf(false)); } } @@ -550,7 +554,7 @@ public class EntityWolf extends EntityTameable { } public boolean isBegging() { - return this.dataWatcher.getWatchableObjectByte(19) == 1; + return this.dataWatcher.getWatchableObjectBoolean(15); } /** diff --git a/src/main/java/net/minecraft/entity/player/EntityPlayer.java b/src/main/java/net/minecraft/entity/player/EntityPlayer.java index 3e54d10..eb6919e 100644 --- a/src/main/java/net/minecraft/entity/player/EntityPlayer.java +++ b/src/main/java/net/minecraft/entity/player/EntityPlayer.java @@ -70,6 +70,7 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHandSide; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.FoodStats; import net.minecraft.util.IChatComponent; @@ -80,6 +81,7 @@ import net.minecraft.world.IInteractionObject; import net.minecraft.world.LockCode; import net.minecraft.world.World; import net.minecraft.world.WorldSettings; +import net.minecraft.entity.DataWatcher; /** * + @@ -179,14 +181,24 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS super.applyEntityAttributes(); this.getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(1.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.10000000149011612D); + this.getAttributeMap().registerAttribute(SharedMonsterAttributes.ATTACK_SPEED); + this.getAttributeMap().registerAttribute(SharedMonsterAttributes.LUCK); } protected void entityInit() { super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); - this.dataWatcher.addObject(17, Float.valueOf(0.0F)); - this.dataWatcher.addObject(18, Integer.valueOf(0)); - this.dataWatcher.addObject(10, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(10, Float.valueOf(0.0F), DataWatcher.Types.FLOAT); + this.dataWatcher.addObject(11, Integer.valueOf(0), DataWatcher.Types.VARINT); + this.dataWatcher.addObject(12, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); + this.dataWatcher.addObject(13, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); // TODO: implement offhand + } + + public EnumHandSide getPrimaryHand() { + return this.dataWatcher.getWatchableObjectByte(13) == 0 ? EnumHandSide.LEFT : EnumHandSide.RIGHT; + } + + public void setPrimaryHand(EnumHandSide hand) { + this.dataWatcher.updateObject(13, Byte.valueOf((byte) (hand == EnumHandSide.LEFT ? 0 : 1))); } /** @@ -633,7 +645,7 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS } public int getScore() { - return this.dataWatcher.getWatchableObjectInt(18); + return this.dataWatcher.getWatchableObjectVarint(11); } /** @@ -641,7 +653,7 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS * Set player's score */ public void setScore(int parInt1) { - this.dataWatcher.updateObject(18, Integer.valueOf(parInt1)); + this.dataWatcher.updateObject(11, Integer.valueOf(parInt1)); } /** @@ -650,7 +662,7 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS */ public void addScore(int parInt1) { int i = this.getScore(); - this.dataWatcher.updateObject(18, Integer.valueOf(i + parInt1)); + this.dataWatcher.updateObject(11, Integer.valueOf(i + parInt1)); } /** @@ -1949,7 +1961,7 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS this.xpSeed = entityplayer.xpSeed; this.theInventoryEnderChest = entityplayer.theInventoryEnderChest; - this.getDataWatcher().updateObject(10, Byte.valueOf(entityplayer.getDataWatcher().getWatchableObjectByte(10))); + this.getDataWatcher().updateObject(12, Byte.valueOf(entityplayer.getDataWatcher().getWatchableObjectByte(12))); } /** @@ -2096,11 +2108,11 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS f = 0.0F; } - this.getDataWatcher().updateObject(17, Float.valueOf(f)); + this.getDataWatcher().updateObject(10, Float.valueOf(f)); } public float getAbsorptionAmount() { - return this.getDataWatcher().getWatchableObjectFloat(17); + return this.getDataWatcher().getWatchableObjectFloat(10); } /** diff --git a/src/main/java/net/minecraft/entity/projectile/EntityArrow.java b/src/main/java/net/minecraft/entity/projectile/EntityArrow.java index e961e14..5006bd1 100644 --- a/src/main/java/net/minecraft/entity/projectile/EntityArrow.java +++ b/src/main/java/net/minecraft/entity/projectile/EntityArrow.java @@ -5,6 +5,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; @@ -132,7 +133,7 @@ public class EntityArrow extends Entity implements IProjectile { } protected void entityInit() { - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(5, Byte.valueOf((byte) 0), DataWatcher.Types.BYTE); } /** @@ -564,11 +565,11 @@ public class EntityArrow extends Entity implements IProjectile { * flying behind it. */ public void setIsCritical(boolean critical) { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); + byte b0 = this.dataWatcher.getWatchableObjectByte(5); if (critical) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 1))); + this.dataWatcher.updateObject(5, Byte.valueOf((byte) (b0 | 1))); } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -2))); + this.dataWatcher.updateObject(5, Byte.valueOf((byte) (b0 & -2))); } } @@ -579,7 +580,7 @@ public class EntityArrow extends Entity implements IProjectile { * flying behind it. */ public boolean getIsCritical() { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); + byte b0 = this.dataWatcher.getWatchableObjectByte(5); return (b0 & 1) != 0; } } \ No newline at end of file diff --git a/src/main/java/net/minecraft/entity/projectile/EntityWitherSkull.java b/src/main/java/net/minecraft/entity/projectile/EntityWitherSkull.java index 1780cfc..7d699ca 100644 --- a/src/main/java/net/minecraft/entity/projectile/EntityWitherSkull.java +++ b/src/main/java/net/minecraft/entity/projectile/EntityWitherSkull.java @@ -2,6 +2,7 @@ package net.minecraft.entity.projectile; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.DataWatcher; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.boss.EntityWither; import net.minecraft.potion.Potion; @@ -150,7 +151,7 @@ public class EntityWitherSkull extends EntityFireball { } protected void entityInit() { - this.dataWatcher.addObject(10, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(5, Boolean.valueOf(false), DataWatcher.Types.BOOLEAN); } /** @@ -159,7 +160,7 @@ public class EntityWitherSkull extends EntityFireball { * wither boss. */ public boolean isInvulnerable() { - return this.dataWatcher.getWatchableObjectByte(10) == 1; + return this.dataWatcher.getWatchableObjectBoolean(5); } /** @@ -168,6 +169,6 @@ public class EntityWitherSkull extends EntityFireball { * wither boss. */ public void setInvulnerable(boolean invulnerable) { - this.dataWatcher.updateObject(10, Byte.valueOf((byte) (invulnerable ? 1 : 0))); + this.dataWatcher.updateObject(5, Boolean.valueOf(invulnerable)); } } \ No newline at end of file diff --git a/src/main/java/net/minecraft/item/ItemBlock.java b/src/main/java/net/minecraft/item/ItemBlock.java index d9262e2..c45aed8 100644 --- a/src/main/java/net/minecraft/item/ItemBlock.java +++ b/src/main/java/net/minecraft/item/ItemBlock.java @@ -3,6 +3,8 @@ package net.minecraft.item; import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -12,6 +14,7 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; /** @@ -86,11 +89,20 @@ public class ItemBlock extends Item { setTileEntityNBT(world, entityplayer, blockpos, itemstack); this.block.onBlockPlacedBy(world, blockpos, iblockstate1, entityplayer, itemstack); } - - world.playSoundEffect((double) ((float) blockpos.getX() + 0.5F), - (double) ((float) blockpos.getY() + 0.5F), (double) ((float) blockpos.getZ() + 0.5F), - this.block.stepSound.getPlaceSound(), (this.block.stepSound.getVolume() + 1.0F) / 2.0F, - this.block.stepSound.getFrequency() * 0.8F); + System.out.println( + "Placed block at " + blockpos.getX() + ", " + blockpos.getY() + ", " + blockpos.getZ()); + // ! fix sounds + // world.playSoundEffect((double) ((float) blockpos.getX() + 0.5F), + // (double) ((float) blockpos.getY() + 0.5F), (double) ((float) blockpos.getZ() + // + 0.5F), + // this.block.stepSound.getPlaceSound(), (this.block.stepSound.getVolume() + + // 1.0F) / 2.0F, + // this.block.stepSound.getFrequency() * 0.8F); + Minecraft.getMinecraft().getSoundHandler() + .playSound(new PositionedSoundRecord(new ResourceLocation(block.stepSound.getPlaceSound()), + (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getFrequency() * 0.8F, + (float) blockpos.getX() + 0.5F, (float) blockpos.getY() + 0.5F, + (float) blockpos.getZ() + 0.5F)); --itemstack.stackSize; } diff --git a/src/main/java/net/minecraft/nbt/NBTUtil.java b/src/main/java/net/minecraft/nbt/NBTUtil.java index 9e612ff..1a0e3ff 100644 --- a/src/main/java/net/minecraft/nbt/NBTUtil.java +++ b/src/main/java/net/minecraft/nbt/NBTUtil.java @@ -7,6 +7,7 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile; import net.lax1dude.eaglercraft.v1_8.mojang.authlib.Property; +import net.minecraft.util.BlockPos; import net.minecraft.util.StringUtils; /** @@ -175,4 +176,39 @@ public final class NBTUtil { return parNBTBase.equals(parNBTBase2); } } + + /** + * Creates a new NBTTagCompound which stores a UUID. + */ + public static NBTTagCompound createUUIDTag(EaglercraftUUID uuid) { + NBTTagCompound nbttagcompound = new NBTTagCompound(); + nbttagcompound.setLong("M", uuid.getMostSignificantBits()); + nbttagcompound.setLong("L", uuid.getLeastSignificantBits()); + return nbttagcompound; + } + + /** + * Reads a UUID from the passed NBTTagCompound. + */ + public static EaglercraftUUID getUUIDFromTag(NBTTagCompound tag) { + return new EaglercraftUUID(tag.getLong("M"), tag.getLong("L")); + } + + /** + * Creates a BlockPos object from the data stored in the passed NBTTagCompound. + */ + public static BlockPos getPosFromTag(NBTTagCompound tag) { + return new BlockPos(tag.getInteger("X"), tag.getInteger("Y"), tag.getInteger("Z")); + } + + /** + * Creates a new NBTTagCompound from a BlockPos. + */ + public static NBTTagCompound createPosTag(BlockPos pos) { + NBTTagCompound nbttagcompound = new NBTTagCompound(); + nbttagcompound.setInteger("X", pos.getX()); + nbttagcompound.setInteger("Y", pos.getY()); + nbttagcompound.setInteger("Z", pos.getZ()); + return nbttagcompound; + } } \ No newline at end of file diff --git a/src/main/java/net/minecraft/network/EnumConnectionState.java b/src/main/java/net/minecraft/network/EnumConnectionState.java index b86de0e..42ea3e5 100644 --- a/src/main/java/net/minecraft/network/EnumConnectionState.java +++ b/src/main/java/net/minecraft/network/EnumConnectionState.java @@ -90,7 +90,6 @@ import net.minecraft.network.play.server.S2FPacketSetSlot; import net.minecraft.network.play.server.S30PacketWindowItems; import net.minecraft.network.play.server.S31PacketWindowProperty; import net.minecraft.network.play.server.S32PacketConfirmTransaction; -import net.minecraft.network.play.server.S33PacketUpdateSign; import net.minecraft.network.play.server.S34PacketMaps; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.network.play.server.S36PacketSignEditorOpen; @@ -112,7 +111,6 @@ import net.minecraft.network.play.server.S45PacketTitle; import net.minecraft.network.play.server.S46PacketSetCompressionLevel; import net.minecraft.network.play.server.S47PacketPlayerListHeaderFooter; import net.minecraft.network.play.server.S48PacketResourcePackSend; -import net.minecraft.network.play.server.S49PacketUpdateEntityNBT; import net.minecraft.network.play.server.SPacketBossBar; import net.minecraft.network.play.server.SPacketSetCooldown; import net.minecraft.network.play.server.SPacketSetPassengers; @@ -231,7 +229,6 @@ public enum EnumConnectionState { this.registerPacket(EnumPacketDirection.CLIENTBOUND, S05PacketSpawnPosition.class); this.registerPacket(EnumPacketDirection.CLIENTBOUND, S03PacketTimeUpdate.class); this.registerPacket(EnumPacketDirection.CLIENTBOUND, S45PacketTitle.class); - this.registerPacket(EnumPacketDirection.CLIENTBOUND, S33PacketUpdateSign.class); this.registerPacket(EnumPacketDirection.CLIENTBOUND, SPacketSoundEffect.class); this.registerPacket(EnumPacketDirection.CLIENTBOUND, S47PacketPlayerListHeaderFooter.class); this.registerPacket(EnumPacketDirection.CLIENTBOUND, S0DPacketCollectItem.class); @@ -240,7 +237,6 @@ public enum EnumConnectionState { this.registerPacket(EnumPacketDirection.CLIENTBOUND, S1DPacketEntityEffect.class); this.registerPacket(EnumPacketDirection.CLIENTBOUND, S46PacketSetCompressionLevel.class); - this.registerPacket(EnumPacketDirection.CLIENTBOUND, S49PacketUpdateEntityNBT.class); this.registerPacket(EnumPacketDirection.SERVERBOUND, CPacketConfirmTeleport.class); this.registerPacket(EnumPacketDirection.SERVERBOUND, C14PacketTabComplete.class); diff --git a/src/main/java/net/minecraft/network/play/INetHandlerPlayClient.java b/src/main/java/net/minecraft/network/play/INetHandlerPlayClient.java index ab6d5ad..10d2f9f 100644 --- a/src/main/java/net/minecraft/network/play/INetHandlerPlayClient.java +++ b/src/main/java/net/minecraft/network/play/INetHandlerPlayClient.java @@ -48,7 +48,6 @@ import net.minecraft.network.play.server.S2FPacketSetSlot; import net.minecraft.network.play.server.S30PacketWindowItems; import net.minecraft.network.play.server.S31PacketWindowProperty; import net.minecraft.network.play.server.S32PacketConfirmTransaction; -import net.minecraft.network.play.server.S33PacketUpdateSign; import net.minecraft.network.play.server.S34PacketMaps; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.network.play.server.S36PacketSignEditorOpen; @@ -70,7 +69,7 @@ import net.minecraft.network.play.server.S45PacketTitle; import net.minecraft.network.play.server.S46PacketSetCompressionLevel; import net.minecraft.network.play.server.S47PacketPlayerListHeaderFooter; import net.minecraft.network.play.server.S48PacketResourcePackSend; -import net.minecraft.network.play.server.S49PacketUpdateEntityNBT; +import net.minecraft.network.play.server.SPacketSoundEffect; import net.minecraft.network.play.server.SPacketUnloadChunk; /** @@ -454,12 +453,6 @@ public interface INetHandlerPlayClient extends INetHandler { void handleTimeUpdate(S03PacketTimeUpdate var1); - /** - * + - * Updates a specified sign with the specified text lines - */ - void handleUpdateSign(S33PacketUpdateSign var1); - void handleSoundEffect(S29PacketSoundEffect var1); void handleCollectItem(S0DPacketCollectItem var1); @@ -500,7 +493,7 @@ public interface INetHandlerPlayClient extends INetHandler { void handleResourcePack(S48PacketResourcePackSend var1); - void handleEntityNBT(S49PacketUpdateEntityNBT var1); - void handleUnloadChunk(SPacketUnloadChunk var1); + + void handleSoundEffectNew(SPacketSoundEffect var1); } \ No newline at end of file diff --git a/src/main/java/net/minecraft/network/play/client/C02PacketUseEntity.java b/src/main/java/net/minecraft/network/play/client/C02PacketUseEntity.java index 8177ac6..69f2724 100644 --- a/src/main/java/net/minecraft/network/play/client/C02PacketUseEntity.java +++ b/src/main/java/net/minecraft/network/play/client/C02PacketUseEntity.java @@ -83,6 +83,9 @@ public class C02PacketUseEntity implements Packet { parPacketBuffer.writeFloat((float) this.hitVec.zCoord); } + if (this.action == C02PacketUseEntity.Action.INTERACT || this.action == C02PacketUseEntity.Action.INTERACT_AT) { + parPacketBuffer.writeVarIntToBuffer(0); // TODO: implement offhand + } } /** diff --git a/src/main/java/net/minecraft/network/play/server/S01PacketJoinGame.java b/src/main/java/net/minecraft/network/play/server/S01PacketJoinGame.java index 76fec80..16f1048 100644 --- a/src/main/java/net/minecraft/network/play/server/S01PacketJoinGame.java +++ b/src/main/java/net/minecraft/network/play/server/S01PacketJoinGame.java @@ -73,7 +73,7 @@ public class S01PacketJoinGame implements Packet { this.hardcoreMode = (i & 8) == 8; i = i & -9; this.gameType = WorldSettings.GameType.getByID(i); - this.dimension = parPacketBuffer.readByte(); + this.dimension = parPacketBuffer.readInt(); this.difficulty = EnumDifficulty.getDifficultyEnum(parPacketBuffer.readUnsignedByte()); this.maxPlayers = parPacketBuffer.readUnsignedByte(); this.worldType = WorldType.parseWorldType(parPacketBuffer.readStringFromBuffer(16)); @@ -96,7 +96,7 @@ public class S01PacketJoinGame implements Packet { } parPacketBuffer.writeByte(i); - parPacketBuffer.writeByte(this.dimension); + parPacketBuffer.writeInt(this.dimension); parPacketBuffer.writeByte(this.difficulty.getDifficultyId()); parPacketBuffer.writeByte(this.maxPlayers); parPacketBuffer.writeString(this.worldType.getWorldTypeName()); diff --git a/src/main/java/net/minecraft/network/play/server/S04PacketEntityEquipment.java b/src/main/java/net/minecraft/network/play/server/S04PacketEntityEquipment.java index 4a63316..6ffd691 100644 --- a/src/main/java/net/minecraft/network/play/server/S04PacketEntityEquipment.java +++ b/src/main/java/net/minecraft/network/play/server/S04PacketEntityEquipment.java @@ -58,7 +58,7 @@ public class S04PacketEntityEquipment implements Packet { */ public void readPacketData(PacketBuffer parPacketBuffer) throws IOException { this.entityID = parPacketBuffer.readVarIntFromBuffer(); - this.equipmentSlot = parPacketBuffer.readShort(); + this.equipmentSlot = parPacketBuffer.readVarIntFromBuffer(); if (this.equipmentSlot > 0) { this.equipmentSlot--; } @@ -71,7 +71,7 @@ public class S04PacketEntityEquipment implements Packet { */ public void writePacketData(PacketBuffer parPacketBuffer) throws IOException { parPacketBuffer.writeVarIntToBuffer(this.entityID); - parPacketBuffer.writeShort(this.equipmentSlot > 0 ? this.equipmentSlot + 1 : this.equipmentSlot); + parPacketBuffer.writeVarIntToBuffer(this.equipmentSlot > 0 ? this.equipmentSlot + 1 : this.equipmentSlot); parPacketBuffer.writeItemStackToBuffer(this.itemStack); } diff --git a/src/main/java/net/minecraft/network/play/server/S0FPacketSpawnMob.java b/src/main/java/net/minecraft/network/play/server/S0FPacketSpawnMob.java index 7a2c91d..58592c4 100644 --- a/src/main/java/net/minecraft/network/play/server/S0FPacketSpawnMob.java +++ b/src/main/java/net/minecraft/network/play/server/S0FPacketSpawnMob.java @@ -111,6 +111,7 @@ public class S0FPacketSpawnMob implements Packet { */ public void readPacketData(PacketBuffer parPacketBuffer) throws IOException { this.entityId = parPacketBuffer.readVarIntFromBuffer(); + this.uniqueId = parPacketBuffer.readUuid(); this.type = parPacketBuffer.readByte() & 255; this.x = parPacketBuffer.readDouble(); this.y = parPacketBuffer.readDouble(); @@ -130,6 +131,7 @@ public class S0FPacketSpawnMob implements Packet { */ public void writePacketData(PacketBuffer parPacketBuffer) throws IOException { parPacketBuffer.writeVarIntToBuffer(this.entityId); + parPacketBuffer.writeUuid(this.uniqueId); parPacketBuffer.writeByte(this.type & 255); parPacketBuffer.writeDouble(this.x); parPacketBuffer.writeDouble(this.y); diff --git a/src/main/java/net/minecraft/network/play/server/S21PacketChunkData.java b/src/main/java/net/minecraft/network/play/server/S21PacketChunkData.java index 2fdbe5d..34f4365 100644 --- a/src/main/java/net/minecraft/network/play/server/S21PacketChunkData.java +++ b/src/main/java/net/minecraft/network/play/server/S21PacketChunkData.java @@ -86,9 +86,7 @@ public class S21PacketChunkData implements Packet { this.chunkZ = buf.readInt(); this.loadChunk = buf.readBoolean(); this.availableSections = buf.readVarIntFromBuffer(); - System.out.println("Was able to read first varint"); int i = buf.readVarIntFromBuffer(); - System.out.println("Was able to read second varint"); if (i > 2097152) { throw new RuntimeException("Chunk Packet trying to allocate too much memory on read."); @@ -96,7 +94,6 @@ public class S21PacketChunkData implements Packet { this.buffer = new byte[i]; buf.readBytes(this.buffer); int j = buf.readVarIntFromBuffer(); - System.out.println("Was able to read third varint"); this.field_189557_e = Lists.newArrayList(); for (int k = 0; k < j; ++k) { diff --git a/src/main/java/net/minecraft/network/play/server/S30PacketWindowItems.java b/src/main/java/net/minecraft/network/play/server/S30PacketWindowItems.java index b4a81c6..938c7da 100644 --- a/src/main/java/net/minecraft/network/play/server/S30PacketWindowItems.java +++ b/src/main/java/net/minecraft/network/play/server/S30PacketWindowItems.java @@ -62,6 +62,8 @@ public class S30PacketWindowItems implements Packet { public void readPacketData(PacketBuffer parPacketBuffer) throws IOException { this.windowId = parPacketBuffer.readUnsignedByte(); short short1 = parPacketBuffer.readShort(); + if (short1 == 45) + short1 = 44; // TODO: implement offhand this.itemStacks = new ItemStack[short1]; for (int i = 0; i < short1; ++i) { diff --git a/src/main/java/net/minecraft/network/play/server/S33PacketUpdateSign.java b/src/main/java/net/minecraft/network/play/server/S33PacketUpdateSign.java deleted file mode 100644 index d3dd79b..0000000 --- a/src/main/java/net/minecraft/network/play/server/S33PacketUpdateSign.java +++ /dev/null @@ -1,97 +0,0 @@ -package net.minecraft.network.play.server; - -import java.io.IOException; - -import net.minecraft.network.Packet; -import net.minecraft.network.PacketBuffer; -import net.minecraft.network.play.INetHandlerPlayClient; -import net.minecraft.util.BlockPos; -import net.minecraft.util.IChatComponent; -import net.minecraft.world.World; - -/** - * + - * This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. - * - * Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" - * Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team - * - * EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, hoosiertransfer, - * ayunami2000. All Rights Reserved. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. - * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - */ -public class S33PacketUpdateSign implements Packet { - private World world; - private BlockPos blockPos; - private IChatComponent[] lines; - - public S33PacketUpdateSign() { - } - - public S33PacketUpdateSign(World worldIn, BlockPos blockPosIn, IChatComponent[] linesIn) { - this.world = worldIn; - this.blockPos = blockPosIn; - this.lines = new IChatComponent[] { linesIn[0], linesIn[1], linesIn[2], linesIn[3] }; - } - - /** - * + - * Reads the raw packet data from the data stream. - */ - public void readPacketData(PacketBuffer parPacketBuffer) throws IOException { - this.blockPos = parPacketBuffer.readBlockPos(); - this.lines = new IChatComponent[4]; - - for (int i = 0; i < 4; ++i) { - this.lines[i] = parPacketBuffer.readChatComponent(); - } - - } - - /** - * + - * Writes the raw packet data to the data stream. - */ - public void writePacketData(PacketBuffer parPacketBuffer) throws IOException { - parPacketBuffer.writeBlockPos(this.blockPos); - - for (int i = 0; i < 4; ++i) { - parPacketBuffer.writeChatComponent(this.lines[i]); - } - - } - - /** - * + - * Passes this Packet on to the NetHandler for processing. - */ - public void processPacket(INetHandlerPlayClient inethandlerplayclient) { - inethandlerplayclient.handleUpdateSign(this); - } - - public BlockPos getPos() { - return this.blockPos; - } - - public IChatComponent[] getLines() { - return this.lines; - } -} \ No newline at end of file diff --git a/src/main/java/net/minecraft/network/play/server/S49PacketUpdateEntityNBT.java b/src/main/java/net/minecraft/network/play/server/S49PacketUpdateEntityNBT.java deleted file mode 100644 index 9c9884f..0000000 --- a/src/main/java/net/minecraft/network/play/server/S49PacketUpdateEntityNBT.java +++ /dev/null @@ -1,88 +0,0 @@ -package net.minecraft.network.play.server; - -import java.io.IOException; - -import net.minecraft.entity.Entity; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.Packet; -import net.minecraft.network.PacketBuffer; -import net.minecraft.network.play.INetHandlerPlayClient; -import net.minecraft.world.World; - -/** - * + - * This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. - * - * Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" - * Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team - * - * EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, hoosiertransfer, - * ayunami2000. All Rights Reserved. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. - * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - */ - -@Deprecated -public class S49PacketUpdateEntityNBT implements Packet { - private int entityId; - private NBTTagCompound tagCompound; - - public S49PacketUpdateEntityNBT() { - } - - public S49PacketUpdateEntityNBT(int entityIdIn, NBTTagCompound tagCompoundIn) { - this.entityId = entityIdIn; - this.tagCompound = tagCompoundIn; - } - - /** - * + - * Reads the raw packet data from the data stream. - */ - public void readPacketData(PacketBuffer parPacketBuffer) throws IOException { - this.entityId = parPacketBuffer.readVarIntFromBuffer(); - this.tagCompound = parPacketBuffer.readNBTTagCompoundFromBuffer(); - } - - /** - * + - * Writes the raw packet data to the data stream. - */ - public void writePacketData(PacketBuffer parPacketBuffer) throws IOException { - parPacketBuffer.writeVarIntToBuffer(this.entityId); - parPacketBuffer.writeNBTTagCompoundToBuffer(this.tagCompound); - } - - /** - * + - * Passes this Packet on to the NetHandler for processing. - */ - public void processPacket(INetHandlerPlayClient inethandlerplayclient) { - inethandlerplayclient.handleEntityNBT(this); - } - - public NBTTagCompound getTagCompound() { - return this.tagCompound; - } - - public Entity getEntity(World worldIn) { - return worldIn.getEntityByID(this.entityId); - } -} \ No newline at end of file diff --git a/src/main/java/net/minecraft/network/play/server/SPacketSoundEffect.java b/src/main/java/net/minecraft/network/play/server/SPacketSoundEffect.java index 490aa61..a77b69b 100644 --- a/src/main/java/net/minecraft/network/play/server/SPacketSoundEffect.java +++ b/src/main/java/net/minecraft/network/play/server/SPacketSoundEffect.java @@ -1,7 +1,97 @@ package net.minecraft.network.play.server; -import net.minecraft.network.PlaceholderPacket; +import java.io.IOException; +import net.minecraft.network.Packet; +import net.minecraft.network.PacketBuffer; +import net.minecraft.network.play.INetHandlerPlayClient; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvent; +import net.minecraft.util.MathHelper; +import org.apache.commons.lang3.Validate; -public class SPacketSoundEffect extends PlaceholderPacket { - +public class SPacketSoundEffect implements Packet { + private SoundEvent sound; + private SoundCategory category; + private int posX; + private int posY; + private int posZ; + private float soundVolume; + private int soundPitch; + + public SPacketSoundEffect() { + } + + public SPacketSoundEffect(SoundEvent soundIn, SoundCategory categoryIn, double xIn, double yIn, double zIn, + float volumeIn, float pitchIn) { + Validate.notNull(soundIn, "sound", new Object[0]); + this.sound = soundIn; + this.category = categoryIn; + this.posX = (int) (xIn * 8.0D); + this.posY = (int) (yIn * 8.0D); + this.posZ = (int) (zIn * 8.0D); + this.soundVolume = volumeIn; + this.soundPitch = (int) (pitchIn * 63.0F); + pitchIn = MathHelper.clamp_float(pitchIn, 0.0F, 255.0F); + } + + /** + * Reads the raw packet data from the data stream. + */ + public void readPacketData(PacketBuffer buf) throws IOException { + this.sound = (SoundEvent) SoundEvent.REGISTRY.getObjectById(buf.readVarIntFromBuffer()); + this.category = (SoundCategory) buf.readEnumValue(SoundCategory.class); + this.posX = buf.readInt(); + this.posY = buf.readInt(); + this.posZ = buf.readInt(); + this.soundVolume = buf.readFloat(); + this.soundPitch = buf.readUnsignedByte(); + } + + /** + * Writes the raw packet data to the data stream. + */ + public void writePacketData(PacketBuffer buf) throws IOException { + buf.writeVarIntToBuffer(SoundEvent.REGISTRY.getIDForObject(this.sound)); + buf.writeEnumValue(this.category); + buf.writeInt(this.posX); + buf.writeInt(this.posY); + buf.writeInt(this.posZ); + buf.writeFloat(this.soundVolume); + buf.writeByte(this.soundPitch); + } + + public SoundEvent getSound() { + return this.sound; + } + + public SoundCategory getCategory() { + return this.category; + } + + public double getX() { + return (double) ((float) this.posX / 8.0F); + } + + public double getY() { + return (double) ((float) this.posY / 8.0F); + } + + public double getZ() { + return (double) ((float) this.posZ / 8.0F); + } + + public float getVolume() { + return this.soundVolume; + } + + public float getPitch() { + return (float) this.soundPitch / 63.0F; + } + + /** + * Passes this Packet on to the NetHandler for processing. + */ + public void processPacket(INetHandlerPlayClient handler) { + handler.handleSoundEffectNew(this); + } } diff --git a/src/main/java/net/minecraft/tileentity/TileEntitySign.java b/src/main/java/net/minecraft/tileentity/TileEntitySign.java index dfbb053..5cadb17 100644 --- a/src/main/java/net/minecraft/tileentity/TileEntitySign.java +++ b/src/main/java/net/minecraft/tileentity/TileEntitySign.java @@ -8,7 +8,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.event.ClickEvent; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S33PacketUpdateSign; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.server.MinecraftServer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentProcessor; @@ -74,6 +74,19 @@ public class TileEntitySign extends TileEntity { this.stats.writeStatsToNBT(nbttagcompound); } + public NBTTagCompound writeToNBTAndReturnCompound(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + + for (int i = 0; i < 4; ++i) { + String s = IChatComponent.Serializer.componentToJson(this.signText[i]); + nbttagcompound.setString("Text" + (i + 1), s); + } + + this.stats.writeStatsToNBT(nbttagcompound); + + return nbttagcompound; + } + public void readFromNBT(NBTTagCompound nbttagcompound) { this.isEditable = false; super.readFromNBT(nbttagcompound); @@ -145,10 +158,12 @@ public class TileEntitySign extends TileEntity { * to the client easily. For example this is used by signs to * synchronise the text to be displayed. */ - public Packet getDescriptionPacket() { - IChatComponent[] aichatcomponent = new IChatComponent[4]; - System.arraycopy(this.signText, 0, aichatcomponent, 0, 4); - return new S33PacketUpdateSign(this.worldObj, this.pos, aichatcomponent); + public S35PacketUpdateTileEntity getDescriptionPacket() { + return new S35PacketUpdateTileEntity(this.pos, 9, this.func_189517_E_()); + } + + public NBTTagCompound func_189517_E_() { + return this.writeToNBTAndReturnCompound(new NBTTagCompound()); } public boolean func_183000_F() { diff --git a/src/main/java/net/minecraft/util/SoundEvent.java b/src/main/java/net/minecraft/util/SoundEvent.java new file mode 100644 index 0000000..0ace98c --- /dev/null +++ b/src/main/java/net/minecraft/util/SoundEvent.java @@ -0,0 +1,471 @@ +package net.minecraft.util; + +public class SoundEvent { + public static final RegistryNamespaced REGISTRY = new RegistryNamespaced(); + private final ResourceLocation soundName; + private static int soundEventId = 0; + + public SoundEvent(ResourceLocation soundNameIn) { + this.soundName = soundNameIn; + } + + public ResourceLocation getSoundName() { + return this.soundName; + } + + public static SoundEvent getFromName(ResourceLocation name) { + return REGISTRY.getObject(name); + } + + public static void registerSounds() { + registerSound("ambient.cave"); + registerSound("block.anvil.break"); + registerSound("block.anvil.destroy"); + registerSound("block.anvil.fall"); + registerSound("block.anvil.hit"); + registerSound("block.anvil.land"); + registerSound("block.anvil.place"); + registerSound("block.anvil.step"); + registerSound("block.anvil.use"); + registerSound("block.brewing_stand.brew"); + registerSound("block.chest.close"); + registerSound("block.chest.locked"); + registerSound("block.chest.open"); + registerSound("block.chorus_flower.death"); + registerSound("block.chorus_flower.grow"); + registerSound("block.cloth.break"); + registerSound("block.cloth.fall"); + registerSound("block.cloth.hit"); + registerSound("block.cloth.place"); + registerSound("block.cloth.step"); + registerSound("block.comparator.click"); + registerSound("block.dispenser.dispense"); + registerSound("block.dispenser.fail"); + registerSound("block.dispenser.launch"); + registerSound("block.end_gateway.spawn"); + registerSound("block.enderchest.close"); + registerSound("block.enderchest.open"); + registerSound("block.fence_gate.close"); + registerSound("block.fence_gate.open"); + registerSound("block.fire.ambient"); + registerSound("block.fire.extinguish"); + registerSound("block.furnace.fire_crackle"); + registerSound("block.glass.break"); + registerSound("block.glass.fall"); + registerSound("block.glass.hit"); + registerSound("block.glass.place"); + registerSound("block.glass.step"); + registerSound("block.grass.break"); + registerSound("block.grass.fall"); + registerSound("block.grass.hit"); + registerSound("block.grass.place"); + registerSound("block.grass.step"); + registerSound("block.gravel.break"); + registerSound("block.gravel.fall"); + registerSound("block.gravel.hit"); + registerSound("block.gravel.place"); + registerSound("block.gravel.step"); + registerSound("block.iron_door.close"); + registerSound("block.iron_door.open"); + registerSound("block.iron_trapdoor.close"); + registerSound("block.iron_trapdoor.open"); + registerSound("block.ladder.break"); + registerSound("block.ladder.fall"); + registerSound("block.ladder.hit"); + registerSound("block.ladder.place"); + registerSound("block.ladder.step"); + registerSound("block.lava.ambient"); + registerSound("block.lava.extinguish"); + registerSound("block.lava.pop"); + registerSound("block.lever.click"); + registerSound("block.metal.break"); + registerSound("block.metal.fall"); + registerSound("block.metal.hit"); + registerSound("block.metal.place"); + registerSound("block.metal.step"); + registerSound("block.metal_pressureplate.click_off"); + registerSound("block.metal_pressureplate.click_on"); + registerSound("block.note.basedrum"); + registerSound("block.note.bass"); + registerSound("block.note.harp"); + registerSound("block.note.hat"); + registerSound("block.note.pling"); + registerSound("block.note.snare"); + registerSound("block.piston.contract"); + registerSound("block.piston.extend"); + registerSound("block.portal.ambient"); + registerSound("block.portal.travel"); + registerSound("block.portal.trigger"); + registerSound("block.redstone_torch.burnout"); + registerSound("block.sand.break"); + registerSound("block.sand.fall"); + registerSound("block.sand.hit"); + registerSound("block.sand.place"); + registerSound("block.sand.step"); + registerSound("block.slime.break"); + registerSound("block.slime.fall"); + registerSound("block.slime.hit"); + registerSound("block.slime.place"); + registerSound("block.slime.step"); + registerSound("block.snow.break"); + registerSound("block.snow.fall"); + registerSound("block.snow.hit"); + registerSound("block.snow.place"); + registerSound("block.snow.step"); + registerSound("block.stone.break"); + registerSound("block.stone.fall"); + registerSound("block.stone.hit"); + registerSound("block.stone.place"); + registerSound("block.stone.step"); + registerSound("block.stone_button.click_off"); + registerSound("block.stone_button.click_on"); + registerSound("block.stone_pressureplate.click_off"); + registerSound("block.stone_pressureplate.click_on"); + registerSound("block.tripwire.attach"); + registerSound("block.tripwire.click_off"); + registerSound("block.tripwire.click_on"); + registerSound("block.tripwire.detach"); + registerSound("block.water.ambient"); + registerSound("block.waterlily.place"); + registerSound("block.wood.break"); + registerSound("block.wood.fall"); + registerSound("block.wood.hit"); + registerSound("block.wood.place"); + registerSound("block.wood.step"); + registerSound("block.wood_button.click_off"); + registerSound("block.wood_button.click_on"); + registerSound("block.wood_pressureplate.click_off"); + registerSound("block.wood_pressureplate.click_on"); + registerSound("block.wooden_door.close"); + registerSound("block.wooden_door.open"); + registerSound("block.wooden_trapdoor.close"); + registerSound("block.wooden_trapdoor.open"); + registerSound("enchant.thorns.hit"); + registerSound("entity.armorstand.break"); + registerSound("entity.armorstand.fall"); + registerSound("entity.armorstand.hit"); + registerSound("entity.armorstand.place"); + registerSound("entity.arrow.hit"); + registerSound("entity.arrow.hit_player"); + registerSound("entity.arrow.shoot"); + registerSound("entity.bat.ambient"); + registerSound("entity.bat.death"); + registerSound("entity.bat.hurt"); + registerSound("entity.bat.loop"); + registerSound("entity.bat.takeoff"); + registerSound("entity.blaze.ambient"); + registerSound("entity.blaze.burn"); + registerSound("entity.blaze.death"); + registerSound("entity.blaze.hurt"); + registerSound("entity.blaze.shoot"); + registerSound("entity.bobber.splash"); + registerSound("entity.bobber.throw"); + registerSound("entity.cat.ambient"); + registerSound("entity.cat.death"); + registerSound("entity.cat.hiss"); + registerSound("entity.cat.hurt"); + registerSound("entity.cat.purr"); + registerSound("entity.cat.purreow"); + registerSound("entity.chicken.ambient"); + registerSound("entity.chicken.death"); + registerSound("entity.chicken.egg"); + registerSound("entity.chicken.hurt"); + registerSound("entity.chicken.step"); + registerSound("entity.cow.ambient"); + registerSound("entity.cow.death"); + registerSound("entity.cow.hurt"); + registerSound("entity.cow.milk"); + registerSound("entity.cow.step"); + registerSound("entity.creeper.death"); + registerSound("entity.creeper.hurt"); + registerSound("entity.creeper.primed"); + registerSound("entity.donkey.ambient"); + registerSound("entity.donkey.angry"); + registerSound("entity.donkey.chest"); + registerSound("entity.donkey.death"); + registerSound("entity.donkey.hurt"); + registerSound("entity.egg.throw"); + registerSound("entity.elder_guardian.ambient"); + registerSound("entity.elder_guardian.ambient_land"); + registerSound("entity.elder_guardian.curse"); + registerSound("entity.elder_guardian.death"); + registerSound("entity.elder_guardian.death_land"); + registerSound("entity.elder_guardian.hurt"); + registerSound("entity.elder_guardian.hurt_land"); + registerSound("entity.enderdragon.ambient"); + registerSound("entity.enderdragon.death"); + registerSound("entity.enderdragon.flap"); + registerSound("entity.enderdragon.growl"); + registerSound("entity.enderdragon.hurt"); + registerSound("entity.enderdragon.shoot"); + registerSound("entity.enderdragon_fireball.explode"); + registerSound("entity.endereye.launch"); + registerSound("entity.endermen.ambient"); + registerSound("entity.endermen.death"); + registerSound("entity.endermen.hurt"); + registerSound("entity.endermen.scream"); + registerSound("entity.endermen.stare"); + registerSound("entity.endermen.teleport"); + registerSound("entity.endermite.ambient"); + registerSound("entity.endermite.death"); + registerSound("entity.endermite.hurt"); + registerSound("entity.endermite.step"); + registerSound("entity.enderpearl.throw"); + registerSound("entity.experience_bottle.throw"); + registerSound("entity.experience_orb.pickup"); + registerSound("entity.experience_orb.touch"); + registerSound("entity.firework.blast"); + registerSound("entity.firework.blast_far"); + registerSound("entity.firework.large_blast"); + registerSound("entity.firework.large_blast_far"); + registerSound("entity.firework.launch"); + registerSound("entity.firework.shoot"); + registerSound("entity.firework.twinkle"); + registerSound("entity.firework.twinkle_far"); + registerSound("entity.generic.big_fall"); + registerSound("entity.generic.burn"); + registerSound("entity.generic.death"); + registerSound("entity.generic.drink"); + registerSound("entity.generic.eat"); + registerSound("entity.generic.explode"); + registerSound("entity.generic.extinguish_fire"); + registerSound("entity.generic.hurt"); + registerSound("entity.generic.small_fall"); + registerSound("entity.generic.splash"); + registerSound("entity.generic.swim"); + registerSound("entity.ghast.ambient"); + registerSound("entity.ghast.death"); + registerSound("entity.ghast.hurt"); + registerSound("entity.ghast.scream"); + registerSound("entity.ghast.shoot"); + registerSound("entity.ghast.warn"); + registerSound("entity.guardian.ambient"); + registerSound("entity.guardian.ambient_land"); + registerSound("entity.guardian.attack"); + registerSound("entity.guardian.death"); + registerSound("entity.guardian.death_land"); + registerSound("entity.guardian.flop"); + registerSound("entity.guardian.hurt"); + registerSound("entity.guardian.hurt_land"); + registerSound("entity.horse.ambient"); + registerSound("entity.horse.angry"); + registerSound("entity.horse.armor"); + registerSound("entity.horse.breathe"); + registerSound("entity.horse.death"); + registerSound("entity.horse.eat"); + registerSound("entity.horse.gallop"); + registerSound("entity.horse.hurt"); + registerSound("entity.horse.jump"); + registerSound("entity.horse.land"); + registerSound("entity.horse.saddle"); + registerSound("entity.horse.step"); + registerSound("entity.horse.step_wood"); + registerSound("entity.hostile.big_fall"); + registerSound("entity.hostile.death"); + registerSound("entity.hostile.hurt"); + registerSound("entity.hostile.small_fall"); + registerSound("entity.hostile.splash"); + registerSound("entity.hostile.swim"); + registerSound("entity.irongolem.attack"); + registerSound("entity.irongolem.death"); + registerSound("entity.irongolem.hurt"); + registerSound("entity.irongolem.step"); + registerSound("entity.item.break"); + registerSound("entity.item.pickup"); + registerSound("entity.itemframe.add_item"); + registerSound("entity.itemframe.break"); + registerSound("entity.itemframe.place"); + registerSound("entity.itemframe.remove_item"); + registerSound("entity.itemframe.rotate_item"); + registerSound("entity.leashknot.break"); + registerSound("entity.leashknot.place"); + registerSound("entity.lightning.impact"); + registerSound("entity.lightning.thunder"); + registerSound("entity.lingeringpotion.throw"); + registerSound("entity.magmacube.death"); + registerSound("entity.magmacube.hurt"); + registerSound("entity.magmacube.jump"); + registerSound("entity.magmacube.squish"); + registerSound("entity.minecart.inside"); + registerSound("entity.minecart.riding"); + registerSound("entity.mooshroom.shear"); + registerSound("entity.mule.ambient"); + registerSound("entity.mule.death"); + registerSound("entity.mule.hurt"); + registerSound("entity.painting.break"); + registerSound("entity.painting.place"); + registerSound("entity.pig.ambient"); + registerSound("entity.pig.death"); + registerSound("entity.pig.hurt"); + registerSound("entity.pig.saddle"); + registerSound("entity.pig.step"); + registerSound("entity.player.attack.crit"); + registerSound("entity.player.attack.knockback"); + registerSound("entity.player.attack.nodamage"); + registerSound("entity.player.attack.strong"); + registerSound("entity.player.attack.sweep"); + registerSound("entity.player.attack.weak"); + registerSound("entity.player.big_fall"); + registerSound("entity.player.breath"); + registerSound("entity.player.burp"); + registerSound("entity.player.death"); + registerSound("entity.player.hurt"); + registerSound("entity.player.levelup"); + registerSound("entity.player.small_fall"); + registerSound("entity.player.splash"); + registerSound("entity.player.swim"); + registerSound("entity.rabbit.ambient"); + registerSound("entity.rabbit.attack"); + registerSound("entity.rabbit.death"); + registerSound("entity.rabbit.hurt"); + registerSound("entity.rabbit.jump"); + registerSound("entity.sheep.ambient"); + registerSound("entity.sheep.death"); + registerSound("entity.sheep.hurt"); + registerSound("entity.sheep.shear"); + registerSound("entity.sheep.step"); + registerSound("entity.shulker.ambient"); + registerSound("entity.shulker.close"); + registerSound("entity.shulker.death"); + registerSound("entity.shulker.hurt"); + registerSound("entity.shulker.hurt_closed"); + registerSound("entity.shulker.open"); + registerSound("entity.shulker.shoot"); + registerSound("entity.shulker.teleport"); + registerSound("entity.shulker_bullet.hit"); + registerSound("entity.shulker_bullet.hurt"); + registerSound("entity.silverfish.ambient"); + registerSound("entity.silverfish.death"); + registerSound("entity.silverfish.hurt"); + registerSound("entity.silverfish.step"); + registerSound("entity.skeleton.ambient"); + registerSound("entity.skeleton.death"); + registerSound("entity.skeleton.hurt"); + registerSound("entity.skeleton.shoot"); + registerSound("entity.skeleton.step"); + registerSound("entity.skeleton_horse.ambient"); + registerSound("entity.skeleton_horse.death"); + registerSound("entity.skeleton_horse.hurt"); + registerSound("entity.slime.attack"); + registerSound("entity.slime.death"); + registerSound("entity.slime.hurt"); + registerSound("entity.slime.jump"); + registerSound("entity.slime.squish"); + registerSound("entity.small_magmacube.death"); + registerSound("entity.small_magmacube.hurt"); + registerSound("entity.small_magmacube.squish"); + registerSound("entity.small_slime.death"); + registerSound("entity.small_slime.hurt"); + registerSound("entity.small_slime.jump"); + registerSound("entity.small_slime.squish"); + registerSound("entity.snowball.throw"); + registerSound("entity.snowman.ambient"); + registerSound("entity.snowman.death"); + registerSound("entity.snowman.hurt"); + registerSound("entity.snowman.shoot"); + registerSound("entity.spider.ambient"); + registerSound("entity.spider.death"); + registerSound("entity.spider.hurt"); + registerSound("entity.spider.step"); + registerSound("entity.splash_potion.break"); + registerSound("entity.splash_potion.throw"); + registerSound("entity.squid.ambient"); + registerSound("entity.squid.death"); + registerSound("entity.squid.hurt"); + registerSound("entity.tnt.primed"); + registerSound("entity.villager.ambient"); + registerSound("entity.villager.death"); + registerSound("entity.villager.hurt"); + registerSound("entity.villager.no"); + registerSound("entity.villager.trading"); + registerSound("entity.villager.yes"); + registerSound("entity.witch.ambient"); + registerSound("entity.witch.death"); + registerSound("entity.witch.drink"); + registerSound("entity.witch.hurt"); + registerSound("entity.witch.throw"); + registerSound("entity.wither.ambient"); + registerSound("entity.wither.break_block"); + registerSound("entity.wither.death"); + registerSound("entity.wither.hurt"); + registerSound("entity.wither.shoot"); + registerSound("entity.wither.spawn"); + registerSound("entity.wolf.ambient"); + registerSound("entity.wolf.death"); + registerSound("entity.wolf.growl"); + registerSound("entity.wolf.howl"); + registerSound("entity.wolf.hurt"); + registerSound("entity.wolf.pant"); + registerSound("entity.wolf.shake"); + registerSound("entity.wolf.step"); + registerSound("entity.wolf.whine"); + registerSound("entity.zombie.ambient"); + registerSound("entity.zombie.attack_door_wood"); + registerSound("entity.zombie.attack_iron_door"); + registerSound("entity.zombie.break_door_wood"); + registerSound("entity.zombie.death"); + registerSound("entity.zombie.hurt"); + registerSound("entity.zombie.infect"); + registerSound("entity.zombie.step"); + registerSound("entity.zombie_horse.ambient"); + registerSound("entity.zombie_horse.death"); + registerSound("entity.zombie_horse.hurt"); + registerSound("entity.zombie_pig.ambient"); + registerSound("entity.zombie_pig.angry"); + registerSound("entity.zombie_pig.death"); + registerSound("entity.zombie_pig.hurt"); + registerSound("entity.zombie_villager.ambient"); + registerSound("entity.zombie_villager.converted"); + registerSound("entity.zombie_villager.cure"); + registerSound("entity.zombie_villager.death"); + registerSound("entity.zombie_villager.hurt"); + registerSound("entity.zombie_villager.step"); + registerSound("item.armor.equip_chain"); + registerSound("item.armor.equip_diamond"); + registerSound("item.armor.equip_generic"); + registerSound("item.armor.equip_gold"); + registerSound("item.armor.equip_iron"); + registerSound("item.armor.equip_leather"); + registerSound("item.bottle.fill"); + registerSound("item.bottle.fill_dragonbreath"); + registerSound("item.bucket.empty"); + registerSound("item.bucket.empty_lava"); + registerSound("item.bucket.fill"); + registerSound("item.bucket.fill_lava"); + registerSound("item.chorus_fruit.teleport"); + registerSound("item.elytra.flying"); + registerSound("item.firecharge.use"); + registerSound("item.flintandsteel.use"); + registerSound("item.hoe.till"); + registerSound("item.shield.block"); + registerSound("item.shield.break"); + registerSound("item.shovel.flatten"); + registerSound("music.creative"); + registerSound("music.credits"); + registerSound("music.dragon"); + registerSound("music.end"); + registerSound("music.game"); + registerSound("music.menu"); + registerSound("music.nether"); + registerSound("record.11"); + registerSound("record.13"); + registerSound("record.blocks"); + registerSound("record.cat"); + registerSound("record.chirp"); + registerSound("record.far"); + registerSound("record.mall"); + registerSound("record.mellohi"); + registerSound("record.stal"); + registerSound("record.strad"); + registerSound("record.wait"); + registerSound("record.ward"); + registerSound("ui.button.click"); + registerSound("weather.rain"); + registerSound("weather.rain.above"); + } + + private static void registerSound(String soundNameIn) { + ResourceLocation resourcelocation = new ResourceLocation(soundNameIn); + REGISTRY.register(soundEventId++, resourcelocation, new SoundEvent(resourcelocation)); + } +}