-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release-2.4: Refactor block-/item-/achievement-names Fix must missing texture Fix growing of must + change speed Fix texture issues Add own texture for fully grown must Fix obvious errors after update to 1.8 Updated version to 1.8-2.4
- Loading branch information
Showing
39 changed files
with
673 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,47 @@ | ||
package tennox.bacteriamod; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.resources.model.ModelResourceLocation; | ||
import net.minecraft.item.Item; | ||
import net.minecraftforge.fml.common.event.FMLInitializationEvent; | ||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; | ||
import net.minecraftforge.fml.common.registry.GameRegistry; | ||
|
||
public class BacteriaClientProxy extends BacteriaCommonProxy { | ||
@Override | ||
public void registerRenderInformation() { | ||
} | ||
|
||
@Override | ||
public void preInit(FMLPreInitializationEvent event) { | ||
super.preInit(event); | ||
} | ||
|
||
@Override | ||
public void init(FMLInitializationEvent event) { | ||
super.init(event); | ||
|
||
// ITEMS // | ||
registerItemModel(Bacteria.bacteriaBunch, 0); | ||
registerItemModel(Bacteria.bacteriaPotion, 0); | ||
registerItemModel(Bacteria.jammerItem, 0); | ||
|
||
// BLOCKS // | ||
registerBlockModel(Bacteria.bacteria, 0); | ||
registerBlockModel(Bacteria.replacer, 0); | ||
registerBlockModel(Bacteria.jammer, 0); | ||
registerBlockModel(Bacteria.must, 0); | ||
} | ||
|
||
private void registerBlockModel(IBlockWithName block, int defaultSubtype) { | ||
Item item = Item.getItemFromBlock((Block) block); | ||
ModelResourceLocation res = new ModelResourceLocation(Bacteria.prependModID(block.getName()), "inventory"); | ||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, defaultSubtype, res); | ||
} | ||
|
||
public void registerItemModel(IItemWithName item, int defaultSubtype) { | ||
ModelResourceLocation res = new ModelResourceLocation(Bacteria.prependModID(item.getName()), "inventory"); | ||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register((Item) item, defaultSubtype, res); | ||
} | ||
} |
Oops, something went wrong.