Rewrote fluids
Now uses json files Now uses forge bucket Now not broken, closes #557
This commit is contained in:
parent
c20c6d4722
commit
7e2db4a715
11 changed files with 178 additions and 305 deletions
|
@ -1,8 +1,11 @@
|
|||
package techreborn.proxies;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMap;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -32,6 +35,7 @@ import techreborn.client.render.entitys.RenderNukePrimed;
|
|||
import techreborn.entitys.EntityNukePrimed;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.init.ModSounds;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.manual.loader.ManualLoader;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -132,4 +136,19 @@ public class ClientProxy extends CommonProxy
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerFluidBlockRendering(Block block, String name) {
|
||||
super.registerFluidBlockRendering(block, name);
|
||||
final ModelResourceLocation fluidLocation = new ModelResourceLocation(ModInfo.MOD_ID.toLowerCase() + ":fluids", name);
|
||||
|
||||
// use a custom state mapper which will ignore the LEVEL property
|
||||
ModelLoader.setCustomStateMapper(block, new StateMapperBase()
|
||||
{
|
||||
@Override
|
||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state)
|
||||
{
|
||||
return fluidLocation;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package techreborn.proxies;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
|
@ -32,4 +33,9 @@ public class CommonProxy implements ICompatModule
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
public void registerFluidBlockRendering(Block block, String name){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue