From 2a3da7e4d032ed9cc8df9c0c7d8def37b5d89e18 Mon Sep 17 00:00:00 2001 From: Zelophed Date: Sun, 19 Jul 2020 17:08:20 +0200 Subject: [PATCH] he do be munching tho -added sounds to the runData again --- src/generated/resources/.cache/cache | 25 +++++++++++-------- .../resources/assets/create/lang/en_us.json | 1 + .../assets/create/lang/unfinished/de_de.json | 3 ++- .../assets/create/lang/unfinished/fr_fr.json | 3 ++- .../assets/create/lang/unfinished/it_it.json | 3 ++- .../assets/create/lang/unfinished/ja_jp.json | 3 ++- .../assets/create/lang/unfinished/ko_kr.json | 3 ++- .../assets/create/lang/unfinished/nl_nl.json | 3 ++- .../assets/create/lang/unfinished/pt_br.json | 3 ++- .../assets/create/lang/unfinished/ru_ru.json | 3 ++- .../assets/create/lang/unfinished/zh_cn.json | 3 ++- .../resources/assets/create/sounds.json | 21 +++++++++++----- .../com/simibubi/create/AllSoundEvents.java | 14 ++++++++--- src/main/java/com/simibubi/create/Create.java | 1 + .../processing/HeaterTileEntity.java | 13 +++++++++- .../assets/create/lang/default/messages.json | 5 ++-- 16 files changed, 75 insertions(+), 32 deletions(-) rename src/{main => generated}/resources/assets/create/sounds.json (91%) diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index b66e30af5..eded6c41e 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -124,6 +124,8 @@ de8a40b7daf1497d5aecee47a43b3e0b1d030b00 assets/create/blockstates/fancy_scoria_ fc9ac0a7e7191b93516719455a17177fa6524ecc assets/create/blockstates/fancy_weathered_limestone_bricks_slab.json b2a7c321b1795f20e7433f81a55ce4683de081b8 assets/create/blockstates/fancy_weathered_limestone_bricks_stairs.json 6372fe02ba0065acb0758121c45a15a1a8fdc5de assets/create/blockstates/fancy_weathered_limestone_bricks_wall.json +d96007df2f19d5af2924dce680ae9bc960a2e6da assets/create/blockstates/fluid_pipe.json +9d0e78a4d6d0ccac37c06d0f5810a800a04844b2 assets/create/blockstates/fluid_tank.json 3df164be441c87d6f869b34b5ab48b6822892ad6 assets/create/blockstates/fluid_pipe.json f0eaab18e16c4f3f65ebf3b55b08f0dc445720fe assets/create/blockstates/fluid_tank.json e9da1794b6ece7f9aa8bcb43d42c23a55446133b assets/create/blockstates/flywheel.json @@ -287,7 +289,7 @@ b7829c2ef2c47188713f8cab21b2c9bc7f9c5b79 assets/create/blockstates/portable_stor e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggle_latch.json 3a739f9d4276828d83f2d2750bf3227c87bcd438 assets/create/blockstates/pulley_magnet.json 469e430d96cb0a5e1aaf6b7cc5d401d488c9e600 assets/create/blockstates/pulse_repeater.json -8d7e653bfd9846e684a0d3725595714a19201017 assets/create/blockstates/radial_chassis.json +4439fc83a8c7370ab44b211a3fd48abde20a4728 assets/create/blockstates/radial_chassis.json 8929677f2cc5354aa19ef182af69f9f0b41eb242 assets/create/blockstates/redstone_contact.json c29213b77ac0c78d8979c5f6188d2b265696f9b9 assets/create/blockstates/redstone_link.json 1eac804cba08aebb5f4646758ae1ef9b32e01365 assets/create/blockstates/reinforced_rail.json @@ -339,16 +341,16 @@ c77b46d8b459e5c7cc495393546f3fcca8a1fa1d assets/create/blockstates/weathered_lim 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json 31c4433a60168ccd2cfcb0e6f7e495684d0d160e assets/create/lang/en_ud.json -f6b3c31a6c3313e089e657c02832a201518d0dbe assets/create/lang/en_us.json -0cf3147b81b1d2103e79b3018c543faba63769a1 assets/create/lang/unfinished/de_de.json -d72b420a82e296afab9807d0183d9e8b6f8544ea assets/create/lang/unfinished/fr_fr.json -30472e049ef4d0fb92c67a2d16aa86f0face99cc assets/create/lang/unfinished/it_it.json -20db786d3ec10bc5e2f097ae31dab75c54a6ab24 assets/create/lang/unfinished/ja_jp.json -ef5dd51b525fbb21b9d9fe6ab9962f619d74aafb assets/create/lang/unfinished/ko_kr.json -f45247c1a75e90a91e798c3869dd633c7476a296 assets/create/lang/unfinished/nl_nl.json -6bf5fd3af396fdb0471c9f5f91d50c98c14eb04d assets/create/lang/unfinished/pt_br.json -1ce817630aefef48c73180965ea8ceb9c91be503 assets/create/lang/unfinished/ru_ru.json -1a8e7e8937270e74726d0d436aacf4fb7cae6b12 assets/create/lang/unfinished/zh_cn.json +13980ec87d4eb2052700af7876a8075654113cad assets/create/lang/en_us.json +0088a8fe37e3240ff4a07adccca19c0f38bb98f2 assets/create/lang/unfinished/de_de.json +65857103f58dc4ea192d89d1c05b660c9e84c648 assets/create/lang/unfinished/fr_fr.json +e3df99124bf6a3d5a49aea948bc062e98f1a8a01 assets/create/lang/unfinished/it_it.json +7af4ca0a0f30e54d24e7817b0e666fcde9ac29be assets/create/lang/unfinished/ja_jp.json +0326f97faabdc5cc42f509c31c0e216ca25b9839 assets/create/lang/unfinished/ko_kr.json +3f63334d35c7f51b4b5ef8c82b1445679791923e assets/create/lang/unfinished/nl_nl.json +a3dcdb8c77ecaf1b8867bec6e9449bddf7cdf4da assets/create/lang/unfinished/pt_br.json +88e47a6c87e370829e12a2757fba2f59e5ddae6e assets/create/lang/unfinished/ru_ru.json +9293429991cbc341843c0c3faacdf4f645f7a68e assets/create/lang/unfinished/zh_cn.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json @@ -1343,6 +1345,7 @@ def7382f3216c59d835ab64f534678f3d31ecc51 assets/create/models/item/weathered_lim 9dfaa12884667458f8f727ae7666e7e4e50181d9 assets/create/models/item/zinc_ingot.json 9f9455ccb5fc9e3cbfce73862b46078346a522a5 assets/create/models/item/zinc_nugget.json b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json +e76041b7ae829fdd7dc0524f6ca4d2f89fca51bb assets/create/sounds.json 187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json 0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json de37aa79135d560adf1cc5404f86761f97335314 data/create/advancements/basin.json diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index b4536e458..acd3b4f21 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -849,6 +849,7 @@ "create.subtitle.blockzapper_confirm": "Affirmative Ding", "create.subtitle.blockzapper_deny": "Declining Boop", "create.subtitle.block_funnel_eat": "Funnel CHOMPS", + "create.subtitle.blaze_munch": "Blaze munches happily", "_": "->------------------------] Item Descriptions [------------------------<-", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index dd02f9915..d2d2fef13 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 791", + "_": "Missing Localizations: 792", "_": "->------------------------] Game Elements [------------------------<-", @@ -850,6 +850,7 @@ "create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative Ding", "create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining Boop", "create.subtitle.block_funnel_eat": "UNLOCALIZED: Funnel CHOMPS", + "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily", "_": "->------------------------] Item Descriptions [------------------------<-", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index b56668ac7..03a90cdf4 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 394", + "_": "Missing Localizations: 395", "_": "->------------------------] Game Elements [------------------------<-", @@ -850,6 +850,7 @@ "create.subtitle.blockzapper_confirm": "Ding d'affirmation", "create.subtitle.blockzapper_deny": "Boop de déclin", "create.subtitle.block_funnel_eat": "Croc d'entonoir", + "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily", "_": "->------------------------] Item Descriptions [------------------------<-", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index d977b69d8..cf789cbbf 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 378", + "_": "Missing Localizations: 379", "_": "->------------------------] Game Elements [------------------------<-", @@ -850,6 +850,7 @@ "create.subtitle.blockzapper_confirm": "Ding Affermativo", "create.subtitle.blockzapper_deny": "Boop in Calo", "create.subtitle.block_funnel_eat": "CHOMPS a Imbuto", + "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily", "_": "->------------------------] Item Descriptions [------------------------<-", diff --git a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json index b26982bc7..7ecdf0a03 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json +++ b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 373", + "_": "Missing Localizations: 374", "_": "->------------------------] Game Elements [------------------------<-", @@ -850,6 +850,7 @@ "create.subtitle.blockzapper_confirm": "アファーマティブディン", "create.subtitle.blockzapper_deny": "衰退するブープ", "create.subtitle.block_funnel_eat": "ファンネルCHOMPS", + "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily", "_": "->------------------------] Item Descriptions [------------------------<-", diff --git a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json index 94f32c357..dc8762d0b 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json +++ b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 378", + "_": "Missing Localizations: 379", "_": "->------------------------] Game Elements [------------------------<-", @@ -850,6 +850,7 @@ "create.subtitle.blockzapper_confirm": "확인 효과음", "create.subtitle.blockzapper_deny": "취소 효과음", "create.subtitle.block_funnel_eat": "깔때기가 흡입함", + "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily", "_": "->------------------------] Item Descriptions [------------------------<-", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index 41697cd34..074e407bc 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 728", + "_": "Missing Localizations: 729", "_": "->------------------------] Game Elements [------------------------<-", @@ -850,6 +850,7 @@ "create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative Ding", "create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining Boop", "create.subtitle.block_funnel_eat": "UNLOCALIZED: Funnel CHOMPS", + "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily", "_": "->------------------------] Item Descriptions [------------------------<-", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index 920fb06d6..042be1afa 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 798", + "_": "Missing Localizations: 799", "_": "->------------------------] Game Elements [------------------------<-", @@ -850,6 +850,7 @@ "create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative Ding", "create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining Boop", "create.subtitle.block_funnel_eat": "UNLOCALIZED: Funnel CHOMPS", + "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily", "_": "->------------------------] Item Descriptions [------------------------<-", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index 9f9001c05..c67df6cb6 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 792", + "_": "Missing Localizations: 793", "_": "->------------------------] Game Elements [------------------------<-", @@ -850,6 +850,7 @@ "create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative Ding", "create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining Boop", "create.subtitle.block_funnel_eat": "UNLOCALIZED: Funnel CHOMPS", + "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily", "_": "->------------------------] Item Descriptions [------------------------<-", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index a8e80eb88..78593d62e 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 54", + "_": "Missing Localizations: 55", "_": "->------------------------] Game Elements [------------------------<-", @@ -850,6 +850,7 @@ "create.subtitle.blockzapper_confirm": "选择方块", "create.subtitle.blockzapper_deny": "放置失败", "create.subtitle.block_funnel_eat": "漏斗吞食", + "create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily", "_": "->------------------------] Item Descriptions [------------------------<-", diff --git a/src/main/resources/assets/create/sounds.json b/src/generated/resources/assets/create/sounds.json similarity index 91% rename from src/main/resources/assets/create/sounds.json rename to src/generated/resources/assets/create/sounds.json index 11453a388..a420c4ac2 100644 --- a/src/main/resources/assets/create/sounds.json +++ b/src/generated/resources/assets/create/sounds.json @@ -1,16 +1,16 @@ { - "creeperclock": { - "sounds": [ - "create:creeperclock" - ], - "subtitle": "create.subtitle.creeperclock" - }, "pigclock": { "sounds": [ "create:pigclock" ], "subtitle": "create.subtitle.pigclock" }, + "creeperclock": { + "sounds": [ + "create:creeperclock" + ], + "subtitle": "create.subtitle.creeperclock" + }, "schematicannon_launch_block": { "sounds": [ { @@ -91,5 +91,14 @@ } ], "subtitle": "create.subtitle.block_funnel_eat" + }, + "blaze_munch": { + "sounds": [ + { + "name": "minecraft:entity.generic.eat", + "type": "event" + } + ], + "subtitle": "create.subtitle.blaze_munch" } } \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllSoundEvents.java b/src/main/java/com/simibubi/create/AllSoundEvents.java index e778e611e..a46d188ad 100644 --- a/src/main/java/com/simibubi/create/AllSoundEvents.java +++ b/src/main/java/com/simibubi/create/AllSoundEvents.java @@ -9,6 +9,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.simibubi.create.foundation.utility.Lang; +import net.minecraft.data.DataGenerator; import net.minecraft.data.DirectoryCache; import net.minecraft.data.IDataProvider; import net.minecraft.util.ResourceLocation; @@ -19,8 +20,8 @@ import net.minecraftforge.registries.IForgeRegistry; public enum AllSoundEvents implements IDataProvider { - CUCKOO_PIG("creeperclock"), - CUCKOO_CREEPER("pigclock"), + CUCKOO_PIG("pigclock"), + CUCKOO_CREEPER("creeperclock"), SCHEMATICANNON_LAUNCH_BLOCK(SoundEvents.ENTITY_GENERIC_EXPLODE), SCHEMATICANNON_FINISH(SoundEvents.BLOCK_NOTE_BLOCK_BELL), @@ -31,11 +32,13 @@ public enum AllSoundEvents implements IDataProvider { BLOCKZAPPER_CONFIRM(SoundEvents.BLOCK_NOTE_BLOCK_BELL), BLOCKZAPPER_DENY(SoundEvents.BLOCK_NOTE_BLOCK_BASS), BLOCK_FUNNEL_EAT(SoundEvents.ENTITY_GENERIC_EAT), + BLAZE_MUNCH(SoundEvents.ENTITY_GENERIC_EAT) ; String id; SoundEvent event, child; + private DataGenerator generator; // For adding our own sounds at assets/create/sounds/name.ogg AllSoundEvents() { @@ -62,6 +65,11 @@ public enum AllSoundEvents implements IDataProvider { return id; } + public AllSoundEvents generator(DataGenerator generator){ + this.generator = generator; + return this; + } + public static void register(RegistryEvent.Register event) { IForgeRegistry registry = event.getRegistry(); @@ -107,7 +115,7 @@ public enum AllSoundEvents implements IDataProvider { @Override public void act(DirectoryCache cache) throws IOException { - + generate(generator.getOutputFolder(), cache); } @Override diff --git a/src/main/java/com/simibubi/create/Create.java b/src/main/java/com/simibubi/create/Create.java index 0033adc32..64b99568b 100644 --- a/src/main/java/com/simibubi/create/Create.java +++ b/src/main/java/com/simibubi/create/Create.java @@ -109,6 +109,7 @@ public class Create { DataGenerator gen = event.getGenerator(); gen.addProvider(new AllAdvancements(gen)); gen.addProvider(new LangMerger(gen)); + gen.addProvider(AllSoundEvents.BLAZE_MUNCH.generator(gen)); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/HeaterTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/processing/HeaterTileEntity.java index 03614594b..cae5645e7 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/HeaterTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/HeaterTileEntity.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.Random; import com.simibubi.create.AllItems; +import com.simibubi.create.AllSoundEvents; import com.simibubi.create.content.contraptions.components.deployer.DeployerFakePlayer; import com.simibubi.create.content.contraptions.particle.CubeParticleData; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; @@ -16,10 +17,12 @@ import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntity; import net.minecraft.particles.IParticleData; import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.event.entity.ProjectileImpactEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -213,10 +216,18 @@ public class HeaterTileEntity extends SmartTileEntity { event.getThrowable().remove(); HeaterTileEntity heater = (HeaterTileEntity) tile; - if (heater.activeFuel != FuelType.SPECIAL) + if (heater.activeFuel != FuelType.SPECIAL) { heater.activeFuel = FuelType.NORMAL; heater.remainingBurnTime = MathHelper.clamp(heater.remainingBurnTime + 80, 0, maxHeatCapacity); heater.markDirty(); + } + + World world = event.getThrowable().world; + if (world.isRemote) + return; + + world.playSound(null, heater.getPos(), AllSoundEvents.BLAZE_MUNCH.get(), SoundCategory.BLOCKS, .5F, 1F); + } diff --git a/src/main/resources/assets/create/lang/default/messages.json b/src/main/resources/assets/create/lang/default/messages.json index 04933d1bf..bd91c8762 100644 --- a/src/main/resources/assets/create/lang/default/messages.json +++ b/src/main/resources/assets/create/lang/default/messages.json @@ -368,6 +368,7 @@ "create.subtitle.blockzapper_place": "Blocks zap into place", "create.subtitle.blockzapper_confirm": "Affirmative Ding", "create.subtitle.blockzapper_deny": "Declining Boop", - "create.subtitle.block_funnel_eat": "Funnel CHOMPS" - + "create.subtitle.block_funnel_eat": "Funnel CHOMPS", + "create.subtitle.blaze_munch": "Blaze munches happily" + } \ No newline at end of file