mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-28 15:56:14 +00:00
1 parent
26a8bd6a26
commit
c72988e435
39 files changed
+1077
-1344
No files matched your search
@@ -45,7 +45,7 @@ public class BlockEnchantedSoil extends BlockMod implements ILexiconable {
|
||||
setHardness(0.6F);
|
||||
setStepSound(soundTypeGrass);
|
||||
setBlockName(LibBlockNames.ENCHANTED_SOIL);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -59,20 +59,6 @@ public class BlockEnchantedSoil extends BlockMod implements ILexiconable {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void loadTextures(TextureStitchEvent.Pre event) {
|
||||
if(event.map.getTextureType() == 0) {
|
||||
TextureAtlasSprite icon = new InterpolatedIcon("botania:enchantedSoil0");
|
||||
if(event.map.setTextureEntry("botania:enchantedSoil0", icon))
|
||||
blockIcon = icon;
|
||||
|
||||
icon = new InterpolatedIcon("botania:enchantedSoil1");
|
||||
if(event.map.setTextureEntry("botania:enchantedSoil1", icon))
|
||||
iconSide = icon;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
@@ -99,4 +85,19 @@ public class BlockEnchantedSoil extends BlockMod implements ILexiconable {
|
||||
return LexiconData.overgrowthSeed;
|
||||
}
|
||||
|
||||
public class EventHandler{
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void loadTextures(TextureStitchEvent.Pre event) {
|
||||
if(event.map.getTextureType() == 0) {
|
||||
TextureAtlasSprite icon = new InterpolatedIcon("botania:enchantedSoil0");
|
||||
if(event.map.setTextureEntry("botania:enchantedSoil0", icon))
|
||||
blockIcon = icon;
|
||||
|
||||
icon = new InterpolatedIcon("botania:enchantedSoil1");
|
||||
if(event.map.setTextureEntry("botania:enchantedSoil1", icon))
|
||||
iconSide = icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user