Browse Source

0.2.4

master
Adrian Siekierka 1 year ago
parent
commit
f0360fde11
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      src/main/java/pl/asie/mage/plugins/MageSmoothWaterClient.java

+ 11
- 0
src/main/java/pl/asie/mage/plugins/MageSmoothWaterClient.java View File

@@ -36,6 +36,7 @@ import net.minecraftforge.client.model.ModelFluid;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.common.model.TRSRTransformation;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.common.registry.GameRegistry;
@@ -77,6 +78,16 @@ public class MageSmoothWaterClient {
} catch (Exception e) {
throw new RuntimeException(e);
}

for (Block b : GameRegistry.findRegistry(Block.class)) {
Fluid f;

if (b instanceof BlockLiquidForged && (f = MageSmoothWater.getFluid(b)) != null) {
event.getMap().registerSprite(f.getStill());
event.getMap().registerSprite(f.getFlowing());
if (f.getOverlay() != null) event.getMap().registerSprite(f.getOverlay());
}
}
}

@SubscribeEvent

Loading…
Cancel
Save