Implement a functioning Blood Tank (#969)
Added a search bar to the Upgrade Tomes Creative Tab Updated some Altar fluid code (remove deprecated stuff) Moved Rendering classes into appropriate package Fix the localization errors on the Demon Crystals A few cleanups here and there
This commit is contained in:
parent
d1f4e95a7e
commit
aac2623440
gradle.properties
src/main
java/WayofTime/bloodmagic
BloodMagic.java
altar
api
block
client/render
block
RenderAlchemyArray.javaRenderAltar.javaRenderBloodTank.javaRenderDemonCrucible.javaRenderFakeBlocks.javaRenderItemRoutingNode.javapackage-info.java
model
compat
item/block
proxy
tile
util
resources/assets
bloodmagic
blockstates
lang
textures/blocks
minecraft/textures/gui/container/creative_inventory
|
@ -7,7 +7,7 @@ curse_id=224791
|
|||
|
||||
mappings_version=snapshot_20160518
|
||||
|
||||
jei_version=3.4.0.204
|
||||
jei_version=3.6.8.225
|
||||
waila_version=1.7.0-B3
|
||||
thaumcraft_version=5.1.5
|
||||
baubles_version=1.1.3.0
|
||||
|
|
|
@ -70,6 +70,12 @@ public class BloodMagic
|
|||
{
|
||||
return ModItems.UPGRADE_TOME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSearchBar()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@Getter
|
||||
|
@ -90,11 +96,14 @@ public class BloodMagic
|
|||
|
||||
Class proxyClass = Class.forName(PROXY_MAP.get(mcVersion));
|
||||
crossVersionProxy = (ICrossVersionProxy) proxyClass.newInstance();
|
||||
} catch (Exception e)
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new IllegalArgumentException("Blood Magic could not find a cross version proxy!", e);
|
||||
}
|
||||
|
||||
tabUpgradeTome.setNoTitle().setBackgroundImageName("upgrade_tomes.png");
|
||||
|
||||
FluidRegistry.enableUniversalBucket();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import net.minecraftforge.fluids.capability.FluidTankPropertiesWrapper;
|
||||
|
@ -53,7 +53,7 @@ public class BloodAltar implements IFluidHandler
|
|||
protected FluidStack fluidInput = new FluidStack(BlockLifeEssence.getLifeEssence(), 0);
|
||||
private EnumAltarTier altarTier = EnumAltarTier.ONE;
|
||||
private AltarUpgrade upgrade;
|
||||
private int capacity = FluidContainerRegistry.BUCKET_VOLUME * 10;
|
||||
private int capacity = Fluid.BUCKET_VOLUME * 10;
|
||||
private FluidStack fluid = new FluidStack(BloodMagicAPI.getLifeEssence(), 0);
|
||||
private int liquidRequired; // mB
|
||||
private boolean canBeFilled;
|
||||
|
@ -69,7 +69,7 @@ public class BloodAltar implements IFluidHandler
|
|||
private int accelerationUpgrades;
|
||||
private boolean isUpgraded;
|
||||
private boolean isResultBlock;
|
||||
private int bufferCapacity = FluidContainerRegistry.BUCKET_VOLUME;
|
||||
private int bufferCapacity = Fluid.BUCKET_VOLUME;
|
||||
private int progress;
|
||||
private int lockdownDuration;
|
||||
private int demonBloodDuration;
|
||||
|
@ -352,13 +352,15 @@ public class BloodAltar implements IFluidHandler
|
|||
if (!isActive)
|
||||
progress = 0;
|
||||
|
||||
if (tileAltar.getStackInSlot(0) != null)
|
||||
ItemStack input = tileAltar.getStackInSlot(0);
|
||||
|
||||
if (input != null)
|
||||
{
|
||||
// Do recipes
|
||||
AltarRecipe recipe = AltarRecipeRegistry.getRecipeForInput(tileAltar.getStackInSlot(0));
|
||||
AltarRecipe recipe = AltarRecipeRegistry.getRecipeForInput(input);
|
||||
if (recipe != null)
|
||||
{
|
||||
if (recipe.doesRequiredItemMatch(tileAltar.getStackInSlot(0), altarTier))
|
||||
if (recipe.doesRequiredItemMatch(input, altarTier))
|
||||
{
|
||||
this.isActive = true;
|
||||
this.recipe = recipe;
|
||||
|
@ -395,7 +397,7 @@ public class BloodAltar implements IFluidHandler
|
|||
{
|
||||
BlockPos newPos = pos.offset(facing);
|
||||
IBlockState block = world.getBlockState(newPos);
|
||||
block.getBlock().neighborChanged(block, world, newPos, block.getBlock());
|
||||
block.getBlock().onNeighborChange(world, pos, newPos);
|
||||
}
|
||||
}
|
||||
if (internalCounter % (Math.max(20 - this.accelerationUpgrades, 1)) == 0)
|
||||
|
@ -438,7 +440,9 @@ public class BloodAltar implements IFluidHandler
|
|||
return;
|
||||
}
|
||||
|
||||
if (tileAltar.getStackInSlot(0) == null)
|
||||
ItemStack input = tileAltar.getStackInSlot(0);
|
||||
|
||||
if (input == null)
|
||||
return;
|
||||
|
||||
World world = tileAltar.getWorld();
|
||||
|
@ -450,7 +454,7 @@ public class BloodAltar implements IFluidHandler
|
|||
if (!canBeFilled)
|
||||
{
|
||||
boolean hasOperated = false;
|
||||
int stackSize = tileAltar.getStackInSlot(0).stackSize;
|
||||
int stackSize = input.stackSize;
|
||||
|
||||
if (totalCharge > 0)
|
||||
{
|
||||
|
@ -517,7 +521,7 @@ public class BloodAltar implements IFluidHandler
|
|||
{
|
||||
ItemStack returnedItem = tileAltar.getStackInSlot(0);
|
||||
|
||||
if (!(returnedItem.getItem() instanceof IBloodOrb))
|
||||
if (returnedItem == null || !(returnedItem.getItem() instanceof IBloodOrb))
|
||||
return;
|
||||
|
||||
IBloodOrb item = (IBloodOrb) (returnedItem.getItem());
|
||||
|
@ -590,11 +594,11 @@ public class BloodAltar implements IFluidHandler
|
|||
this.orbCapacityMultiplier = (float) (1 + 0.02 * upgrade.getOrbCapacityCount());
|
||||
this.chargingFrequency = Math.max(20 - upgrade.getAccelerationCount(), 1);
|
||||
this.chargingRate = (int) (10 * upgrade.getChargingCount() * (1 + consumptionMultiplier / 2));
|
||||
this.maxCharge = (int) (FluidContainerRegistry.BUCKET_VOLUME * Math.max(0.5 * capacityMultiplier, 1) * upgrade.getChargingCount());
|
||||
this.maxCharge = (int) (Fluid.BUCKET_VOLUME * Math.max(0.5 * capacityMultiplier, 1) * upgrade.getChargingCount());
|
||||
}
|
||||
|
||||
this.capacity = (int) (FluidContainerRegistry.BUCKET_VOLUME * 10 * capacityMultiplier);
|
||||
this.bufferCapacity = (int) (FluidContainerRegistry.BUCKET_VOLUME * 1 * capacityMultiplier);
|
||||
this.capacity = (int) (Fluid.BUCKET_VOLUME * 10 * capacityMultiplier);
|
||||
this.bufferCapacity = (int) (Fluid.BUCKET_VOLUME * 1 * capacityMultiplier);
|
||||
|
||||
if (this.fluid.amount > this.capacity)
|
||||
this.fluid.amount = this.capacity;
|
||||
|
|
|
@ -126,6 +126,8 @@ public class Constants
|
|||
public static final String POTION_AUGMENT_LENGHT = "length:";
|
||||
public static final String POTION_AUGMENT_STRENGTH = "strength:";
|
||||
public static final String POTION_IMPURITY = "impurity";
|
||||
|
||||
public static final String TANK = "tank";
|
||||
}
|
||||
|
||||
public static class Mod
|
||||
|
@ -161,6 +163,7 @@ public class Constants
|
|||
public static final String WAILA_CONFIG_TELEPOSER = Mod.MODID + ".teleposer";
|
||||
public static final String WAILA_CONFIG_RITUAL = Mod.MODID + ".ritualController";
|
||||
public static final String WAILA_CONFIG_ARRAY = Mod.MODID + ".array";
|
||||
public static final String WAILA_CONFIG_BLOOD_TANK = Mod.MODID + ".bloodTank";
|
||||
|
||||
public static final Item THAUMCRAFT_GOGGLES = ForgeRegistries.ITEMS.getValue(new ResourceLocation("Thaumcraft", "goggles"));
|
||||
}
|
||||
|
|
|
@ -1,17 +1,22 @@
|
|||
package WayofTime.bloodmagic.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.client.IVariantProvider;
|
||||
import WayofTime.bloodmagic.tile.TileBloodTank;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
|
@ -19,15 +24,20 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.tile.TileBloodTank;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraftforge.fluids.FluidUtil;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
public class BlockBloodTank extends BlockContainer
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockBloodTank extends BlockContainer implements IVariantProvider
|
||||
{
|
||||
public static final PropertyInteger TIER = PropertyInteger.create("tier", 0, TileBloodTank.capacities.length - 1);
|
||||
|
||||
public BlockBloodTank()
|
||||
{
|
||||
super(Material.IRON);
|
||||
|
@ -38,12 +48,22 @@ public class BlockBloodTank extends BlockContainer
|
|||
setSoundType(SoundType.GLASS);
|
||||
setHarvestLevel("pickaxe", 1);
|
||||
setCreativeTab(BloodMagic.tabBloodMagic);
|
||||
setLightOpacity(0);
|
||||
|
||||
setDefaultState(blockState.getBaseState().withProperty(TIER, 0));
|
||||
}
|
||||
|
||||
// This is important!!! - DON'T DELETE - idk why
|
||||
@Override
|
||||
public TileEntity createTileEntity(World worldIn, IBlockState blockState)
|
||||
{
|
||||
return new TileBloodTank(getMetaFromState(blockState));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||
{
|
||||
return new TileBloodTank();
|
||||
return new TileBloodTank(meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,33 +72,71 @@ public class BlockBloodTank extends BlockContainer
|
|||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getDefaultState().withProperty(TIER, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
return state.getValue(TIER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
if (world.getTileEntity(pos) == null)
|
||||
return state;
|
||||
return state.withProperty(TIER, world.getTileEntity(pos).getBlockMetadata());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateContainer(this, new IProperty[] { TIER });
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
TileBloodTank fluidHandler = (TileBloodTank) world.getTileEntity(blockPos);
|
||||
if (Utils.fillHandlerWithContainer(world, fluidHandler, player))
|
||||
if (FluidUtil.interactWithFluidHandler(heldItem, fluidHandler.getTank(), player))
|
||||
{
|
||||
world.notifyBlockUpdate(blockPos, state, state, 3);
|
||||
return true;
|
||||
}
|
||||
if (Utils.fillContainerFromHandler(world, fluidHandler, player, fluidHandler.tank.getFluid()))
|
||||
{
|
||||
world.notifyBlockUpdate(blockPos, state, state, 3);
|
||||
return true;
|
||||
}
|
||||
if (FluidContainerRegistry.isContainer(heldItem))
|
||||
{
|
||||
world.notifyBlockUpdate(blockPos, state, state, 3);
|
||||
world.checkLight(blockPos);
|
||||
world.updateComparatorOutputLevel(blockPos, this);
|
||||
world.markAndNotifyBlock(blockPos, world.getChunkFromBlockCoords(blockPos), state, state, 3);
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onBlockActivated(world, blockPos, state, player, hand, heldItem, side, hitX, hitY, hitZ);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
|
||||
{
|
||||
this.dropBlockAsItem(worldIn, pos, state, 0);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
this.dropBlockAsItem(worldIn, pos, state, 0);
|
||||
super.onBlockHarvested(worldIn, pos, state, player);
|
||||
}
|
||||
|
||||
|
@ -92,8 +150,9 @@ public class BlockBloodTank extends BlockContainer
|
|||
TileBloodTank bloodTank = (TileBloodTank) world.getTileEntity(blockPos);
|
||||
ItemStack drop = new ItemStack(this);
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
bloodTank.writeToNBT(tag);
|
||||
bloodTank.serialize(tag);
|
||||
drop.setTagCompound(tag);
|
||||
drop.setItemDamage(getMetaFromState(blockState));
|
||||
list.add(drop);
|
||||
}
|
||||
|
||||
|
@ -108,26 +167,27 @@ public class BlockBloodTank extends BlockContainer
|
|||
NBTTagCompound tag = stack.getTagCompound();
|
||||
if (tag != null)
|
||||
{
|
||||
world.getTileEntity(blockPos).readFromNBT(tag);
|
||||
((TileBloodTank) world.getTileEntity(blockPos)).deserialize(tag);
|
||||
blockState.withProperty(TIER, stack.getMetadata());
|
||||
}
|
||||
}
|
||||
|
||||
world.checkLight(blockPos);
|
||||
world.updateComparatorOutputLevel(blockPos, this);
|
||||
world.markAndNotifyBlock(blockPos, world.getChunkFromBlockCoords(blockPos), blockState, blockState, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
||||
if (tile instanceof TileBloodTank)
|
||||
{
|
||||
TileBloodTank tank = (TileBloodTank) tile;
|
||||
FluidStack fluid = tank.tank.getFluid();
|
||||
if (fluid != null)
|
||||
{
|
||||
return fluid.getFluid().getLuminosity(fluid);
|
||||
}
|
||||
FluidStack fluidStack = ((TileBloodTank) tile).getTank().getFluid();
|
||||
return fluidStack == null || fluidStack.amount <= 0 ? 0 : fluidStack.getFluid().getLuminosity(fluidStack);
|
||||
}
|
||||
return 0;
|
||||
|
||||
return super.getLightValue(state, world, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -135,4 +195,29 @@ public class BlockBloodTank extends BlockContainer
|
|||
{
|
||||
return getDrops(world, pos, world.getBlockState(pos), 0).get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride(IBlockState state)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(IBlockState state, World w, BlockPos pos)
|
||||
{
|
||||
TileEntity tile = w.getTileEntity(pos);
|
||||
if (tile instanceof TileBloodTank)
|
||||
return ((TileBloodTank) tile).getComparatorOutput();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pair<Integer, String>> getVariants()
|
||||
{
|
||||
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
|
||||
for (int i = 0; i < TileBloodTank.capacities.length; i++)
|
||||
ret.add(new ImmutablePair<Integer, String>(i, "inventory"));
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class BlockDemonCrystal extends BlockContainer
|
|||
super(Material.ROCK);
|
||||
this.setDefaultState(this.blockState.getBaseState().withProperty(TYPE, EnumDemonWillType.DEFAULT).withProperty(ATTACHED, EnumFacing.UP));
|
||||
|
||||
setUnlocalizedName(Constants.Mod.MODID + ".demonCrystal");
|
||||
setUnlocalizedName(Constants.Mod.MODID + ".demonCrystal.");
|
||||
setCreativeTab(BloodMagic.tabBloodMagic);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package WayofTime.bloodmagic.client.render;
|
||||
package WayofTime.bloodmagic.client.render.block;
|
||||
|
||||
import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer;
|
||||
import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry;
|
|
@ -1,4 +1,4 @@
|
|||
package WayofTime.bloodmagic.client.render;
|
||||
package WayofTime.bloodmagic.client.render.block;
|
||||
|
||||
import WayofTime.bloodmagic.api.altar.AltarComponent;
|
||||
import WayofTime.bloodmagic.api.altar.EnumAltarTier;
|
||||
|
@ -38,7 +38,8 @@ public class RenderAltar extends TileEntitySpecialRenderer<TileAltar>
|
|||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x, y, z);
|
||||
this.renderFluid(getWorld(), level);
|
||||
if (level > 0)
|
||||
this.renderFluid(getWorld(), level);
|
||||
this.renderItem(tileAltar.getWorld(), inputStack, partialTicks);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
|
@ -173,7 +174,7 @@ public class RenderAltar extends TileEntitySpecialRenderer<TileAltar>
|
|||
break;
|
||||
}
|
||||
|
||||
RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ, world);
|
||||
RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package WayofTime.bloodmagic.client.render.block;
|
||||
|
||||
import WayofTime.bloodmagic.tile.TileBloodTank;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderBloodTank extends TileEntitySpecialRenderer<TileBloodTank>
|
||||
{
|
||||
private static final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileBloodTank bloodTank, double x, double y, double z, float partialTicks, int destroyStage)
|
||||
{
|
||||
if (bloodTank == null)
|
||||
return;
|
||||
|
||||
Fluid renderFluid = bloodTank.getClientRenderFluid();
|
||||
if (bloodTank.getRenderHeight() == 0 || renderFluid == null)
|
||||
return;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
|
||||
renderFluid(bloodTank.getRenderHeight(), renderFluid, x, y, z);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public void renderFluid(float scale, Fluid renderFluid, double x, double y, double z)
|
||||
{
|
||||
GlStateManager.translate(x, y, z);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
GlStateManager.disableRescaleNormal();
|
||||
GlStateManager.disableBlend();
|
||||
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer buffer = tessellator.getBuffer();
|
||||
|
||||
TextureAtlasSprite fluid = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(renderFluid.getStill().toString());
|
||||
fluid = fluid == null ? mc.getTextureMapBlocks().getMissingSprite() : fluid;
|
||||
|
||||
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
|
||||
final int rgbaColor = renderFluid.getColor();
|
||||
final int rColor = rgbaColor >> 16 & 0xFF;
|
||||
final int gColor = rgbaColor >> 8 & 0xFF;
|
||||
final int bColor = rgbaColor & 0xFF;
|
||||
final int aColor = rgbaColor >> 24 & 0xFF;
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(rColor, gColor, bColor, aColor);
|
||||
|
||||
float u1 = fluid.getMinU();
|
||||
float v1 = fluid.getMinV();
|
||||
float u2 = fluid.getMaxU();
|
||||
float v2 = fluid.getMaxV();
|
||||
|
||||
if (scale > 0)
|
||||
{
|
||||
float edge = 0.9375F;
|
||||
float otherEdge = 0.0625F;
|
||||
float offset = 0.002F;
|
||||
|
||||
// Top
|
||||
buffer.pos(0, scale - offset, 0).tex(u1, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(0, scale - offset, 1).tex(u1, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(1, scale - offset, 1).tex(u2, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(1, scale - offset, 0).tex(u2, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
|
||||
// Bottom
|
||||
buffer.pos(1, offset, 0).tex(u1, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(1, offset, 1).tex(u1, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(0, offset, 1).tex(u2, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(0, offset, 0).tex(u2, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
|
||||
if (scale > otherEdge)
|
||||
{
|
||||
if (scale > edge)
|
||||
scale = edge;
|
||||
|
||||
v2 -= (fluid.getMaxV() - fluid.getMinV()) * (1 - scale);
|
||||
|
||||
//NORTH
|
||||
buffer.pos(1, scale, offset).tex(u1, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(1, 0, offset).tex(u1, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(0, 0, offset).tex(u2, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(0, scale, offset).tex(u2, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
|
||||
//EAST
|
||||
buffer.pos(offset, 0, 1).tex(u1, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(offset, scale, 1).tex(u1, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(offset, scale, 0).tex(u2, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(offset, 0, 0).tex(u2, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
|
||||
//SOUTH
|
||||
buffer.pos(1, 0, 1 - offset).tex(u1, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(1, scale, 1 - offset).tex(u1, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(0, scale, 1 - offset).tex(u2, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(0, 0, 1 - offset).tex(u2, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
|
||||
//WEST
|
||||
buffer.pos(1 - offset, scale, 1).tex(u1, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(1 - offset, 0, 1).tex(u1, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(1 - offset, 0, 0).tex(u2, v2).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
buffer.pos(1 - offset, scale, 0).tex(u2, v1).color(rColor, gColor, bColor, aColor).endVertex();
|
||||
}
|
||||
}
|
||||
tessellator.draw();
|
||||
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package WayofTime.bloodmagic.client.render;
|
||||
package WayofTime.bloodmagic.client.render.block;
|
||||
|
||||
import WayofTime.bloodmagic.tile.TileDemonCrucible;
|
||||
import net.minecraft.client.Minecraft;
|
|
@ -1,4 +1,4 @@
|
|||
package WayofTime.bloodmagic.client.render;
|
||||
package WayofTime.bloodmagic.client.render.block;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
@ -11,7 +11,7 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
public class RenderFakeBlocks
|
||||
{
|
||||
public static void drawFakeBlock(TextureAtlasSprite texture, double minX, double minY, double minZ, World world)
|
||||
public static void drawFakeBlock(TextureAtlasSprite texture, double minX, double minY, double minZ)
|
||||
{
|
||||
if (texture == null)
|
||||
return;
|
|
@ -1,4 +1,4 @@
|
|||
package WayofTime.bloodmagic.client.render;
|
||||
package WayofTime.bloodmagic.client.render.block;
|
||||
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
|
@ -0,0 +1,7 @@
|
|||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package WayofTime.bloodmagic.client.render.block;
|
||||
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
|
@ -0,0 +1,205 @@
|
|||
package WayofTime.bloodmagic.client.render.model;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.BlockBloodTank;
|
||||
import WayofTime.bloodmagic.client.render.block.RenderBloodTank;
|
||||
import WayofTime.bloodmagic.tile.TileBloodTank;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.client.model.IPerspectiveAwareModel;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import javax.vecmath.Matrix4f;
|
||||
import javax.vecmath.Vector3f;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Shamelessly taken off of the Mekanism repository written by {@author aidancbrady}
|
||||
* https://github.com/aidancbrady/Mekanism
|
||||
*/
|
||||
public class BakedCustomItemModel implements IPerspectiveAwareModel
|
||||
{
|
||||
private IBakedModel baseModel;
|
||||
private ItemStack stack;
|
||||
|
||||
private TransformType prevTransform;
|
||||
|
||||
private static VertexFormat prevFormat = null;
|
||||
private static int prevMode = -1;
|
||||
|
||||
private static final RenderBloodTank tankRenderer = (RenderBloodTank) TileEntityRendererDispatcher.instance.mapSpecialRenderers.get(TileBloodTank.class);
|
||||
|
||||
public BakedCustomItemModel(IBakedModel model, ItemStack stack)
|
||||
{
|
||||
this.baseModel = model;
|
||||
this.stack = stack;
|
||||
}
|
||||
|
||||
private void doRender(TransformType transformType)
|
||||
{
|
||||
Block block = Block.getBlockFromItem(stack.getItem());
|
||||
|
||||
if (transformType == TransformType.GUI)
|
||||
{
|
||||
GlStateManager.rotate(180F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (block instanceof BlockBloodTank)
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
FluidStack fluid = null;
|
||||
float capacity = TileBloodTank.capacities[stack.getItemDamage()] * Fluid.BUCKET_VOLUME;
|
||||
int amount = 0;
|
||||
if (stack.hasTagCompound() && stack.getTagCompound().hasKey(Constants.NBT.TANK))
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound().getCompoundTag(Constants.NBT.TANK);
|
||||
fluid = FluidStack.loadFluidStackFromNBT(tag);
|
||||
if (fluid != null)
|
||||
amount = tag.getInteger("Amount");
|
||||
}
|
||||
|
||||
if (fluid != null && amount > 0)
|
||||
tankRenderer.renderFluid(amount / capacity, fluid.getFluid(), -0.498, -0.49, -0.498);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
pauseRenderer(tessellator);
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.rotate(180, 0.0F, 1.0F, 0.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
doRender(prevTransform);
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableLight(0);
|
||||
GlStateManager.enableLight(1);
|
||||
GlStateManager.enableColorMaterial();
|
||||
GlStateManager.colorMaterial(1032, 5634);
|
||||
GlStateManager.enableCull();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
resumeRenderer(tessellator);
|
||||
|
||||
return baseModel.getQuads(state, side, rand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
return baseModel.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d()
|
||||
{
|
||||
return baseModel.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer()
|
||||
{
|
||||
return baseModel.isBuiltInRenderer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return baseModel.getParticleTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
return baseModel.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
private static TRSRTransformation get(float tx, float ty, float tz, float ax, float ay, float az, float s)
|
||||
{
|
||||
return new TRSRTransformation(new Vector3f(tx / 16, ty / 16, tz / 16), TRSRTransformation.quatFromXYZDegrees(new Vector3f(ax, ay, az)), new Vector3f(s, s, s), null);
|
||||
}
|
||||
|
||||
public static Map<TransformType, TRSRTransformation> transforms = ImmutableMap.<TransformType, TRSRTransformation>builder()
|
||||
.put(TransformType.GUI, get(0, 0, 0, 30F, 225F, 0, 0.625F))
|
||||
.put(TransformType.THIRD_PERSON_RIGHT_HAND, get(0, 2.5F, 0, 75F, 45F, 0, 0.375F))
|
||||
.put(TransformType.THIRD_PERSON_LEFT_HAND, get(0, 2.5F, 0, 75F, 45F, 0, 0.375F))
|
||||
.put(TransformType.FIRST_PERSON_RIGHT_HAND, get(0, 0, 0, 0, 45F, 0, 0.4f))
|
||||
.put(TransformType.FIRST_PERSON_LEFT_HAND, get(0, 0, 0, 0, 225F, 0, 0.4F))
|
||||
.put(TransformType.GROUND, get(0, 2F, 0, 0, 0, 0, 0.25F))
|
||||
.put(TransformType.HEAD, get(0, 0, 0, 0, 0, 0, 1F))
|
||||
.put(TransformType.FIXED, get(0, 0, 0, 0, 0, 0, 1F))
|
||||
.put(TransformType.NONE, get(0, 0, 0, 0, 0, 0, 0))
|
||||
.build();
|
||||
|
||||
@Override
|
||||
public Pair<? extends IPerspectiveAwareModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType cameraTransformType)
|
||||
{
|
||||
prevTransform = cameraTransformType;
|
||||
return Pair.of(this, transforms.get(cameraTransformType).getMatrix());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return ItemOverrideList.NONE;
|
||||
}
|
||||
|
||||
public static void pauseRenderer(Tessellator tess)
|
||||
{
|
||||
if (isDrawing(tess))
|
||||
{
|
||||
prevFormat = tess.getBuffer().getVertexFormat();
|
||||
prevMode = tess.getBuffer().getDrawMode();
|
||||
tess.draw();
|
||||
}
|
||||
}
|
||||
|
||||
public static void resumeRenderer(Tessellator tess)
|
||||
{
|
||||
if (prevFormat != null)
|
||||
{
|
||||
tess.getBuffer().begin(prevMode, prevFormat);
|
||||
}
|
||||
|
||||
prevFormat = null;
|
||||
prevMode = -1;
|
||||
}
|
||||
|
||||
public static boolean isDrawing(Tessellator tess)
|
||||
{
|
||||
return isDrawing(tess.getBuffer());
|
||||
}
|
||||
|
||||
public static boolean isDrawing(VertexBuffer buffer)
|
||||
{
|
||||
return (Boolean) ReflectionHelper.getPrivateValue(VertexBuffer.class, buffer, "isDrawing", "field_179010_r");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package WayofTime.bloodmagic.client.render.model;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.*;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CustomModelFactory implements IBakedModel
|
||||
{
|
||||
private IBakedModel baseModel;
|
||||
|
||||
private BlockOverrideList override = new BlockOverrideList();
|
||||
|
||||
public CustomModelFactory(IBakedModel base)
|
||||
{
|
||||
baseModel = base;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return override;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(IBlockState state, EnumFacing facing, long rand)
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d()
|
||||
{
|
||||
return baseModel.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer()
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private class BlockOverrideList extends ItemOverrideList
|
||||
{
|
||||
public BlockOverrideList()
|
||||
{
|
||||
super(new ArrayList<ItemOverride>());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity)
|
||||
{
|
||||
return new BakedCustomItemModel(baseModel, stack);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,10 +4,8 @@ import java.util.Map;
|
|||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import mezz.jei.api.BlankModPlugin;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.IModRegistry;
|
||||
import mezz.jei.api.JEIPlugin;
|
||||
import mezz.jei.api.*;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
|
@ -80,6 +78,8 @@ public class BloodMagicPlugin extends BlankModPlugin
|
|||
}
|
||||
}
|
||||
|
||||
jeiHelper.getSubtypeRegistry().useNbtForSubtypes(Item.getItemFromBlock(ModBlocks.BLOOD_TANK));
|
||||
|
||||
registry.addRecipeClickArea(GuiSoulForge.class, 115, 15, 16, 88, Constants.Compat.JEI_CATEGORY_SOULFORGE);
|
||||
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.ALTAR), Constants.Compat.JEI_CATEGORY_ALTAR);
|
||||
|
|
|
@ -15,6 +15,7 @@ public class AlchemyArrayCraftingRecipeHandler implements IRecipeHandler<Alchemy
|
|||
return AlchemyArrayCraftingRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
|
@ -22,6 +23,12 @@ public class AlchemyArrayCraftingRecipeHandler implements IRecipeHandler<Alchemy
|
|||
return Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AlchemyArrayCraftingRecipeJEI recipe)
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AlchemyArrayCraftingRecipeJEI recipe)
|
||||
|
|
|
@ -15,6 +15,7 @@ public class AlchemyTableRecipeHandler implements IRecipeHandler<AlchemyTableRec
|
|||
return AlchemyTableRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
|
@ -22,6 +23,12 @@ public class AlchemyTableRecipeHandler implements IRecipeHandler<AlchemyTableRec
|
|||
return Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AlchemyTableRecipeJEI recipe)
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AlchemyTableRecipeJEI recipe)
|
||||
|
|
|
@ -15,6 +15,7 @@ public class AltarRecipeHandler implements IRecipeHandler<AltarRecipeJEI>
|
|||
return AltarRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
|
@ -22,6 +23,12 @@ public class AltarRecipeHandler implements IRecipeHandler<AltarRecipeJEI>
|
|||
return Constants.Compat.JEI_CATEGORY_ALTAR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AltarRecipeJEI recipe)
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ALTAR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AltarRecipeJEI recipe)
|
||||
|
|
|
@ -15,6 +15,7 @@ public class ArmourDowngradeRecipeHandler implements IRecipeHandler<ArmourDowngr
|
|||
return ArmourDowngradeRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
|
@ -22,6 +23,13 @@ public class ArmourDowngradeRecipeHandler implements IRecipeHandler<ArmourDowngr
|
|||
return Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(ArmourDowngradeRecipeJEI recipe)
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull ArmourDowngradeRecipeJEI recipe)
|
||||
|
|
|
@ -15,6 +15,7 @@ public class BindingRecipeHandler implements IRecipeHandler<BindingRecipeJEI>
|
|||
return BindingRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
|
@ -22,6 +23,12 @@ public class BindingRecipeHandler implements IRecipeHandler<BindingRecipeJEI>
|
|||
return Constants.Compat.JEI_CATEGORY_BINDING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull BindingRecipeJEI recipe)
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_BINDING;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull BindingRecipeJEI recipe)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package WayofTime.bloodmagic.compat.jei.forge;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class TartaricForgeRecipeHandler implements IRecipeHandler<TartaricForgeRecipeJEI>
|
||||
{
|
||||
|
@ -15,6 +15,7 @@ public class TartaricForgeRecipeHandler implements IRecipeHandler<TartaricForgeR
|
|||
return TartaricForgeRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
|
@ -22,6 +23,12 @@ public class TartaricForgeRecipeHandler implements IRecipeHandler<TartaricForgeR
|
|||
return Constants.Compat.JEI_CATEGORY_SOULFORGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull TartaricForgeRecipeJEI recipe)
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_SOULFORGE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull TartaricForgeRecipeJEI recipe)
|
||||
|
|
|
@ -19,6 +19,7 @@ public class ShapedOrbRecipeHandler implements IRecipeHandler<ShapedBloodOrbReci
|
|||
return ShapedBloodOrbRecipe.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
|
@ -26,6 +27,12 @@ public class ShapedOrbRecipeHandler implements IRecipeHandler<ShapedBloodOrbReci
|
|||
return VanillaRecipeCategoryUid.CRAFTING;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public String getRecipeCategoryUid(@Nonnull ShapedBloodOrbRecipe recipe)
|
||||
{
|
||||
return VanillaRecipeCategoryUid.CRAFTING;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull ShapedBloodOrbRecipe recipe)
|
||||
|
|
|
@ -17,6 +17,7 @@ public class ShapelessOrbRecipeHandler implements IRecipeHandler<ShapelessBloodO
|
|||
return ShapelessBloodOrbRecipe.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
|
@ -24,6 +25,12 @@ public class ShapelessOrbRecipeHandler implements IRecipeHandler<ShapelessBloodO
|
|||
return VanillaRecipeCategoryUid.CRAFTING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull ShapelessBloodOrbRecipe recipe)
|
||||
{
|
||||
return VanillaRecipeCategoryUid.CRAFTING;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull ShapelessBloodOrbRecipe recipe)
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
package WayofTime.bloodmagic.compat.waila;
|
||||
|
||||
import WayofTime.bloodmagic.block.*;
|
||||
import WayofTime.bloodmagic.compat.waila.provider.*;
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.BlockAlchemyArray;
|
||||
import WayofTime.bloodmagic.block.BlockAltar;
|
||||
import WayofTime.bloodmagic.block.BlockMimic;
|
||||
import WayofTime.bloodmagic.block.BlockRitualController;
|
||||
import WayofTime.bloodmagic.block.BlockTeleposer;
|
||||
import WayofTime.bloodmagic.block.base.BlockEnumPillar;
|
||||
import WayofTime.bloodmagic.block.base.BlockEnumPillarCap;
|
||||
import WayofTime.bloodmagic.block.base.BlockEnumStairs;
|
||||
import WayofTime.bloodmagic.compat.waila.provider.DataProviderAlchemyArray;
|
||||
import WayofTime.bloodmagic.compat.waila.provider.DataProviderBloodAltar;
|
||||
import WayofTime.bloodmagic.compat.waila.provider.DataProviderMimic;
|
||||
import WayofTime.bloodmagic.compat.waila.provider.DataProviderPillar;
|
||||
import WayofTime.bloodmagic.compat.waila.provider.DataProviderRitualController;
|
||||
import WayofTime.bloodmagic.compat.waila.provider.DataProviderTeleposer;
|
||||
|
||||
public class WailaCallbackHandler
|
||||
{
|
||||
|
@ -26,6 +17,8 @@ public class WailaCallbackHandler
|
|||
registrar.registerBodyProvider(new DataProviderTeleposer(), BlockTeleposer.class);
|
||||
registrar.registerBodyProvider(new DataProviderRitualController(), BlockRitualController.class);
|
||||
registrar.registerBodyProvider(new DataProviderAlchemyArray(), BlockAlchemyArray.class);
|
||||
registrar.registerBodyProvider(new DataProviderBloodTank(), BlockBloodTank.class);
|
||||
registrar.registerNBTProvider(new DataProviderBloodTank(), BlockBloodTank.class);
|
||||
registrar.registerStackProvider(new DataProviderAlchemyArray(), BlockAlchemyArray.class);
|
||||
registrar.registerStackProvider(new DataProviderMimic(), BlockMimic.class);
|
||||
registrar.registerNBTProvider(new DataProviderMimic(), BlockMimic.class);
|
||||
|
@ -38,5 +31,6 @@ public class WailaCallbackHandler
|
|||
registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_TELEPOSER, true);
|
||||
registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_RITUAL, true);
|
||||
registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_ARRAY, true);
|
||||
registrar.addConfig(Constants.Mod.MODID, Constants.Compat.WAILA_CONFIG_BLOOD_TANK, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
package WayofTime.bloodmagic.compat.waila.provider;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.BlockBloodTank;
|
||||
import WayofTime.bloodmagic.tile.TileBloodTank;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import com.google.common.base.Strings;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DataProviderBloodTank implements IWailaDataProvider
|
||||
{
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
if (!config.getConfig(Constants.Compat.WAILA_CONFIG_BLOOD_TANK))
|
||||
return currenttip;
|
||||
|
||||
if (accessor.getPlayer().isSneaking() || config.getConfig(Constants.Compat.WAILA_CONFIG_BYPASS_SNEAK))
|
||||
{
|
||||
if (accessor.getBlock() instanceof BlockBloodTank && accessor.getTileEntity() instanceof TileBloodTank)
|
||||
{
|
||||
TileBloodTank bloodTank = (TileBloodTank) accessor.getTileEntity();
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
int capacity = tag.getInteger(Constants.NBT.ALTAR_CAPACITY);
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.tier", bloodTank.getBlockMetadata() + 1));
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.capacity") + ": " + capacity + "mB");
|
||||
|
||||
tag = tag.getCompoundTag(Constants.NBT.TANK);
|
||||
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(tag);
|
||||
if (!Strings.isNullOrEmpty(tag.getString("FluidName")) && fluidStack != null)
|
||||
{
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.type") + ": " + fluidStack.getLocalizedName());
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.amount") + ": " + tag.getInteger("Amount") + "/" + capacity + "mB");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currenttip.add(TextHelper.localizeEffect("waila.BloodMagic.sneak"));
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos)
|
||||
{
|
||||
if (te != null)
|
||||
te.writeToNBT(tag);
|
||||
return tag;
|
||||
}
|
||||
}
|
|
@ -1,14 +1,22 @@
|
|||
package WayofTime.bloodmagic.item.block;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.BlockBloodTank;
|
||||
import WayofTime.bloodmagic.tile.TileBloodTank;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import com.google.common.base.Strings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidContainerItem;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import net.minecraftforge.fluids.capability.templates.FluidHandlerItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -17,53 +25,71 @@ public class ItemBlockBloodTank extends ItemBlock implements IFluidContainerItem
|
|||
public ItemBlockBloodTank(Block block)
|
||||
{
|
||||
super(block);
|
||||
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack)
|
||||
{
|
||||
if (stack.hasTagCompound() && stack.getTagCompound().hasKey("tank") && !stack.getTagCompound().getCompoundTag("tank").getString("FluidName").equals(""))
|
||||
if (stack.hasTagCompound() && stack.getTagCompound().hasKey(Constants.NBT.TANK) && !stack.getTagCompound().getCompoundTag(Constants.NBT.TANK).getString("FluidName").equals(""))
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound().getCompoundTag("tank");
|
||||
return super.getItemStackDisplayName(stack) + " (" + tag.getString("FluidName") + ")";
|
||||
} else
|
||||
NBTTagCompound tag = stack.getTagCompound().getCompoundTag(Constants.NBT.TANK);
|
||||
return super.getItemStackDisplayName(stack) + " " + TextHelper.localizeEffect("tooltip.BloodMagic.tier", stack.getItemDamage() + 1) + " (" + FluidStack.loadFluidStackFromNBT(tag).getLocalizedName() + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.getItemStackDisplayName(stack);
|
||||
return super.getItemStackDisplayName(stack) + " " + TextHelper.localizeEffect("tooltip.BloodMagic.tier", stack.getItemDamage() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO - Correctly localize these strings
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer entityPlayer, List<String> tooltip, boolean advanced)
|
||||
{
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.capacity") + ": " + String.valueOf(getCapacity(stack)) + "mB");
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.tier", stack.getItemDamage() + 1));
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.capacity") + ": " + getCapacity(stack) + "mB");
|
||||
if (stack.hasTagCompound())
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound().getCompoundTag("tank");
|
||||
if (!tag.getString("FluidName").equals(""))
|
||||
NBTTagCompound tag = stack.getTagCompound().getCompoundTag(Constants.NBT.TANK);
|
||||
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(tag);
|
||||
if (!Strings.isNullOrEmpty(tag.getString("FluidName")) && fluidStack != null)
|
||||
{
|
||||
tooltip.add(" ");
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.type") + ": " + tag.getString("FluidName"));
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.type") + ": " + fluidStack.getLocalizedName());
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.fluid.amount") + ": " + tag.getInteger("Amount") + "/" + getCapacity(stack) + "mB");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List<ItemStack> list)
|
||||
{
|
||||
for (int i = 0; i < TileBloodTank.capacities.length; i++)
|
||||
list.add(new ItemStack(id, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack getFluid(ItemStack stack)
|
||||
{
|
||||
if (stack.hasTagCompound() && stack.getTagCompound().hasKey("tank") && !stack.getTagCompound().getCompoundTag("tank").getString("FluidName").equals(""))
|
||||
if (stack.hasTagCompound() && stack.getTagCompound().hasKey(Constants.NBT.TANK) && !stack.getTagCompound().getCompoundTag(Constants.NBT.TANK).getString("FluidName").equals(""))
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound().getCompoundTag("tank");
|
||||
NBTTagCompound tag = stack.getTagCompound().getCompoundTag(Constants.NBT.TANK);
|
||||
return FluidStack.loadFluidStackFromNBT(tag);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCapacity(ItemStack container)
|
||||
{
|
||||
return TileBloodTank.capacity;
|
||||
return container != null && Block.getBlockFromItem(container.getItem()) instanceof BlockBloodTank ? TileBloodTank.capacities[container.getMetadata()] * Fluid.BUCKET_VOLUME : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,11 +97,14 @@ public class ItemBlockBloodTank extends ItemBlock implements IFluidContainerItem
|
|||
{
|
||||
if (resource == null || stack.stackSize != 1)
|
||||
return 0;
|
||||
|
||||
int fillAmount = 0, capacity = getCapacity(stack);
|
||||
NBTTagCompound tag = stack.getTagCompound(), fluidTag = null;
|
||||
FluidStack fluid = null;
|
||||
if (tag == null || !tag.hasKey("tank") || (fluidTag = tag.getCompoundTag("tank")) == null || (fluid = FluidStack.loadFluidStackFromNBT(fluidTag)) == null)
|
||||
|
||||
if (tag == null || !tag.hasKey(Constants.NBT.TANK) || (fluidTag = tag.getCompoundTag(Constants.NBT.TANK)) == null || (fluid = FluidStack.loadFluidStackFromNBT(fluidTag)) == null)
|
||||
fillAmount = Math.min(capacity, resource.amount);
|
||||
|
||||
if (fluid == null)
|
||||
{
|
||||
if (doFill)
|
||||
|
@ -83,19 +112,24 @@ public class ItemBlockBloodTank extends ItemBlock implements IFluidContainerItem
|
|||
fluid = resource.copy();
|
||||
fluid.amount = 0;
|
||||
}
|
||||
} else if (!fluid.isFluidEqual(resource))
|
||||
}
|
||||
else if (!fluid.isFluidEqual(resource))
|
||||
return 0;
|
||||
else
|
||||
fillAmount = Math.min(capacity - fluid.amount, resource.amount);
|
||||
|
||||
fillAmount = Math.max(fillAmount, 0);
|
||||
|
||||
if (doFill)
|
||||
{
|
||||
if (tag == null)
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
|
||||
tag = stack.getTagCompound();
|
||||
fluid.amount += fillAmount;
|
||||
tag.setTag("tank", fluid.writeToNBT(fluidTag == null ? new NBTTagCompound() : fluidTag));
|
||||
tag.setTag(Constants.NBT.TANK, fluid.writeToNBT(fluidTag == null ? new NBTTagCompound() : fluidTag));
|
||||
}
|
||||
|
||||
return fillAmount;
|
||||
}
|
||||
|
||||
|
@ -103,22 +137,32 @@ public class ItemBlockBloodTank extends ItemBlock implements IFluidContainerItem
|
|||
public FluidStack drain(ItemStack stack, int maxDrain, boolean doDrain)
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound(), fluidTag = null;
|
||||
FluidStack fluid = null;
|
||||
if (tag == null || !tag.hasKey("tank") || (fluidTag = tag.getCompoundTag("tank")) == null || (fluid = FluidStack.loadFluidStackFromNBT(fluidTag)) == null)
|
||||
FluidStack fluid;
|
||||
|
||||
if (tag == null || !tag.hasKey(Constants.NBT.TANK) || (fluidTag = tag.getCompoundTag(Constants.NBT.TANK)) == null || (fluid = FluidStack.loadFluidStackFromNBT(fluidTag)) == null)
|
||||
{
|
||||
if (fluidTag != null)
|
||||
tag.removeTag("tank");
|
||||
tag.removeTag(Constants.NBT.TANK);
|
||||
return null;
|
||||
}
|
||||
|
||||
int drainAmount = Math.min(maxDrain, fluid.amount);
|
||||
|
||||
if (doDrain)
|
||||
{
|
||||
tag.removeTag("tank");
|
||||
tag.removeTag(Constants.NBT.TANK);
|
||||
fluid.amount -= drainAmount;
|
||||
if (fluid.amount > 0)
|
||||
fill(stack, fluid, true);
|
||||
}
|
||||
|
||||
fluid.amount = drainAmount;
|
||||
return fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt)
|
||||
{
|
||||
return new FluidHandlerItemStack(stack, getCapacity(stack));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,8 @@ import net.minecraft.util.EnumFacing;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class ItemBlockDemonCrystal extends ItemBlock
|
||||
{
|
||||
public ItemBlockDemonCrystal(Block block)
|
||||
|
@ -23,7 +25,7 @@ public class ItemBlockDemonCrystal extends ItemBlock
|
|||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack)
|
||||
{
|
||||
return super.getUnlocalizedName(stack) + EnumDemonWillType.values()[stack.getItemDamage()];
|
||||
return super.getUnlocalizedName(stack) + EnumDemonWillType.values()[stack.getItemDamage()].toString().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,13 +3,14 @@ package WayofTime.bloodmagic.proxy;
|
|||
import java.awt.Color;
|
||||
|
||||
import WayofTime.bloodmagic.client.key.KeyBindings;
|
||||
import WayofTime.bloodmagic.client.render.block.*;
|
||||
import WayofTime.bloodmagic.tile.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.color.IItemColor;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionUtils;
|
||||
|
@ -36,11 +37,6 @@ import WayofTime.bloodmagic.client.helper.ShaderHelper;
|
|||
import WayofTime.bloodmagic.client.hud.HUDElementDemonWillAura;
|
||||
import WayofTime.bloodmagic.client.hud.HUDElementHolding;
|
||||
import WayofTime.bloodmagic.client.render.LayerBloodElytra;
|
||||
import WayofTime.bloodmagic.client.render.RenderAlchemyArray;
|
||||
import WayofTime.bloodmagic.client.render.RenderAltar;
|
||||
import WayofTime.bloodmagic.client.render.RenderDemonCrucible;
|
||||
import WayofTime.bloodmagic.client.render.RenderItemRoutingNode;
|
||||
import WayofTime.bloodmagic.client.render.block.RenderMimic;
|
||||
import WayofTime.bloodmagic.client.render.entity.BloodLightRenderFactory;
|
||||
import WayofTime.bloodmagic.client.render.entity.CorruptedChickenRenderFactory;
|
||||
import WayofTime.bloodmagic.client.render.entity.CorruptedSheepRenderFactory;
|
||||
|
@ -63,11 +59,6 @@ import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow;
|
|||
import WayofTime.bloodmagic.entity.projectile.EntitySoulSnare;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import WayofTime.bloodmagic.tile.TileAlchemyArray;
|
||||
import WayofTime.bloodmagic.tile.TileAltar;
|
||||
import WayofTime.bloodmagic.tile.TileDemonCrucible;
|
||||
import WayofTime.bloodmagic.tile.TileInversionPillar;
|
||||
import WayofTime.bloodmagic.tile.TileMimic;
|
||||
import WayofTime.bloodmagic.tile.routing.TileRoutingNode;
|
||||
import WayofTime.bloodmagic.util.helper.InventoryRenderHelper;
|
||||
import WayofTime.bloodmagic.util.helper.InventoryRenderHelperV2;
|
||||
|
@ -120,6 +111,7 @@ public class ClientProxy extends CommonProxy
|
|||
ClientRegistry.bindTileEntitySpecialRenderer(TileRoutingNode.class, new RenderItemRoutingNode());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileDemonCrucible.class, new RenderDemonCrucible());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileMimic.class, new RenderMimic());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileBloodTank.class, new RenderBloodTank());
|
||||
|
||||
// Initialize key-binds during startup so they load correctly
|
||||
for (KeyBindings key : KeyBindings.values())
|
||||
|
|
|
@ -1,70 +1,92 @@
|
|||
package WayofTime.bloodmagic.tile;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.tile.base.TileBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
|
||||
public class TileBloodTank extends TileBase implements IFluidHandler
|
||||
public class TileBloodTank extends TileBase
|
||||
{
|
||||
public static int capacity;
|
||||
public FluidTank tank;
|
||||
public int capacity;
|
||||
protected FluidTank tank;
|
||||
|
||||
public TileBloodTank()
|
||||
public static int[] capacities = { 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65336, 131072, 262144, 524288 };
|
||||
|
||||
public TileBloodTank(int meta)
|
||||
{
|
||||
capacity = 32 * FluidContainerRegistry.BUCKET_VOLUME;
|
||||
capacity = capacities[meta] * Fluid.BUCKET_VOLUME;
|
||||
tank = new FluidTank(capacity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill)
|
||||
public TileBloodTank()
|
||||
{
|
||||
return tank.fill(resource, doFill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain)
|
||||
{
|
||||
return tank.drain(resource.amount, doDrain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain)
|
||||
{
|
||||
return tank.drain(maxDrain, doDrain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(EnumFacing from, Fluid fluid)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(EnumFacing from, Fluid fluid)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(EnumFacing from)
|
||||
{
|
||||
return new FluidTankInfo[] { tank.getInfo() };
|
||||
capacity = capacities[0] * Fluid.BUCKET_VOLUME;
|
||||
tank = new FluidTank(capacity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(NBTTagCompound tagCompound)
|
||||
{
|
||||
tank.readFromNBT(tagCompound.getCompoundTag("tank"));
|
||||
capacity = tagCompound.getInteger("capacity");
|
||||
super.deserialize(tagCompound);
|
||||
tank.readFromNBT(tagCompound.getCompoundTag(Constants.NBT.TANK));
|
||||
capacity = tagCompound.getInteger(Constants.NBT.ALTAR_CAPACITY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound serialize(NBTTagCompound tagCompound)
|
||||
{
|
||||
super.serialize(tagCompound);
|
||||
if (tank.getFluidAmount() != 0)
|
||||
tagCompound.setTag("tank", tank.writeToNBT(new NBTTagCompound()));
|
||||
tagCompound.setInteger("capacity", capacity);
|
||||
tagCompound.setTag(Constants.NBT.TANK, tank.writeToNBT(new NBTTagCompound()));
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_CAPACITY, capacity);
|
||||
return tagCompound;
|
||||
}
|
||||
|
||||
public int getCapacity()
|
||||
{
|
||||
return capacity;
|
||||
}
|
||||
|
||||
public FluidTank getTank()
|
||||
{
|
||||
return tank;
|
||||
}
|
||||
|
||||
public Fluid getClientRenderFluid()
|
||||
{
|
||||
if (tank != null && tank.getFluid() != null)
|
||||
return tank.getFluid().getFluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
public float getRenderHeight()
|
||||
{
|
||||
if (tank != null && tank.getFluidAmount() > 0)
|
||||
return (float) tank.getFluidAmount() / (float) getCapacity();
|
||||
return 0F;
|
||||
}
|
||||
|
||||
public int getComparatorOutput()
|
||||
{
|
||||
return tank.getFluidAmount() > 0 ? (int) (1 + ((double) tank.getFluidAmount() / (double) tank.getCapacity()) * 14) : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCapability(Capability<?> capability, EnumFacing facing)
|
||||
{
|
||||
return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY || super.hasCapability(capability, facing);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> T getCapability(Capability<T> capability, EnumFacing facing)
|
||||
{
|
||||
if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||
return (T) tank;
|
||||
return super.getCapability(capability, facing);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,10 +44,7 @@ import net.minecraftforge.common.IPlantable;
|
|||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import net.minecraftforge.common.ISpecialArmor.ArmorProperties;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import net.minecraftforge.fml.common.discovery.ASMDataTable;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
@ -570,7 +567,7 @@ public class Utils
|
|||
*/
|
||||
public static boolean canCombine(ItemStack stack1, ItemStack stack2)
|
||||
{
|
||||
if (stack1 == null)
|
||||
if (stack1 == null || stack1.isItemStackDamageable() ^ stack2.isItemStackDamageable())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -580,11 +577,6 @@ public class Utils
|
|||
return true;
|
||||
}
|
||||
|
||||
if (stack1.isItemStackDamageable() ^ stack2.isItemStackDamageable())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return stack1.getItem() == stack2.getItem() && stack1.getItemDamage() == stack2.getItemDamage() && ItemStack.areItemStackTagsEqual(stack1, stack2);
|
||||
}
|
||||
|
||||
|
@ -1126,67 +1118,6 @@ public class Utils
|
|||
return true;
|
||||
}
|
||||
|
||||
//Shamelessly ripped off of CoFH Lib
|
||||
public static boolean fillContainerFromHandler(World world, IFluidHandler handler, EntityPlayer player, FluidStack tankFluid)
|
||||
{
|
||||
ItemStack container = player.getHeldItemMainhand();
|
||||
if (FluidContainerRegistry.isEmptyContainer(container))
|
||||
{
|
||||
ItemStack returnStack = FluidContainerRegistry.fillFluidContainer(tankFluid, container);
|
||||
FluidStack fluid = FluidContainerRegistry.getFluidForFilledItem(returnStack);
|
||||
if (fluid == null || returnStack == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
if (container.stackSize == 1)
|
||||
{
|
||||
container = container.copy();
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, returnStack);
|
||||
} else if (!player.inventory.addItemStackToInventory(returnStack))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
handler.drain(EnumFacing.UP, fluid.amount, true);
|
||||
container.stackSize--;
|
||||
if (container.stackSize <= 0)
|
||||
{
|
||||
container = null;
|
||||
}
|
||||
} else
|
||||
{
|
||||
handler.drain(EnumFacing.UP, fluid.amount, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//Shamelessly ripped off of CoFH Lib
|
||||
public static boolean fillHandlerWithContainer(World world, IFluidHandler handler, EntityPlayer player)
|
||||
{
|
||||
ItemStack container = player.getHeldItemMainhand();
|
||||
FluidStack fluid = FluidContainerRegistry.getFluidForFilledItem(container);
|
||||
if (fluid != null)
|
||||
{
|
||||
if (handler.fill(EnumFacing.UP, fluid, false) == fluid.amount || player.capabilities.isCreativeMode)
|
||||
{
|
||||
if (world.isRemote)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
handler.fill(EnumFacing.UP, fluid, true);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, consumeItem(container));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//Shamelessly ripped off of CoFH Lib
|
||||
public static ItemStack consumeItem(ItemStack stack)
|
||||
{
|
||||
|
|
|
@ -9,10 +9,11 @@ import java.util.Set;
|
|||
import javax.annotation.Nullable;
|
||||
|
||||
import WayofTime.bloodmagic.client.key.KeyBindings;
|
||||
import WayofTime.bloodmagic.client.render.model.CustomModelFactory;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.*;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -49,7 +50,7 @@ import WayofTime.bloodmagic.api.registry.RitualRegistry;
|
|||
import WayofTime.bloodmagic.api.ritual.Ritual;
|
||||
import WayofTime.bloodmagic.api.ritual.RitualComponent;
|
||||
import WayofTime.bloodmagic.client.hud.HUDElement;
|
||||
import WayofTime.bloodmagic.client.render.RenderFakeBlocks;
|
||||
import WayofTime.bloodmagic.client.render.block.RenderFakeBlocks;
|
||||
import WayofTime.bloodmagic.item.ItemRitualDiviner;
|
||||
import WayofTime.bloodmagic.item.sigil.ItemSigilHolding;
|
||||
import WayofTime.bloodmagic.network.BloodMagicPacketHandler;
|
||||
|
@ -222,6 +223,12 @@ public class ClientHandler
|
|||
@SubscribeEvent
|
||||
public void onModelBake(ModelBakeEvent event)
|
||||
{
|
||||
ModelResourceLocation location = new ModelResourceLocation("bloodmagic:BlockBloodTank", "inventory");
|
||||
IBakedModel model = event.getModelRegistry().getObject(location);
|
||||
|
||||
if (model instanceof IBakedModel)
|
||||
event.getModelRegistry().putObject(location, new CustomModelFactory(model));
|
||||
|
||||
if (BloodMagic.isDev() && SUPPRESS_ASSET_ERRORS)
|
||||
return;
|
||||
|
||||
|
@ -369,7 +376,7 @@ public class ClientHandler
|
|||
break;
|
||||
}
|
||||
|
||||
RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ, world);
|
||||
RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -433,7 +440,7 @@ public class ClientHandler
|
|||
break;
|
||||
}
|
||||
|
||||
RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ, world);
|
||||
RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@ public class InventoryRenderHelper
|
|||
*
|
||||
* @return The class name of the given Item
|
||||
*/
|
||||
private static String getClassName(Item item)
|
||||
public static String getClassName(Item item)
|
||||
{
|
||||
return item instanceof ItemBlock ? Block.getBlockFromItem(item).getClass().getSimpleName() : item.getClass().getSimpleName();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"textures": { "all": "bloodmagic:blocks/BloodTank" },
|
||||
"model": "cube_all",
|
||||
"uvlock": true
|
||||
},
|
||||
"variants": {
|
||||
"tier": {
|
||||
"0": {},
|
||||
"1": {},
|
||||
"2": {},
|
||||
"3": {},
|
||||
"4": {},
|
||||
"5": {},
|
||||
"6": {},
|
||||
"7": {},
|
||||
"8": {},
|
||||
"9": {},
|
||||
"10": {},
|
||||
"11": {},
|
||||
"12": {},
|
||||
"13": {},
|
||||
"14": {},
|
||||
"15": {}
|
||||
},
|
||||
"inventory": [{}]
|
||||
}
|
||||
}
|
|
@ -254,11 +254,11 @@ tile.BloodMagic.path.obsidiantile.name=Tiled Obsidian Path
|
|||
tile.BloodMagic.dimensionalPortal.name=Dimensional Portal
|
||||
tile.BloodMagic.bloodTank.name=Blood Tank
|
||||
|
||||
tile.BloodMagic.demonCrystalDEFAULT.name=Demon Will Crystal Cluster
|
||||
tile.BloodMagic.demonCrystalCORROSIVE.name=Corrosive Will Crystal Cluster
|
||||
tile.BloodMagic.demonCrystalDESTRUCTIVE.name=Destructive Will Crystal Cluster
|
||||
tile.BloodMagic.demonCrystalVENGEFUL.name=Vengeful Will Crystal Cluster
|
||||
tile.BloodMagic.demonCrystalSTEADFAST.name=Steadfast Will Crystal Cluster
|
||||
tile.BloodMagic.demonCrystal.default.name=Demon Will Crystal Cluster
|
||||
tile.BloodMagic.demonCrystal.corrosive.name=Corrosive Will Crystal Cluster
|
||||
tile.BloodMagic.demonCrystal.destructive.name=Destructive Will Crystal Cluster
|
||||
tile.BloodMagic.demonCrystal.vengeful.name=Vengeful Will Crystal Cluster
|
||||
tile.BloodMagic.demonCrystal.steadfast.name=Steadfast Will Crystal Cluster
|
||||
|
||||
tile.BloodMagic.mimic.nohitbox.name=Ethereal Opaque Mimic Block
|
||||
tile.BloodMagic.mimic.solidopaque.name=Opaque Mimic Block
|
||||
|
@ -380,6 +380,7 @@ tooltip.BloodMagic.orb.owner=Added by: %s
|
|||
tooltip.BloodMagic.currentOwner=Current owner: %s
|
||||
tooltip.BloodMagic.currentTier=Current tier: %d
|
||||
tooltip.BloodMagic.config.disabled=Currently disabled in the Config
|
||||
tooltip.BloodMagic.tier=Tier %d
|
||||
|
||||
tooltip.BloodMagic.activated=Activated
|
||||
tooltip.BloodMagic.deactivated=Deactivated
|
||||
|
|
|
@ -237,11 +237,11 @@ tile.BloodMagic.path.obsidiantile.name=Chemin en Obsidienne Carrelée
|
|||
tile.BloodMagic.dimensionalPortal.name=Portail Dimensionnel
|
||||
tile.BloodMagic.bloodTank.name=Réservoir de Sang
|
||||
|
||||
tile.BloodMagic.demonCrystalDEFAULT.name=Groupe de Cristaux d'une Volonté Diabolique
|
||||
tile.BloodMagic.demonCrystalCORROSIVE.name=Groupe de Cristaux d'une Volonté Corrosive
|
||||
tile.BloodMagic.demonCrystalDESTRUCTIVE.name=Groupe de Cristaux d'une Volonté Destructive
|
||||
tile.BloodMagic.demonCrystalVENGEFUL.name=Groupe de Cristaux d'une Volonté Vengeresse
|
||||
tile.BloodMagic.demonCrystalSTEADFAST.name=Groupe de Cristaux d'une Volonté Inébranlable
|
||||
tile.BloodMagic.demonCrystal.default.name=Groupe de Cristaux d'une Volonté Diabolique
|
||||
tile.BloodMagic.demonCrystal.corrosive.name=Groupe de Cristaux d'une Volonté Corrosive
|
||||
tile.BloodMagic.demonCrystal.destructive.name=Groupe de Cristaux d'une Volonté Destructive
|
||||
tile.BloodMagic.demonCrystal.vengeful.name=Groupe de Cristaux d'une Volonté Vengeresse
|
||||
tile.BloodMagic.demonCrystal.steadfast.name=Groupe de Cristaux d'une Volonté Inébranlable
|
||||
|
||||
# Fluids
|
||||
fluid.lifeEssence=Essence de Vie
|
||||
|
|
|
@ -250,11 +250,11 @@ tile.BloodMagic.path.obsidiantile.name=タイル状の黒曜石の経路
|
|||
tile.BloodMagic.dimensionalPortal.name=ワープポータル
|
||||
tile.BloodMagic.bloodTank.name=血液タンク
|
||||
|
||||
tile.BloodMagic.demonCrystalDEFAULT.name=デーモンウィル結晶株
|
||||
tile.BloodMagic.demonCrystalCORROSIVE.name=腐食性ウィル結晶株
|
||||
tile.BloodMagic.demonCrystalDESTRUCTIVE.name=破壊性ウィル結晶株
|
||||
tile.BloodMagic.demonCrystalVENGEFUL.name=報復性ウィル結晶株
|
||||
tile.BloodMagic.demonCrystalSTEADFAST.name=不活性ウィル結晶株
|
||||
tile.BloodMagic.demonCrystal.default.name=デーモンウィル結晶株
|
||||
tile.BloodMagic.demonCrystal.corrosive.name=腐食性ウィル結晶株
|
||||
tile.BloodMagic.demonCrystal.destructive.name=破壊性ウィル結晶株
|
||||
tile.BloodMagic.demonCrystal.vengeful.name=報復性ウィル結晶株
|
||||
tile.BloodMagic.demonCrystal.steadfast.name=不活性ウィル結晶株
|
||||
|
||||
tile.BloodMagic.mimic.nohitbox.name=希薄で不透明なミミックブロック
|
||||
tile.BloodMagic.mimic.solidopaque.name=不透明なミミックブロック
|
||||
|
|
|
@ -244,11 +244,11 @@ tile.BloodMagic.path.obsidiantile.name=黑曜石瓦路面
|
|||
tile.BloodMagic.dimensionalPortal.name=空间传送门
|
||||
tile.BloodMagic.bloodTank.name=血液槽
|
||||
|
||||
tile.BloodMagic.demonCrystalDEFAULT.name=恶魔意志晶簇
|
||||
tile.BloodMagic.demonCrystalCORROSIVE.name=腐蚀意志晶簇
|
||||
tile.BloodMagic.demonCrystalDESTRUCTIVE.name=破坏意志晶簇
|
||||
tile.BloodMagic.demonCrystalVENGEFUL.name=复仇意志晶簇
|
||||
tile.BloodMagic.demonCrystalSTEADFAST.name=坚定意志晶簇
|
||||
tile.BloodMagic.demonCrystal.default.name=恶魔意志晶簇
|
||||
tile.BloodMagic.demonCrystal.corrosive.name=腐蚀意志晶簇
|
||||
tile.BloodMagic.demonCrystal.destructive.name=破坏意志晶簇
|
||||
tile.BloodMagic.demonCrystal.vengeful.name=复仇意志晶簇
|
||||
tile.BloodMagic.demonCrystal.steadfast.name=坚定意志晶簇
|
||||
|
||||
tile.BloodMagic.mimic.nohitbox.name=悬幽不透明的拟态方块
|
||||
tile.BloodMagic.mimic.solidopaque.name=不透明的拟态方块
|
||||
|
|
Binary file not shown.
After ![]() (image error) Size: 308 B |
Binary file not shown.
After ![]() (image error) Size: 1.1 KiB |
Loading…
Reference in a new issue