From 003fb227330dc46da4158f9363f3fa515df4d5f6 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Sat, 16 Jul 2016 17:34:57 -0500 Subject: [PATCH] Tidy up, add texture --- .../client/core/handler/ModelHandler.java | 2 +- .../functional/BergamuteEventHandler.java | 42 +++++------------- .../assets/botania/blockstates/bergamute.json | 18 ++++++++ .../botania/textures/blocks/bergamute.png | Bin 0 -> 317 bytes 4 files changed, 29 insertions(+), 33 deletions(-) create mode 100644 src/main/resources/assets/botania/blockstates/bergamute.json create mode 100644 src/main/resources/assets/botania/textures/blocks/bergamute.png diff --git a/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java b/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java index ed67f2183..a602d4e68 100644 --- a/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java +++ b/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java @@ -278,7 +278,7 @@ public final class ModelHandler { BotaniaAPIClient.registerSubtileModel(SubTileBubbell.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_BUBBELL + "Chibi")); BotaniaAPIClient.registerSubtileModel(SubTileSolegnolia.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SOLEGNOLIA)); BotaniaAPIClient.registerSubtileModel(SubTileSolegnolia.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SOLEGNOLIA + "Chibi")); - BotaniaAPIClient.registerSubtileModel(SubTileBergamute.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SOLEGNOLIA)); // todo model + BotaniaAPIClient.registerSubtileModel(SubTileBergamute.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_BERGAMUTE)); } private static void registerStandardBlocks() { diff --git a/src/main/java/vazkii/botania/common/block/subtile/functional/BergamuteEventHandler.java b/src/main/java/vazkii/botania/common/block/subtile/functional/BergamuteEventHandler.java index 222c8e799..c18dee15f 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/functional/BergamuteEventHandler.java +++ b/src/main/java/vazkii/botania/common/block/subtile/functional/BergamuteEventHandler.java @@ -12,6 +12,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import vazkii.botania.api.BotaniaAPI; +import vazkii.botania.common.block.tile.mana.TilePool; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -21,7 +22,7 @@ import java.util.Random; @SideOnly(Side.CLIENT) public class BergamuteEventHandler { private static final Random RAND = new Random(); - private static final float MULTIPLIER = 0.1F; + private static final float MULTIPLIER = 0.15F; @SubscribeEvent(priority = EventPriority.LOWEST) public void onSoundEvent(PlaySoundEvent evt) { @@ -34,7 +35,7 @@ public class BergamuteEventHandler { evt.setResultSound(new WrappedSound(sound, MULTIPLIER)); if (RAND.nextBoolean()) { - Color color = new Color(berg.getColor()); + Color color = TilePool.PARTICLE_COLOR; BotaniaAPI.internalHandler.sparkleFX(berg.getWorld(), berg.getPos().getX() + 0.3 + Math.random() * 0.5, berg.getPos().getY() + 0.5 + Math.random() * 0.5, berg.getPos().getZ() + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5); } } @@ -62,36 +63,13 @@ public class BergamuteEventHandler { } @Nonnull @Override public ResourceLocation getSoundLocation() { return compose.getSoundLocation(); } - @Nullable @Override public SoundEventAccessor createAccessor(SoundHandler handler) { return compose.createAccessor(handler); } - @Nonnull @Override public Sound getSound() { - return compose.getSound(); - } - - @Nonnull - @Override - public SoundCategory getCategory() { - return compose.getCategory(); - } - - @Override - public boolean canRepeat() { - return compose.canRepeat(); - } - - @Override - public int getRepeatDelay() { - return compose.getRepeatDelay(); - } - - @Override - public float getPitch() { - return compose.getPitch(); - } - - @Override - public float getXPosF() { - return compose.getXPosF(); - } + @Nullable @Override public SoundEventAccessor createAccessor(@Nonnull SoundHandler handler) { return compose.createAccessor(handler); } + @Nonnull @Override public Sound getSound() { return compose.getSound(); } + @Nonnull @Override public SoundCategory getCategory() { return compose.getCategory(); } + @Override public boolean canRepeat() { return compose.canRepeat(); } + @Override public int getRepeatDelay() { return compose.getRepeatDelay(); } + @Override public float getPitch() { return compose.getPitch(); } + @Override public float getXPosF() { return compose.getXPosF(); } @Override public float getYPosF() { return compose.getYPosF(); } @Override public float getZPosF() { return compose.getZPosF(); } @Nonnull @Override public AttenuationType getAttenuationType() { return compose.getAttenuationType(); } diff --git a/src/main/resources/assets/botania/blockstates/bergamute.json b/src/main/resources/assets/botania/blockstates/bergamute.json new file mode 100644 index 000000000..52beeea8a --- /dev/null +++ b/src/main/resources/assets/botania/blockstates/bergamute.json @@ -0,0 +1,18 @@ +{ + "forge_marker": 1, + "variants": { + "normal": [{ + "model": "botania:cross_tinted", + "textures": { + "cross": "botania:blocks/bergamute" + } + }], + "inventory": [{ + "model": "builtin/generated", + "transform": "forge:default-item", + "textures": { + "layer0": "botania:blocks/bergamute" + } + }] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/botania/textures/blocks/bergamute.png b/src/main/resources/assets/botania/textures/blocks/bergamute.png new file mode 100644 index 0000000000000000000000000000000000000000..04dae273394c1f5360bd9535c033ef3b918fb0aa GIT binary patch literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!AqVljv*HQ$v^)8w`W$Jp>$TE`ygAy`6DJF}+cH@16h62AgcU#La&G{1bmagV`))@_cg%{gUFw$L!IM59G{Y zYfxEcdFy}uE@Q?VfsVMCv~TiD1YN%0ywz~@qZETNOG?1%rK((PC(oX}qL{;AlJ%c? zv3QSZvFpQG&s0_kq%)imc+96cr;*FwV~3M$iuFad19P|+C9*A&W(aQ1(eN^9`olG; zMUpA0*??K#0FN^t|D3o6NtR1I$&0gFb_%7(F=RR%+i{4KAxU;#!IxsMNkHE*c)I$z JtaD0e0sx*zagG20 literal 0 HcmV?d00001