mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Added the (still unused!) DoughnutRender for DoughnutDev as he is apparently crazy enough to want to localize all of the booklet chapters which is awesome because it's a pain and I'm too freaking lazy to do it.
This commit is contained in:
parent
c3c5963065
commit
387c641915
4 changed files with 29 additions and 14 deletions
|
@ -14,25 +14,28 @@ import cpw.mods.fml.common.eventhandler.EventPriority;
|
|||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||
import ellpeck.actuallyadditions.gadget.RenderSpecial;
|
||||
import ellpeck.actuallyadditions.items.InitItems;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class RenderPlayerEventAA{
|
||||
|
||||
private static RenderSpecial ellpeckRender = new RenderSpecial(InitBlocks.blockPhantomLiquiface, 0);
|
||||
private static RenderSpecial hoseRender = new RenderSpecial(Blocks.torch, 0);
|
||||
private static RenderSpecial paktoRender = new RenderSpecial(Blocks.wool, 6);
|
||||
private static RenderSpecial glenRender = new RenderSpecial(InitBlocks.blockHeatCollector, 0);
|
||||
private static RenderSpecial lordiRender = new RenderSpecial(InitBlocks.blockBreaker, 0);
|
||||
public static RenderSpecial lariRender = new RenderSpecial(null, 0);
|
||||
private static RenderSpecial ellpeckRender = new RenderSpecial(new ItemStack(InitItems.itemPhantomConnector));
|
||||
private static RenderSpecial hoseRender = new RenderSpecial(new ItemStack(Blocks.torch));
|
||||
private static RenderSpecial paktoRender = new RenderSpecial(new ItemStack(Blocks.wool, 1, 6));
|
||||
private static RenderSpecial glenRender = new RenderSpecial(new ItemStack(InitBlocks.blockHeatCollector));
|
||||
private static RenderSpecial lordiRender = new RenderSpecial(new ItemStack(InitBlocks.blockBreaker));
|
||||
public static RenderSpecial lariRender = new RenderSpecial(null);
|
||||
//public static RenderSpecial doughnutRender = new RenderSpecial(new ItemStack(InitItems.itemFoods, 1, TheFoods.DOUGHNUT.ordinal()));
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void RenderPlayerEvent(RenderPlayerEvent.Specials.Pre event){
|
||||
//Ellpeck
|
||||
if(event.entityPlayer.getUniqueID().equals(UUID.fromString("3f9f4a94-95e3-40fe-8895-e8e3e84d1468"))){
|
||||
ellpeckRender.render(event.entityPlayer, 0.3F, 0);
|
||||
ellpeckRender.render(event.entityPlayer, 0.4F, 0.2F);
|
||||
}
|
||||
//Paktosan
|
||||
else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("0bac71ad-9156-487e-9ade-9c5b57274b23"))){
|
||||
|
@ -54,5 +57,9 @@ public class RenderPlayerEventAA{
|
|||
else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("ac275e30-c468-42af-b5d4-b26c1c705b70"))){
|
||||
lariRender.render(event.entityPlayer, 0.15F, -0.125F);
|
||||
}
|
||||
//DoughnutDev
|
||||
/*else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("fd303402-d627-4de0-8a02-eb8c7fd2acb6"))){
|
||||
doughnutRender.render(event.entityPlayer, 0.35F, 0.225F);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,8 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelSquid;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
@ -23,14 +25,12 @@ public class RenderSpecial{
|
|||
|
||||
private double lastTimeForBobbing;
|
||||
|
||||
private Block theBlock;
|
||||
private int meta;
|
||||
private ItemStack theThingToRender;
|
||||
|
||||
private static final ResourceLocation squidTextures = new ResourceLocation("textures/entity/squid.png");
|
||||
|
||||
public RenderSpecial(Block block, int meta){
|
||||
this.theBlock = block;
|
||||
this.meta = meta;
|
||||
public RenderSpecial(ItemStack stack){
|
||||
this.theThingToRender = stack;
|
||||
}
|
||||
|
||||
public void render(EntityPlayer player, float size, float offsetUp){
|
||||
|
@ -65,7 +65,13 @@ public class RenderSpecial{
|
|||
new ModelSquid().render(null, 0F, 0F, 0.25F, 0F, 0F, 0.0625F);
|
||||
}
|
||||
else{
|
||||
AssetUtil.renderBlock(this.theBlock, this.meta);
|
||||
if(this.theThingToRender.getItem() instanceof ItemBlock){
|
||||
AssetUtil.renderBlock(Block.getBlockFromItem(this.theThingToRender.getItem()), this.theThingToRender.getItemDamage());
|
||||
}
|
||||
else{
|
||||
GL11.glTranslatef(-0.5F, 0F, 0F);
|
||||
AssetUtil.renderItem(this.theThingToRender, 0);
|
||||
}
|
||||
}
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ public enum TheFoods implements INameableItem{
|
|||
PIZZA("Pizza", 20, 10F, false, 45, EnumRarity.uncommon),
|
||||
BAGUETTE("Baguette", 7, 2F, false, 25, EnumRarity.common),
|
||||
RICE("Rice", 2, 1F, false, 10, EnumRarity.uncommon),
|
||||
RICE_BREAD("RiceBread", 8, 3F, false, 25, EnumRarity.uncommon);
|
||||
RICE_BREAD("RiceBread", 8, 3F, false, 25, EnumRarity.uncommon),
|
||||
DOUGHNUT("Doughnut", 4, 0.5F, false, 10, EnumRarity.epic);
|
||||
|
||||
public static void setReturnItems(){
|
||||
SPAGHETTI.returnItem = new ItemStack(Items.bowl);
|
||||
|
|
|
@ -26,6 +26,7 @@ tile.actuallyadditions.blockEnergizer.name=Energizer
|
|||
tile.actuallyadditions.blockEnervator.name=Enervator
|
||||
tile.actuallyadditions.blockRice.name=Rice Plant
|
||||
item.actuallyadditions.itemFoodRice.name=Rice
|
||||
item.actuallyadditions.itemFoodDoughnut.name=Doughnut
|
||||
item.actuallyadditions.itemMiscRiceDough.name=Rice Dough
|
||||
item.actuallyadditions.itemFoodRiceBread.name=Rice Bread
|
||||
item.actuallyadditions.itemRiceSeed.name=Rice Seeds
|
||||
|
|
Loading…
Reference in a new issue