parent
d25bb23e8e
commit
315c0aa509
327 changed files with 1686 additions and 2476 deletions
|
@ -163,8 +163,8 @@ public class ClientProxy extends CommonProxy
|
|||
}
|
||||
|
||||
@Override
|
||||
public void registerCustomBlockStateLocation(Block block, String resourceLocation, boolean item) {
|
||||
super.registerCustomBlockStateLocation(block, resourceLocation, item);
|
||||
public void registerCustomBlockSateLocation(Block block, String resourceLocation) {
|
||||
super.registerCustomBlockSateLocation(block, resourceLocation);
|
||||
ModelLoader.setCustomStateMapper(block, new DefaultStateMapper()
|
||||
{
|
||||
@Override
|
||||
|
@ -175,35 +175,7 @@ public class ClientProxy extends CommonProxy
|
|||
return new ModelResourceLocation(resourceDomain + ':' + resourceLocation, propertyString);
|
||||
}
|
||||
});
|
||||
if(item){
|
||||
String resourceDomain = Block.REGISTRY.getNameForObject(block).getResourceDomain();
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(resourceDomain + ':' + resourceLocation, "inventory"));
|
||||
}
|
||||
String resourceDomain = Block.REGISTRY.getNameForObject(block).getResourceDomain();
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(resourceDomain + ':' + resourceLocation, "inventory"));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerSubItemInventoryLocation(Item item, int meta, String location, String name) {
|
||||
super.registerSubItemInventoryLocation(item, meta, location, name);
|
||||
Block block = Block.getBlockFromItem(item);
|
||||
if(block != null){
|
||||
IBlockState state = block.getStateFromMeta(meta);
|
||||
String resourceDomain = Block.REGISTRY.getNameForObject(state.getBlock()).getResourceDomain();
|
||||
StateMapperBase base = new StateMapperBase() {
|
||||
@Override
|
||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
String propertyString = base.getPropertyString(state.getProperties());
|
||||
ModelResourceLocation resourceLocation = new ModelResourceLocation(resourceDomain + ':' + location, propertyString);
|
||||
ModelLoader.setCustomModelResourceLocation(item, meta, resourceLocation);
|
||||
} else {
|
||||
ResourceLocation loc = item.getRegistryName();
|
||||
String resourceDomain = Item.REGISTRY.getNameForObject(item).getResourceDomain();
|
||||
ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(resourceDomain + ':' + loc, "type=" + name));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package techreborn.proxies;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
|
@ -39,20 +38,8 @@ public class CommonProxy implements ICompatModule
|
|||
|
||||
}
|
||||
|
||||
public void registerCustomBlockStateLocation(Block block, String name) {
|
||||
registerCustomBlockStateLocation(block, name, true);
|
||||
}
|
||||
public void registerCustomBlockSateLocation(Block block, String name) {
|
||||
|
||||
public void registerCustomBlockStateLocation(Block block, String name, boolean item) {
|
||||
|
||||
}
|
||||
|
||||
public void registerSubItemInventoryLocation(Item item, int meta , String location, String name){
|
||||
|
||||
}
|
||||
|
||||
public void registerSubBlockInventoryLocation(Block block, int meta , String location, String name){
|
||||
registerSubItemInventoryLocation(Item.getItemFromBlock(block), meta, location, name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue