Sweeping changes, mainly NBT related
This commit is contained in:
parent
4035d91151
commit
c8996c8fba
|
@ -113,18 +113,18 @@ public class AlchemyArrayEffectLaputa extends AlchemyArrayEffect {
|
|||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger("radius", radius);
|
||||
tag.setInteger("teleportHeightOffset", teleportHeightOffset);
|
||||
tag.setInteger(Constants.NBT.X_COORD, currentPos.getX());
|
||||
tag.setInteger(Constants.NBT.Y_COORD, currentPos.getY());
|
||||
tag.setInteger(Constants.NBT.Z_COORD, currentPos.getZ());
|
||||
tag.putInt("radius", radius);
|
||||
tag.putInt("teleportHeightOffset", teleportHeightOffset);
|
||||
tag.putInt(Constants.NBT.X_COORD, currentPos.getX());
|
||||
tag.putInt(Constants.NBT.Y_COORD, currentPos.getY());
|
||||
tag.putInt(Constants.NBT.Z_COORD, currentPos.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
radius = tag.getInteger("radius");
|
||||
teleportHeightOffset = tag.getInteger("teleportHeightOffset");
|
||||
currentPos = new BlockPos(tag.getInteger(Constants.NBT.X_COORD), tag.getInteger(Constants.NBT.Y_COORD), tag.getInteger(Constants.NBT.Z_COORD));
|
||||
radius = tag.getInt("radius");
|
||||
teleportHeightOffset = tag.getInt("teleportHeightOffset");
|
||||
currentPos = new BlockPos(tag.getInt(Constants.NBT.X_COORD), tag.getInt(Constants.NBT.Y_COORD), tag.getInt(Constants.NBT.Z_COORD));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -77,7 +77,7 @@ public class AlchemyCircleRenderer {
|
|||
float size = 1.0F * getSizeModifier(craftTime);
|
||||
|
||||
// Bind the texture to the circle
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.enableBlend();
|
||||
|
|
|
@ -82,21 +82,21 @@ public class BloodAltar implements IFluidHandler {
|
|||
if (fluid != null)
|
||||
setMainFluid(fluid);
|
||||
|
||||
FluidStack fluidOut = new FluidStack(BlockLifeEssence.getLifeEssence(), tagCompound.getInteger(Constants.NBT.OUTPUT_AMOUNT));
|
||||
FluidStack fluidOut = new FluidStack(BlockLifeEssence.getLifeEssence(), tagCompound.getInt(Constants.NBT.OUTPUT_AMOUNT));
|
||||
setOutputFluid(fluidOut);
|
||||
|
||||
FluidStack fluidIn = new FluidStack(BlockLifeEssence.getLifeEssence(), tagCompound.getInteger(Constants.NBT.INPUT_AMOUNT));
|
||||
FluidStack fluidIn = new FluidStack(BlockLifeEssence.getLifeEssence(), tagCompound.getInt(Constants.NBT.INPUT_AMOUNT));
|
||||
setInputFluid(fluidIn);
|
||||
}
|
||||
|
||||
internalCounter = tagCompound.getInteger("internalCounter");
|
||||
internalCounter = tagCompound.getInt("internalCounter");
|
||||
altarTier = Enums.getIfPresent(AltarTier.class, tagCompound.getString(Constants.NBT.ALTAR_TIER)).or(AltarTier.ONE);
|
||||
isActive = tagCompound.getBoolean(Constants.NBT.ALTAR_ACTIVE);
|
||||
liquidRequired = tagCompound.getInteger(Constants.NBT.ALTAR_LIQUID_REQ);
|
||||
liquidRequired = tagCompound.getInt(Constants.NBT.ALTAR_LIQUID_REQ);
|
||||
canBeFilled = tagCompound.getBoolean(Constants.NBT.ALTAR_FILLABLE);
|
||||
isUpgraded = tagCompound.getBoolean(Constants.NBT.ALTAR_UPGRADED);
|
||||
consumptionRate = tagCompound.getInteger(Constants.NBT.ALTAR_CONSUMPTION_RATE);
|
||||
drainRate = tagCompound.getInteger(Constants.NBT.ALTAR_DRAIN_RATE);
|
||||
consumptionRate = tagCompound.getInt(Constants.NBT.ALTAR_CONSUMPTION_RATE);
|
||||
drainRate = tagCompound.getInt(Constants.NBT.ALTAR_DRAIN_RATE);
|
||||
consumptionMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_CONSUMPTION_MULTIPLIER);
|
||||
efficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_EFFICIENCY_MULTIPLIER);
|
||||
selfSacrificeEfficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_SELF_SACRIFICE_MULTIPLIER);
|
||||
|
@ -104,18 +104,18 @@ public class BloodAltar implements IFluidHandler {
|
|||
capacityMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_CAPACITY_MULTIPLIER);
|
||||
orbCapacityMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_ORB_CAPACITY_MULTIPLIER);
|
||||
dislocationMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_DISLOCATION_MULTIPLIER);
|
||||
capacity = tagCompound.getInteger(Constants.NBT.ALTAR_CAPACITY);
|
||||
bufferCapacity = tagCompound.getInteger(Constants.NBT.ALTAR_BUFFER_CAPACITY);
|
||||
progress = tagCompound.getInteger(Constants.NBT.ALTAR_PROGRESS);
|
||||
capacity = tagCompound.getInt(Constants.NBT.ALTAR_CAPACITY);
|
||||
bufferCapacity = tagCompound.getInt(Constants.NBT.ALTAR_BUFFER_CAPACITY);
|
||||
progress = tagCompound.getInt(Constants.NBT.ALTAR_PROGRESS);
|
||||
isResultBlock = tagCompound.getBoolean(Constants.NBT.ALTAR_IS_RESULT_BLOCK);
|
||||
lockdownDuration = tagCompound.getInteger(Constants.NBT.ALTAR_LOCKDOWN_DURATION);
|
||||
accelerationUpgrades = tagCompound.getInteger(Constants.NBT.ALTAR_ACCELERATION_UPGRADES);
|
||||
demonBloodDuration = tagCompound.getInteger(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION);
|
||||
cooldownAfterCrafting = tagCompound.getInteger(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING);
|
||||
chargingRate = tagCompound.getInteger(Constants.NBT.ALTAR_CHARGE_RATE);
|
||||
chargingFrequency = tagCompound.getInteger(Constants.NBT.ALTAR_CHARGE_FREQUENCY);
|
||||
totalCharge = tagCompound.getInteger(Constants.NBT.ALTAR_TOTAL_CHARGE);
|
||||
maxCharge = tagCompound.getInteger(Constants.NBT.ALTAR_MAX_CHARGE);
|
||||
lockdownDuration = tagCompound.getInt(Constants.NBT.ALTAR_LOCKDOWN_DURATION);
|
||||
accelerationUpgrades = tagCompound.getInt(Constants.NBT.ALTAR_ACCELERATION_UPGRADES);
|
||||
demonBloodDuration = tagCompound.getInt(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION);
|
||||
cooldownAfterCrafting = tagCompound.getInt(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING);
|
||||
chargingRate = tagCompound.getInt(Constants.NBT.ALTAR_CHARGE_RATE);
|
||||
chargingFrequency = tagCompound.getInt(Constants.NBT.ALTAR_CHARGE_FREQUENCY);
|
||||
totalCharge = tagCompound.getInt(Constants.NBT.ALTAR_TOTAL_CHARGE);
|
||||
maxCharge = tagCompound.getInt(Constants.NBT.ALTAR_MAX_CHARGE);
|
||||
currentTierDisplayed = Enums.getIfPresent(AltarTier.class, tagCompound.getString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED)).or(AltarTier.ONE);
|
||||
}
|
||||
|
||||
|
@ -124,42 +124,42 @@ public class BloodAltar implements IFluidHandler {
|
|||
if (fluid != null)
|
||||
fluid.writeToNBT(tagCompound);
|
||||
else
|
||||
tagCompound.setString(Constants.NBT.EMPTY, "");
|
||||
tagCompound.putString(Constants.NBT.EMPTY, "");
|
||||
|
||||
if (fluidOutput != null)
|
||||
tagCompound.setInteger(Constants.NBT.OUTPUT_AMOUNT, fluidOutput.amount);
|
||||
tagCompound.putInt(Constants.NBT.OUTPUT_AMOUNT, fluidOutput.amount);
|
||||
|
||||
if (fluidInput != null)
|
||||
tagCompound.setInteger(Constants.NBT.INPUT_AMOUNT, fluidInput.amount);
|
||||
tagCompound.putInt(Constants.NBT.INPUT_AMOUNT, fluidInput.amount);
|
||||
|
||||
tagCompound.setInteger("internalCounter", internalCounter);
|
||||
tagCompound.setString(Constants.NBT.ALTAR_TIER, altarTier.name());
|
||||
tagCompound.setBoolean(Constants.NBT.ALTAR_ACTIVE, isActive);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_LIQUID_REQ, liquidRequired);
|
||||
tagCompound.setBoolean(Constants.NBT.ALTAR_FILLABLE, canBeFilled);
|
||||
tagCompound.setBoolean(Constants.NBT.ALTAR_UPGRADED, isUpgraded);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_CONSUMPTION_RATE, consumptionRate);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_DRAIN_RATE, drainRate);
|
||||
tagCompound.setFloat(Constants.NBT.ALTAR_CONSUMPTION_MULTIPLIER, consumptionMultiplier);
|
||||
tagCompound.setFloat(Constants.NBT.ALTAR_EFFICIENCY_MULTIPLIER, efficiencyMultiplier);
|
||||
tagCompound.setFloat(Constants.NBT.ALTAR_SACRIFICE_MULTIPLIER, sacrificeEfficiencyMultiplier);
|
||||
tagCompound.setFloat(Constants.NBT.ALTAR_SELF_SACRIFICE_MULTIPLIER, selfSacrificeEfficiencyMultiplier);
|
||||
tagCompound.setBoolean(Constants.NBT.ALTAR_IS_RESULT_BLOCK, isResultBlock);
|
||||
tagCompound.setFloat(Constants.NBT.ALTAR_CAPACITY_MULTIPLIER, capacityMultiplier);
|
||||
tagCompound.setFloat(Constants.NBT.ALTAR_ORB_CAPACITY_MULTIPLIER, orbCapacityMultiplier);
|
||||
tagCompound.setFloat(Constants.NBT.ALTAR_DISLOCATION_MULTIPLIER, dislocationMultiplier);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_CAPACITY, capacity);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_PROGRESS, progress);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_BUFFER_CAPACITY, bufferCapacity);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_LOCKDOWN_DURATION, lockdownDuration);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_ACCELERATION_UPGRADES, accelerationUpgrades);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION, demonBloodDuration);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING, cooldownAfterCrafting);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_CHARGE_RATE, chargingRate);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_CHARGE_FREQUENCY, chargingFrequency);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_TOTAL_CHARGE, totalCharge);
|
||||
tagCompound.setInteger(Constants.NBT.ALTAR_MAX_CHARGE, maxCharge);
|
||||
tagCompound.setString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED, currentTierDisplayed.name());
|
||||
tagCompound.putInt("internalCounter", internalCounter);
|
||||
tagCompound.putString(Constants.NBT.ALTAR_TIER, altarTier.name());
|
||||
tagCompound.putBoolean(Constants.NBT.ALTAR_ACTIVE, isActive);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_LIQUID_REQ, liquidRequired);
|
||||
tagCompound.putBoolean(Constants.NBT.ALTAR_FILLABLE, canBeFilled);
|
||||
tagCompound.putBoolean(Constants.NBT.ALTAR_UPGRADED, isUpgraded);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_CONSUMPTION_RATE, consumptionRate);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_DRAIN_RATE, drainRate);
|
||||
tagCompound.putFloat(Constants.NBT.ALTAR_CONSUMPTION_MULTIPLIER, consumptionMultiplier);
|
||||
tagCompound.putFloat(Constants.NBT.ALTAR_EFFICIENCY_MULTIPLIER, efficiencyMultiplier);
|
||||
tagCompound.putFloat(Constants.NBT.ALTAR_SACRIFICE_MULTIPLIER, sacrificeEfficiencyMultiplier);
|
||||
tagCompound.putFloat(Constants.NBT.ALTAR_SELF_SACRIFICE_MULTIPLIER, selfSacrificeEfficiencyMultiplier);
|
||||
tagCompound.putBoolean(Constants.NBT.ALTAR_IS_RESULT_BLOCK, isResultBlock);
|
||||
tagCompound.putFloat(Constants.NBT.ALTAR_CAPACITY_MULTIPLIER, capacityMultiplier);
|
||||
tagCompound.putFloat(Constants.NBT.ALTAR_ORB_CAPACITY_MULTIPLIER, orbCapacityMultiplier);
|
||||
tagCompound.putFloat(Constants.NBT.ALTAR_DISLOCATION_MULTIPLIER, dislocationMultiplier);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_CAPACITY, capacity);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_PROGRESS, progress);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_BUFFER_CAPACITY, bufferCapacity);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_LOCKDOWN_DURATION, lockdownDuration);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_ACCELERATION_UPGRADES, accelerationUpgrades);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION, demonBloodDuration);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING, cooldownAfterCrafting);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_CHARGE_RATE, chargingRate);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_CHARGE_FREQUENCY, chargingFrequency);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_TOTAL_CHARGE, totalCharge);
|
||||
tagCompound.putInt(Constants.NBT.ALTAR_MAX_CHARGE, maxCharge);
|
||||
tagCompound.putString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED, currentTierDisplayed.name());
|
||||
}
|
||||
|
||||
public void startCycle() {
|
||||
|
|
|
@ -91,7 +91,7 @@ public class BlockBloodLight extends Block {
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random rand) {
|
||||
ClientPlayerEntity player = Minecraft.getMinecraft().player;
|
||||
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||
|
||||
if (rand.nextInt(3) != 0) {
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0, 0);
|
||||
|
|
|
@ -116,7 +116,7 @@ public class BlockBloodTank extends BlockInteger implements IVariantProvider, IB
|
|||
if (bloodTank.getTank().getFluid() != null) {
|
||||
bloodTank.getTank().getFluid().writeToNBT(fluidTag);
|
||||
CompoundNBT dropTag = new CompoundNBT();
|
||||
dropTag.setTag("Fluid", fluidTag);
|
||||
dropTag.put("Fluid", fluidTag);
|
||||
drop.setTagCompound(dropTag);
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ public class BlockBloodTank extends BlockInteger implements IVariantProvider, IB
|
|||
TileBloodTank bloodTank = (TileBloodTank) tile;
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
if (stack.hasTagCompound() && stack.getTagCompound().hasKey("Fluid")) {
|
||||
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(tag.getCompoundTag("Fluid"));
|
||||
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(tag.getCompound("Fluid"));
|
||||
bloodTank.getTank().setFluid(fluidStack);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class Sprite {
|
|||
}
|
||||
|
||||
public void draw(int x, int y) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(textureLocation);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(textureLocation);
|
||||
float f = 0.00390625F;
|
||||
float f1 = 0.00390625F;
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
|
|
|
@ -27,7 +27,7 @@ public class GuiBloodMagicConfig extends GuiConfig {
|
|||
|
||||
elements.addAll(ConfigElement.from(ConfigHandler.class).getChildElements());
|
||||
elements.add(new ConfigElement(BloodMagic.RITUAL_MANAGER.getConfig().getCategory("rituals")));
|
||||
if (Minecraft.getMinecraft().world != null)
|
||||
if (Minecraft.getInstance().world != null)
|
||||
elements.add(new DummyElementEditHUD(BloodMagic.NAME, "config." + BloodMagic.MODID + ".edit_hud"));
|
||||
|
||||
return elements;
|
||||
|
|
|
@ -129,7 +129,7 @@ public class GuiItemRoutingNode extends ContainerScreen {
|
|||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
this.renderHoveredToolTip(mouseX, mouseY);
|
||||
|
||||
Minecraft.getMinecraft().fontRenderer.drawString(inventory.getName(), xSize, ySize / 4, 4210752);
|
||||
Minecraft.getInstance().fontRenderer.drawString(inventory.getName(), xSize, ySize / 4, 4210752);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -114,10 +114,10 @@ public class ElementRegistry {
|
|||
@SubscribeEvent
|
||||
public static void onRenderOverlay(RenderGameOverlayEvent.Pre event) {
|
||||
if (event.getType() == RenderGameOverlayEvent.ElementType.HOTBAR) {
|
||||
ScaledResolution resolution = new ScaledResolution(Minecraft.getMinecraft());
|
||||
ScaledResolution resolution = new ScaledResolution(Minecraft.getInstance());
|
||||
|
||||
for (HUDElement element : HUD_ELEMENTS.values()) {
|
||||
if (!element.shouldRender(Minecraft.getMinecraft()))
|
||||
if (!element.shouldRender(Minecraft.getInstance()))
|
||||
continue;
|
||||
|
||||
Vector2f position = ELEMENT_INFO.get(getKey(element)).getPosition();
|
||||
|
|
|
@ -47,7 +47,7 @@ public class GuiEditHUD extends Screen {
|
|||
drawDefaultBackground();
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
|
||||
ScaledResolution resolution = new ScaledResolution(Minecraft.getMinecraft());
|
||||
ScaledResolution resolution = new ScaledResolution(Minecraft.getInstance());
|
||||
for (HUDElement element : ElementRegistry.getElements()) {
|
||||
if (dragged == element)
|
||||
continue;
|
||||
|
@ -87,7 +87,7 @@ public class GuiEditHUD extends Screen {
|
|||
@Override
|
||||
protected void mouseReleased(int mouseX, int mouseY, int state) {
|
||||
if (dragged != null) {
|
||||
ScaledResolution resolution = new ScaledResolution(Minecraft.getMinecraft());
|
||||
ScaledResolution resolution = new ScaledResolution(Minecraft.getInstance());
|
||||
Point bounded = getBoundedDrag(resolution, mouseX, mouseY);
|
||||
float xPos = (float) ((bounded.x) / resolution.getScaledWidth_double());
|
||||
float yPos = (float) ((bounded.y) / resolution.getScaledHeight_double());
|
||||
|
@ -105,7 +105,7 @@ public class GuiEditHUD extends Screen {
|
|||
protected void actionPerformed(Button button) {
|
||||
switch (button.id) {
|
||||
case 0: {
|
||||
Minecraft.getMinecraft().displayGuiScreen(parent);
|
||||
Minecraft.getInstance().displayGuiScreen(parent);
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
|
@ -116,12 +116,12 @@ public class GuiEditHUD extends Screen {
|
|||
}
|
||||
case 2: {
|
||||
ElementRegistry.save(currentOverrides);
|
||||
Minecraft.getMinecraft().displayGuiScreen(parent);
|
||||
Minecraft.getInstance().displayGuiScreen(parent);
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
currentOverrides.clear();
|
||||
Minecraft.getMinecraft().displayGuiScreen(parent);
|
||||
Minecraft.getInstance().displayGuiScreen(parent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class ElementDemonAura extends HUDElement {
|
|||
|
||||
@Override
|
||||
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
||||
Minecraft minecraft = Minecraft.getMinecraft();
|
||||
Minecraft minecraft = Minecraft.getInstance();
|
||||
PlayerEntity player = minecraft.player;
|
||||
|
||||
minecraft.getTextureManager().bindTexture(BAR_LOCATION);
|
||||
|
@ -73,6 +73,6 @@ public class ElementDemonAura extends HUDElement {
|
|||
|
||||
@Override
|
||||
public boolean shouldRender(Minecraft minecraft) {
|
||||
return Utils.canPlayerSeeDemonWill(Minecraft.getMinecraft().player);
|
||||
return Utils.canPlayerSeeDemonWill(Minecraft.getInstance().player);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public abstract class ElementDivinedInformation<T extends TileEntity> extends El
|
|||
|
||||
@Override
|
||||
public boolean shouldRender(Minecraft minecraft) {
|
||||
PlayerEntity player = Minecraft.getMinecraft().player;
|
||||
PlayerEntity player = Minecraft.getInstance().player;
|
||||
ItemStack sigilStack = player.getHeldItem(Hand.MAIN_HAND);
|
||||
boolean flag = false;
|
||||
if (simple) {
|
||||
|
|
|
@ -28,7 +28,7 @@ public class ElementHolding extends HUDElement {
|
|||
GlStateManager.color(1.0F, 1.0F, 1.0F);
|
||||
HOLDING_BAR.draw(drawX, drawY);
|
||||
|
||||
Minecraft minecraft = Minecraft.getMinecraft();
|
||||
Minecraft minecraft = Minecraft.getInstance();
|
||||
ItemStack sigilHolding = minecraft.player.getHeldItemMainhand();
|
||||
// Check mainhand for Sigil of Holding
|
||||
if (!(sigilHolding.getItem() == RegistrarBloodMagicItems.SIGIL_HOLDING))
|
||||
|
@ -74,12 +74,12 @@ public class ElementHolding extends HUDElement {
|
|||
GlStateManager.translate((float) (-(x + 8)), (float) (-(y + 12)), 0.0F);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getRenderItem().renderItemAndEffectIntoGUI(player, stack, x, y);
|
||||
Minecraft.getInstance().getRenderItem().renderItemAndEffectIntoGUI(player, stack, x, y);
|
||||
|
||||
if (animation > 0.0F)
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
Minecraft.getMinecraft().getRenderItem().renderItemOverlays(Minecraft.getMinecraft().fontRenderer, stack, x, y);
|
||||
Minecraft.getInstance().getRenderItem().renderItemOverlays(Minecraft.getInstance().fontRenderer, stack, x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ public class ElementItemStack extends HUDElement {
|
|||
@Override
|
||||
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI(stack, drawX, drawY);
|
||||
Minecraft.getInstance().getRenderItem().renderItemIntoGUI(stack, drawX, drawY);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,14 +10,14 @@ public class ElementString extends HUDElement {
|
|||
private ITextComponent[] display;
|
||||
|
||||
public ElementString(ITextComponent... display) {
|
||||
super(getMaxStringWidth(display), (Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT + 2) * display.length - 2);
|
||||
super(getMaxStringWidth(display), (Minecraft.getInstance().fontRenderer.FONT_HEIGHT + 2) * display.length - 2);
|
||||
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
||||
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
|
||||
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
|
||||
for (ITextComponent drawText : display) {
|
||||
fontRenderer.drawStringWithShadow(drawText.getFormattedText(), drawX, drawY, 14737632);
|
||||
drawY += fontRenderer.FONT_HEIGHT + 2;
|
||||
|
@ -25,7 +25,7 @@ public class ElementString extends HUDElement {
|
|||
}
|
||||
|
||||
private static int getMaxStringWidth(ITextComponent... display) {
|
||||
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
|
||||
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
|
||||
int maxWidth = 0;
|
||||
for (ITextComponent drawText : display)
|
||||
if (fontRenderer.getStringWidth(drawText.getFormattedText()) > maxWidth)
|
||||
|
|
|
@ -31,24 +31,24 @@ public abstract class ElementTileInformation<T extends TileEntity> extends HUDEl
|
|||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
||||
T tile = (T) Minecraft.getMinecraft().world.getTileEntity(Minecraft.getMinecraft().objectMouseOver.getBlockPos());
|
||||
T tile = (T) Minecraft.getInstance().world.getTileEntity(Minecraft.getInstance().objectMouseOver.getBlockPos());
|
||||
|
||||
int yOffset = 0;
|
||||
for (Pair<Sprite, Function<T, String>> sprite : information) {
|
||||
sprite.getLeft().draw(drawX, drawY + yOffset);
|
||||
int textY = drawY + yOffset + (sprite.getLeft().getTextureHeight() / 4);
|
||||
Minecraft.getMinecraft().fontRenderer.drawStringWithShadow((tile != null && tile.getClass() == tileClass) ? sprite.getRight().apply(tile) : "?", drawX + sprite.getLeft().getTextureWidth() + 2, textY, Color.WHITE.getRGB());
|
||||
Minecraft.getInstance().fontRenderer.drawStringWithShadow((tile != null && tile.getClass() == tileClass) ? sprite.getRight().apply(tile) : "?", drawX + sprite.getLeft().getTextureWidth() + 2, textY, Color.WHITE.getRGB());
|
||||
yOffset += sprite.getLeft().getTextureHeight() + 2;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender(Minecraft minecraft) {
|
||||
RayTraceResult trace = Minecraft.getMinecraft().objectMouseOver;
|
||||
RayTraceResult trace = Minecraft.getInstance().objectMouseOver;
|
||||
if (trace == null || trace.typeOfHit != RayTraceResult.Type.BLOCK)
|
||||
return false;
|
||||
|
||||
TileEntity tile = Minecraft.getMinecraft().world.getTileEntity(trace.getBlockPos());
|
||||
TileEntity tile = Minecraft.getInstance().world.getTileEntity(trace.getBlockPos());
|
||||
if (tile == null || !tileClass.isAssignableFrom(tile.getClass()))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public enum KeyBindings {
|
|||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void handleKeybind() {
|
||||
ClientPlayerEntity player = Minecraft.getMinecraft().player;
|
||||
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||
if (player.getHeldItemMainhand().getItem() instanceof ItemSigilHolding)
|
||||
ClientHandler.cycleSigil(player.getHeldItemMainhand(), player, -1);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public enum KeyBindings {
|
|||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void handleKeybind() {
|
||||
ClientPlayerEntity player = Minecraft.getMinecraft().player;
|
||||
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||
if (player.getHeldItemMainhand().getItem() instanceof ItemSigilHolding)
|
||||
ClientHandler.cycleSigil(player.getHeldItemMainhand(), player, 1);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public class AttractorAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
float size = 1.0F * getSizeModifier(craftTime);
|
||||
|
||||
// Bind the texture to the circle
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.enableBlend();
|
||||
|
|
|
@ -99,7 +99,7 @@ public class BindingAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
float size = 3.0F;
|
||||
|
||||
// Bind the texture to the circle
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.enableBlend();
|
||||
|
@ -159,7 +159,7 @@ public class BindingAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(arraysResources[i]);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(arraysResources[i]);
|
||||
float newSize = 1;
|
||||
float distance = BindingAlchemyCircleRenderer.getDistanceOfCircle(i, craftTime);
|
||||
float angle = BindingAlchemyCircleRenderer.getAngleOfCircle(i, craftTime);
|
||||
|
|
|
@ -99,7 +99,7 @@ public class DualAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
GlStateManager.rotate(rotation.getHorizontalAngle() + 180, 0, 0, 1);
|
||||
|
||||
// Bind the texture to the circle
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(rot, 0, 0, 1);
|
||||
double var31 = 0.0D;
|
||||
|
@ -119,7 +119,7 @@ public class DualAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
GlStateManager.popMatrix();
|
||||
|
||||
// Bind the second texture to the circle
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(secondaryArrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(secondaryArrayResource);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(-rot, 0, 0, 1);
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ public class MobSacrificeAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
float size = 1.0F * getSizeModifier(craftTime);
|
||||
|
||||
// Bind the texture to the circle
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.enableBlend();
|
||||
|
@ -126,14 +126,14 @@ public class MobSacrificeAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
|
||||
for (int i = 1; i <= 3; i++) {
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(bottomArrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(bottomArrayResource);
|
||||
translateAndRotateFloatingArray(tessellator, wr, size, rot, craftTime, i);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
//Render the main array.
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||
// GlStateManager.rotate(rot, 0, 0, 1);
|
||||
renderStandardCircle(tessellator, wr, 3);
|
||||
GlStateManager.popMatrix();
|
||||
|
@ -146,7 +146,7 @@ public class MobSacrificeAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
swirlSize = 3 * (craftTime - 40) / 60;
|
||||
}
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(mobSacrificeSwirlResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(mobSacrificeSwirlResource);
|
||||
GlStateManager.translate(0, 0, 0.1);
|
||||
GlStateManager.rotate(rot / 3, 0, 0, 1);
|
||||
renderStandardCircle(tessellator, wr, swirlSize);
|
||||
|
|
|
@ -97,7 +97,7 @@ public class SingleAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
GlStateManager.rotate(rotation.getHorizontalAngle() + 180, 0, 0, 1);
|
||||
|
||||
// Bind the texture to the circle
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(rot, 0, 0, 1);
|
||||
double var31 = 0.0D;
|
||||
|
|
|
@ -58,7 +58,7 @@ public class StaticAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
float size = 1.0F * getSizeModifier(craftTime);
|
||||
|
||||
// Bind the texture to the circle
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.enableBlend();
|
||||
|
|
|
@ -79,7 +79,7 @@ public class TurretAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
float size = 1.0F * getSizeModifier(craftTime);
|
||||
|
||||
// Bind the texture to the circle
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.enableBlend();
|
||||
|
@ -135,21 +135,21 @@ public class TurretAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
|||
GlStateManager.rotate((float) ((pitch + 90) * getStartupPitchYawRatio(craftTime)), 1, 0, 0);
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(bottomArrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(bottomArrayResource);
|
||||
GlStateManager.rotate(-rot, 0, 0, 1);
|
||||
GlStateManager.translate(0, 0, -bottomHeightOffset);
|
||||
renderStandardCircle(tessellator, wr, size / 2);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(middleArrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(middleArrayResource);
|
||||
GlStateManager.rotate(0, 0, 0, 1);
|
||||
GlStateManager.translate(0, 0, -middleHeightOffset);
|
||||
renderStandardCircle(tessellator, wr, size);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||
GlStateManager.rotate(rot, 0, 0, 1);
|
||||
GlStateManager.translate(0, 0, -topHeightOffset);
|
||||
renderStandardCircle(tessellator, wr, size);
|
||||
|
|
|
@ -54,11 +54,11 @@ public class RenderAltar extends TileEntityRenderer<TileAltar> {
|
|||
|
||||
float size = 0.8f;
|
||||
|
||||
TextureAtlasSprite fluidStillSprite = Minecraft.getMinecraft().getTextureMapBlocks().getTextureExtry(fluid.getStill().toString());
|
||||
TextureAtlasSprite fluidStillSprite = Minecraft.getInstance().getTextureMapBlocks().getTextureExtry(fluid.getStill().toString());
|
||||
|
||||
int fluidColor = fluid.getColor(fluidStack);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
||||
setGLColorFromInt(fluidColor);
|
||||
|
||||
double uMin = (double) fluidStillSprite.getMinU();
|
||||
|
@ -78,7 +78,7 @@ public class RenderAltar extends TileEntityRenderer<TileAltar> {
|
|||
}
|
||||
|
||||
private void renderItem(ItemStack stack) {
|
||||
ItemRenderer itemRenderer = Minecraft.getMinecraft().getRenderItem();
|
||||
ItemRenderer itemRenderer = Minecraft.getInstance().getRenderItem();
|
||||
if (!stack.isEmpty()) {
|
||||
GlStateManager.translate(0.5, 1, 0.5);
|
||||
GlStateManager.pushMatrix();
|
||||
|
@ -100,7 +100,7 @@ public class RenderAltar extends TileEntityRenderer<TileAltar> {
|
|||
}
|
||||
|
||||
private void renderHologram(TileAltar altar, AltarTier tier, float partialTicks) {
|
||||
ClientPlayerEntity player = Minecraft.getMinecraft().player;
|
||||
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||
World world = player.world;
|
||||
|
||||
if (tier == AltarTier.ONE)
|
||||
|
|
|
@ -17,7 +17,7 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderBloodTank extends TileEntityRenderer<TileBloodTank> {
|
||||
private static final Minecraft mc = Minecraft.getMinecraft();
|
||||
private static final Minecraft mc = Minecraft.getInstance();
|
||||
|
||||
@Override
|
||||
public void render(TileBloodTank bloodTank, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
|
||||
|
@ -49,7 +49,7 @@ public class RenderBloodTank extends TileEntityRenderer<TileBloodTank> {
|
|||
Tessellator tessellator = Tessellator.getInstance();
|
||||
BufferBuilder buffer = tessellator.getBuffer();
|
||||
|
||||
TextureAtlasSprite fluid = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(renderFluid.getStill().toString());
|
||||
TextureAtlasSprite fluid = Minecraft.getInstance().getTextureMapBlocks().getAtlasSprite(renderFluid.getStill().toString());
|
||||
fluid = fluid == null ? mc.getTextureMapBlocks().getMissingSprite() : fluid;
|
||||
|
||||
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
|
|
|
@ -13,7 +13,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class RenderDemonCrucible extends TileEntityRenderer<TileDemonCrucible> {
|
||||
public static Minecraft mc = Minecraft.getMinecraft();
|
||||
public static Minecraft mc = Minecraft.getInstance();
|
||||
public static ResourceLocation resource = new ResourceLocation("bloodmagic", "textures/blocks/lifeEssenceStill.png");
|
||||
public static float minHeight = 0.6497f;
|
||||
public static float maxHeight = 0.79f;
|
||||
|
|
|
@ -18,7 +18,7 @@ public class RenderFakeBlocks {
|
|||
double maxZ = minZ + 1;
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
BufferBuilder wr = tessellator.getBuffer();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
||||
|
||||
wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import java.util.List;
|
|||
|
||||
public class RenderItemRoutingNode extends TileEntityRenderer<TileRoutingNode> {
|
||||
private static final ResourceLocation beamTexture = new ResourceLocation(BloodMagic.MODID, "textures/entities/nodeBeam.png");
|
||||
private static final Minecraft mc = Minecraft.getMinecraft();
|
||||
private static final Minecraft mc = Minecraft.getInstance();
|
||||
|
||||
@Override
|
||||
public void render(TileRoutingNode tileNode, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
|
||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraft.client.renderer.texture.AtlasTexture;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderEntityBloodLight extends EntityRenderer<EntityBloodLight> {
|
||||
private final ItemRenderer renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
private final ItemRenderer renderItem = Minecraft.getInstance().getRenderItem();
|
||||
|
||||
public RenderEntityBloodLight(EntityRendererManager renderManagerIn) {
|
||||
super(renderManagerIn);
|
||||
|
|
|
@ -26,7 +26,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class RenderEntityMimic extends MobRenderer<EntityMimic> {
|
||||
private static final ResourceLocation SPIDER_TEXTURES = new ResourceLocation("textures/entity/spider/spider.png");
|
||||
Minecraft minecraft = Minecraft.getMinecraft();
|
||||
Minecraft minecraft = Minecraft.getInstance();
|
||||
|
||||
public RenderEntityMimic(EntityRendererManager renderManagerIn) {
|
||||
super(renderManagerIn, new ModelMimic(), 1.0F);
|
||||
|
@ -49,7 +49,7 @@ public class RenderEntityMimic extends MobRenderer<EntityMimic> {
|
|||
|
||||
ItemStack itemstack = mimic.getMimicItemStack();
|
||||
Item item = itemstack.getItem();
|
||||
Minecraft minecraft = Minecraft.getMinecraft();
|
||||
Minecraft minecraft = Minecraft.getInstance();
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
@ -70,7 +70,7 @@ public class RenderEntityMimic extends MobRenderer<EntityMimic> {
|
|||
|
||||
if (!StringUtils.isNullOrEmpty(s)) {
|
||||
gameprofile = SkullTileEntity.updateGameProfile(new GameProfile(null, s));
|
||||
nbttagcompound.setTag("SkullOwner", NBTUtil.writeGameProfile(new CompoundNBT(), gameprofile));
|
||||
nbttagcompound.putTag("SkullOwner", NBTUtil.writeGameProfile(new CompoundNBT(), gameprofile));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderEntitySoulSnare extends EntityRenderer<EntitySoulSnare> {
|
||||
private final ItemRenderer renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
private final ItemRenderer renderItem = Minecraft.getInstance().getRenderItem();
|
||||
|
||||
public RenderEntitySoulSnare(EntityRendererManager renderManagerIn) {
|
||||
super(renderManagerIn);
|
||||
|
|
|
@ -37,7 +37,7 @@ public class LayerAlchemyCircle<T extends EntityCorruptedSheep> implements Layer
|
|||
float size = 3.0F;
|
||||
|
||||
// Bind the texture to the circle
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARRAY_TEXTURE);
|
||||
Minecraft.getInstance().renderEngine.bindTexture(ARRAY_TEXTURE);
|
||||
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.enableBlend();
|
||||
|
|
|
@ -28,7 +28,7 @@ public class EntryText extends EntryResourceLocation {
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void drawExtras(Book book, CategoryAbstract category, int entryX, int entryY, int entryWidth, int entryHeight, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRendererObj) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(image);
|
||||
Minecraft.getInstance().getTextureManager().bindTexture(image);
|
||||
GuiHelper.drawSizedIconWithoutColor(entryX + 4, entryY + 2, 8, 8, 1F);
|
||||
|
||||
boolean startFlag = fontRendererObj.getUnicodeFlag();
|
||||
|
|
|
@ -51,13 +51,13 @@ public class PageAlchemyArray extends Page {
|
|||
int x = guiLeft + 65;
|
||||
int y = guiTop + 30;
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/alchemyArrayCrafting.png"));
|
||||
Minecraft.getInstance().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/alchemyArrayCrafting.png"));
|
||||
guiBase.drawTexturedModalRect(x, y, 0, 0, 62, 88 + (outputStack.isEmpty() ? 0 : 26));
|
||||
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.bloodmagic.page.alchemyArray"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
||||
|
||||
for (ResourceLocation arrayResource : arrayResources) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(arrayResource);
|
||||
Minecraft.getInstance().getTextureManager().bindTexture(arrayResource);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x + 2, y + 28, 0);
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
|
|
|
@ -37,7 +37,7 @@ public class PageAltarRecipe extends Page {
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/altar.png"));
|
||||
Minecraft.getInstance().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/altar.png"));
|
||||
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 146, 104);
|
||||
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.bloodmagic.page.bloodAltar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
||||
|
|
|
@ -44,7 +44,7 @@ public class PageTartaricForgeRecipe extends Page {
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/soulForge.png"));
|
||||
Minecraft.getInstance().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/soulForge.png"));
|
||||
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 146, 104);
|
||||
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.bloodmagic.page.soulForge"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
||||
|
|
|
@ -4,18 +4,22 @@ import WayofTime.bloodmagic.BloodMagic;
|
|||
import WayofTime.bloodmagic.util.Constants;
|
||||
import WayofTime.bloodmagic.compat.waila.provider.*;
|
||||
import WayofTime.bloodmagic.tile.*;
|
||||
import mcp.mobius.waila.api.IRegistrar;
|
||||
import mcp.mobius.waila.api.IWailaPlugin;
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
import mcp.mobius.waila.api.TooltipPosition;
|
||||
import mcp.mobius.waila.api.WailaPlugin;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@WailaPlugin
|
||||
public class BloodMagicHwylaPlugin implements IWailaPlugin {
|
||||
|
||||
public static final ResourceLocation CONFIG_SHOW_ALTAR_STATS = new ResourceLocation(BloodMagic.MODID, "show_altar_stats");
|
||||
|
||||
@Override
|
||||
public void register(IWailaRegistrar registrar) {
|
||||
registrar.registerBodyProvider(DataProviderBloodAltar.INSTANCE, TileAltar.class);
|
||||
registrar.registerNBTProvider(DataProviderBloodAltar.INSTANCE, TileAltar.class);
|
||||
registrar.addConfig(BloodMagic.MODID, Constants.Compat.WAILA_CONFIG_ALTAR, true);
|
||||
public void register(IRegistrar registrar) {
|
||||
registrar.registerComponentProvider(DataProviderBloodAltar.INSTANCE, TooltipPosition.BODY, TileAltar.class);
|
||||
registrar.registerBlockDataProvider(DataProviderBloodAltar.INSTANCE, TileAltar.class);
|
||||
registrar.addConfig(CONFIG_SHOW_ALTAR_STATS, true);
|
||||
|
||||
registrar.registerBodyProvider(DataProviderTeleposer.INSTANCE, TileTeleposer.class);
|
||||
registrar.registerNBTProvider(DataProviderTeleposer.INSTANCE, TileTeleposer.class);
|
||||
|
|
|
@ -48,9 +48,9 @@ public class DataProviderAlchemyArray implements IWailaDataProvider {
|
|||
public CompoundNBT getNBTData(ServerPlayerEntity player, TileEntity te, CompoundNBT tag, World world, BlockPos pos) {
|
||||
TileAlchemyArray alchemyArray = (TileAlchemyArray) te;
|
||||
if (!alchemyArray.getStackInSlot(0).isEmpty())
|
||||
tag.setString("reagent", alchemyArray.getStackInSlot(0).getDisplayName());
|
||||
tag.putString("reagent", alchemyArray.getStackInSlot(0).getDisplayName());
|
||||
if (!alchemyArray.getStackInSlot(1).isEmpty())
|
||||
tag.setString("catalyst", alchemyArray.getStackInSlot(1).getDisplayName());
|
||||
tag.putString("catalyst", alchemyArray.getStackInSlot(1).getDisplayName());
|
||||
return tag;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
package WayofTime.bloodmagic.compat.waila.provider;
|
||||
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.util.Constants;
|
||||
import WayofTime.bloodmagic.compat.waila.BloodMagicHwylaPlugin;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||
import WayofTime.bloodmagic.item.sigil.ItemSigilDivination;
|
||||
import WayofTime.bloodmagic.tile.TileAltar;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.IComponentProvider;
|
||||
import mcp.mobius.waila.api.IDataAccessor;
|
||||
import mcp.mobius.waila.api.IPluginConfig;
|
||||
import mcp.mobius.waila.api.IServerDataProvider;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -25,35 +25,31 @@ import java.util.List;
|
|||
* href="https://github.com/tterrag1098">tterrag1098</a>. Originally implemented
|
||||
* in ImLookingAtBlood by <a href="https://github.com/Pokefenn">Pokefenn</a>.
|
||||
*/
|
||||
public class DataProviderBloodAltar implements IWailaDataProvider {
|
||||
public class DataProviderBloodAltar implements IComponentProvider, IServerDataProvider<TileEntity> {
|
||||
|
||||
public static final IWailaDataProvider INSTANCE = new DataProviderBloodAltar();
|
||||
public static final DataProviderBloodAltar INSTANCE = new DataProviderBloodAltar();
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig(Constants.Compat.WAILA_CONFIG_ALTAR))
|
||||
return currenttip;
|
||||
public void appendBody(List<ITextComponent> tooltip, IDataAccessor accessor, IPluginConfig config) {
|
||||
if (!config.get(BloodMagicHwylaPlugin.CONFIG_SHOW_ALTAR_STATS))
|
||||
return;
|
||||
|
||||
if (accessor.getNBTData().hasKey("altar")) {
|
||||
CompoundNBT altarData = accessor.getNBTData().getCompoundTag("altar");
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentAltarTier", altarData.getInteger("tier")));
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentAltarCapacity", altarData.getInteger("capacity")));
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentEssence", altarData.getInteger("stored")));
|
||||
if (accessor.getServerData().contains("altar")) {
|
||||
CompoundNBT altarData = accessor.getServerData().getCompound("altar");
|
||||
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.seer.currentAltarTier", altarData.getInt("tier")));
|
||||
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.seer.currentAltarCapacity", altarData.getInt("capacity")));
|
||||
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.seer.currentEssence", altarData.getInt("stored")));
|
||||
|
||||
if (altarData.hasKey("charge")) {
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentAltarProgress.percent", altarData.getInteger("progress") + "%"));
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentCharge", altarData.getInteger("charge")));
|
||||
if (altarData.contains("charge")) {
|
||||
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.seer.currentAltarProgress.percent", altarData.getInt("progress") + "%"));
|
||||
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.seer.currentCharge", altarData.getInt("charge")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public CompoundNBT getNBTData(ServerPlayerEntity player, TileEntity te, CompoundNBT tag, World world, BlockPos pos) {
|
||||
TileAltar altar = (TileAltar) te;
|
||||
public void appendServerData(CompoundNBT tag, ServerPlayerEntity player, World world, TileEntity tileEntity) {
|
||||
TileAltar altar = (TileAltar) tileEntity;
|
||||
|
||||
boolean hasSigil = false;
|
||||
boolean hasSeer = false;
|
||||
|
@ -76,20 +72,18 @@ public class DataProviderBloodAltar implements IWailaDataProvider {
|
|||
}
|
||||
|
||||
if (!hasSeer && !hasSigil)
|
||||
return tag;
|
||||
return;
|
||||
|
||||
CompoundNBT altarData = new CompoundNBT();
|
||||
altarData.setInteger("tier", altar.getTier().toInt());
|
||||
altarData.setInteger("capacity", altar.getCapacity());
|
||||
altarData.setInteger("stored", altar.getCurrentBlood());
|
||||
altarData.putInt("tier", altar.getTier().toInt());
|
||||
altarData.putInt("capacity", altar.getCapacity());
|
||||
altarData.putInt("stored", altar.getCurrentBlood());
|
||||
if (hasSeer) {
|
||||
altarData.setInteger("progress", (int) (((double) altar.getProgress() / (double) altar.getLiquidRequired() * 100) / altar.getStackInSlot(0).getCount()));
|
||||
altarData.setInteger("charge", altar.getTotalCharge());
|
||||
altarData.putInt("progress", (int) (((double) altar.getProgress() / (double) altar.getLiquidRequired() * 100) / altar.getStackInSlot(0).getCount()));
|
||||
altarData.putInt("charge", altar.getTotalCharge());
|
||||
}
|
||||
|
||||
tag.setTag("altar", altarData);
|
||||
|
||||
return tag;
|
||||
tag.put("altar", altarData);
|
||||
}
|
||||
|
||||
public static boolean hasStack(ItemStack stack, PlayerEntity player) {
|
||||
|
|
|
@ -42,10 +42,10 @@ public class DataProviderBloodTank implements IWailaDataProvider {
|
|||
@Override
|
||||
public CompoundNBT getNBTData(ServerPlayerEntity player, TileEntity te, CompoundNBT tag, World world, BlockPos pos) {
|
||||
TileBloodTank tank = (TileBloodTank) te;
|
||||
tag.setInteger("tier", tank.getBlockMetadata() + 1);
|
||||
tag.setInteger("capacity", tank.capacity);
|
||||
tag.putInt("tier", tank.getBlockMetadata() + 1);
|
||||
tag.putInt("capacity", tank.capacity);
|
||||
if (tank.getTank().getFluid() != null)
|
||||
tag.setTag("fluid", tank.getTank().getFluid().writeToNBT(new CompoundNBT()));
|
||||
tag.put("fluid", tank.getTank().getFluid().writeToNBT(new CompoundNBT()));
|
||||
return tag;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class DataProviderMimic implements IWailaDataProvider {
|
|||
if (shareTag != null)
|
||||
item.setTag("nbt", shareTag);
|
||||
|
||||
tag.setTag("mimiced", item);
|
||||
tag.put("mimiced", item);
|
||||
}
|
||||
return tag;
|
||||
}
|
||||
|
|
|
@ -57,21 +57,21 @@ public class DataProviderRitualController implements IWailaDataProvider {
|
|||
|
||||
if (te instanceof TileMasterRitualStone) {
|
||||
TileMasterRitualStone mrs = (TileMasterRitualStone) te;
|
||||
tag.setBoolean("master", true);
|
||||
tag.putBoolean("master", true);
|
||||
if (mrs.getCurrentRitual() != null) {
|
||||
tag.setString("ritual", mrs.getCurrentRitual().getTranslationKey());
|
||||
tag.setBoolean("active", mrs.isActive());
|
||||
tag.putString("ritual", mrs.getCurrentRitual().getTranslationKey());
|
||||
tag.putBoolean("active", mrs.isActive());
|
||||
if (mrs.getOwner() != null)
|
||||
tag.setString("owner", PlayerHelper.getUsernameFromUUID(mrs.getOwner()));
|
||||
tag.setBoolean("enabled", BloodMagic.RITUAL_MANAGER.enabled(BloodMagic.RITUAL_MANAGER.getId(mrs.getCurrentRitual()), false));
|
||||
tag.putString("owner", PlayerHelper.getUsernameFromUUID(mrs.getOwner()));
|
||||
tag.putBoolean("enabled", BloodMagic.RITUAL_MANAGER.enabled(BloodMagic.RITUAL_MANAGER.getId(mrs.getCurrentRitual()), false));
|
||||
}
|
||||
} else {
|
||||
tag.setBoolean("master", false);
|
||||
tag.putBoolean("master", false);
|
||||
|
||||
ImperfectRitual ritual = BloodMagic.RITUAL_MANAGER.getImperfectRitual(world.getBlockState(pos.up()));
|
||||
if (ritual != null) {
|
||||
tag.setString("ritual", ritual.getTranslationKey());
|
||||
tag.setBoolean("enabled", BloodMagic.RITUAL_MANAGER.enabled(BloodMagic.RITUAL_MANAGER.getId(ritual), false));
|
||||
tag.putString("ritual", ritual.getTranslationKey());
|
||||
tag.putBoolean("enabled", BloodMagic.RITUAL_MANAGER.enabled(BloodMagic.RITUAL_MANAGER.getId(ritual), false));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public class DataProviderTeleposer implements IWailaDataProvider {
|
|||
CompoundNBT focusData = new CompoundNBT();
|
||||
focusData.setTag("pos", NBTUtil.createPosTag(focus.getBlockPos(contained)));
|
||||
focusData.setInteger("dim", contained.getTagCompound().getInteger(Constants.NBT.DIMENSION_ID));
|
||||
tag.setTag("focus", focusData);
|
||||
tag.put("focus", focusData);
|
||||
}
|
||||
return tag;
|
||||
}
|
||||
|
|
|
@ -34,11 +34,11 @@ public class BMWorldSavedData extends WorldSavedData {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tagCompound) {
|
||||
ListNBT networkData = tagCompound.getTagList("networkData", 10);
|
||||
public void read(CompoundNBT tagCompound) {
|
||||
ListNBT networkData = tagCompound.getList("networkData", 10);
|
||||
|
||||
for (int i = 0; i < networkData.tagCount(); i++) {
|
||||
CompoundNBT data = networkData.getCompoundTagAt(i);
|
||||
for (int i = 0; i < networkData.size(); i++) {
|
||||
CompoundNBT data = networkData.getCompound(i);
|
||||
SoulNetwork network = SoulNetwork.fromNBT(data);
|
||||
network.setParent(this);
|
||||
soulNetworks.put(network.getPlayerId(), network);
|
||||
|
@ -46,12 +46,12 @@ public class BMWorldSavedData extends WorldSavedData {
|
|||
}
|
||||
|
||||
@Override
|
||||
public CompoundNBT writeToNBT(CompoundNBT tagCompound) {
|
||||
public CompoundNBT write(CompoundNBT tagCompound) {
|
||||
ListNBT networkData = new ListNBT();
|
||||
for (SoulNetwork soulNetwork : soulNetworks.values())
|
||||
networkData.appendTag(soulNetwork.serializeNBT());
|
||||
networkData.add(soulNetwork.serializeNBT());
|
||||
|
||||
tagCompound.setTag("networkData", networkData);
|
||||
tagCompound.put("networkData", networkData);
|
||||
|
||||
return tagCompound;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package WayofTime.bloodmagic.core.data;
|
|||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.INBT;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraftforge.common.util.INBTSerializable;
|
||||
|
||||
|
@ -26,14 +26,14 @@ public class Binding implements INBTSerializable<CompoundNBT> {
|
|||
@Override
|
||||
public CompoundNBT serializeNBT() {
|
||||
CompoundNBT tag = new CompoundNBT();
|
||||
tag.setTag("id", NBTUtil.createUUIDTag(uuid));
|
||||
tag.setString("name", name);
|
||||
tag.put("id", NBTUtil.writeUniqueId(uuid));
|
||||
tag.putString("name", name);
|
||||
return tag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeNBT(CompoundNBT nbt) {
|
||||
this.uuid = NBTUtil.getUUIDFromTag(nbt.getCompoundTag("id"));
|
||||
this.uuid = NBTUtil.readUniqueId(nbt.getCompound("id"));
|
||||
this.name = nbt.getString("name");
|
||||
}
|
||||
|
||||
|
@ -57,11 +57,11 @@ public class Binding implements INBTSerializable<CompoundNBT> {
|
|||
|
||||
@Nullable
|
||||
public static Binding fromStack(ItemStack stack) {
|
||||
if (!stack.hasTagCompound()) // Definitely hasn't been bound yet.
|
||||
if (!stack.hasTag()) // Definitely hasn't been bound yet.
|
||||
return null;
|
||||
|
||||
NBTBase bindingTag = stack.getTagCompound().getTag("binding");
|
||||
if (bindingTag == null || bindingTag.getId() != 10 || bindingTag.isEmpty()) // Make sure it's both a tag compound and that it has actual data.
|
||||
INBT bindingTag = stack.getTag().get("binding");
|
||||
if (bindingTag == null || bindingTag.getId() != 10) // Make sure it's both a tag compound and that it has actual data.
|
||||
return null;
|
||||
|
||||
Binding binding = new Binding();
|
||||
|
|
|
@ -150,13 +150,13 @@ public class SoulNetwork implements INBTSerializable<CompoundNBT> {
|
|||
public void hurtPlayer(PlayerEntity user, float syphon) {
|
||||
if (user != null) {
|
||||
if (syphon < 100 && syphon > 0) {
|
||||
if (!user.capabilities.isCreativeMode) {
|
||||
if (!user.isCreative()) {
|
||||
user.hurtResistantTime = 0;
|
||||
user.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, 1.0F);
|
||||
}
|
||||
|
||||
} else if (syphon >= 100) {
|
||||
if (!user.capabilities.isCreativeMode) {
|
||||
if (!user.isCreative()) {
|
||||
for (int i = 0; i < ((syphon + 99) / 100); i++) {
|
||||
user.hurtResistantTime = 0;
|
||||
user.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, 1.0F);
|
||||
|
@ -228,17 +228,17 @@ public class SoulNetwork implements INBTSerializable<CompoundNBT> {
|
|||
@Override
|
||||
public CompoundNBT serializeNBT() {
|
||||
CompoundNBT tagCompound = new CompoundNBT();
|
||||
tagCompound.setString("playerId", getPlayerId().toString());
|
||||
tagCompound.setInteger("currentEssence", getCurrentEssence());
|
||||
tagCompound.setInteger("orbTier", getOrbTier());
|
||||
tagCompound.putString("playerId", getPlayerId().toString());
|
||||
tagCompound.putInt("currentEssence", getCurrentEssence());
|
||||
tagCompound.putInt("orbTier", getOrbTier());
|
||||
return tagCompound;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeNBT(CompoundNBT nbt) {
|
||||
this.playerId = UUID.fromString(nbt.getString("playerId"));
|
||||
this.currentEssence = nbt.getInteger("currentEssence");
|
||||
this.orbTier = nbt.getInteger("orbTier");
|
||||
this.currentEssence = nbt.getInt("currentEssence");
|
||||
this.orbTier = nbt.getInt("orbTier");
|
||||
}
|
||||
|
||||
public static SoulNetwork fromNBT(CompoundNBT tagCompound) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package WayofTime.bloodmagic.core.data;
|
||||
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.command.ICommandSource;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
@ -40,21 +40,21 @@ public class SoulTicket {
|
|||
* @return A description in the format block|dimensionID|pos
|
||||
*/
|
||||
public static SoulTicket block(World world, BlockPos pos, int amount) {
|
||||
return new SoulTicket(new StringTextComponent("block|" + world.provider.getDimension() + "|" + pos.toLong()), amount);
|
||||
return new SoulTicket(new StringTextComponent("block|" + world.dimension.getDimension() + "|" + pos.toLong()), amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A description in the format item|item registry name|dimensionID|entityName|entityPos
|
||||
*/
|
||||
public static SoulTicket item(ItemStack itemStack, World world, Entity entity, int amount) {
|
||||
return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName() + "|" + world.provider.getDimension() + "|" + entity.getPersistentID()), amount);
|
||||
return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName() + "|" + world.dimension.getDimension() + "|" + entity.getCachedUniqueIdString()), amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A description in the format item|item registry name|dimensionID|pos
|
||||
*/
|
||||
public static SoulTicket item(ItemStack itemStack, World world, BlockPos pos, int amount) {
|
||||
return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName() + "|" + world.provider.getDimension() + "|" + pos.toLong()), amount);
|
||||
return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName() + "|" + world.dimension.getDimension() + "|" + pos.toLong()), amount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -64,8 +64,8 @@ public class SoulTicket {
|
|||
return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName()), amount);
|
||||
}
|
||||
|
||||
public static SoulTicket command(ICommandSender sender, String command, int amount) {
|
||||
return new SoulTicket(new StringTextComponent("command|" + command + "|" + sender.getName()), amount);
|
||||
public static SoulTicket command(ICommandSource sender, String command, int amount) {
|
||||
return new SoulTicket(new StringTextComponent("command|" + command + "|" + sender.toString()), amount);
|
||||
}
|
||||
|
||||
// TODO maybe make it check the amount??
|
||||
|
|
|
@ -51,7 +51,7 @@ public class OrbRegistry {
|
|||
public static ItemStack getOrbStack(BloodOrb orb) {
|
||||
ItemStack ret = new ItemStack(ORB_ITEM);
|
||||
CompoundNBT tag = new CompoundNBT();
|
||||
tag.setString("orb", orb.getRegistryName().toString());
|
||||
tag.putString("orb", orb.getRegistryName().toString());
|
||||
ret.setTagCompound(tag);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ public abstract class EntityAspectedDemonBase extends EntityDemonBase {
|
|||
public void writeEntityToNBT(CompoundNBT tag) {
|
||||
super.writeEntityToNBT(tag);
|
||||
|
||||
tag.setString(Constants.NBT.WILL_TYPE, this.getType().toString());
|
||||
tag.putString(Constants.NBT.WILL_TYPE, this.getType().toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -176,14 +176,14 @@ public class EntityCorruptedChicken extends EntityAspectedDemonBase {
|
|||
super.readEntityFromNBT(compound);
|
||||
|
||||
if (compound.hasKey("EggLayTime")) {
|
||||
this.timeUntilNextEgg = compound.getInteger("EggLayTime");
|
||||
this.timeUntilNextEgg = compound.getInt("EggLayTime");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeEntityToNBT(CompoundNBT compound) {
|
||||
super.writeEntityToNBT(compound);
|
||||
compound.setInteger("EggLayTime", this.timeUntilNextEgg);
|
||||
compound.putInt("EggLayTime", this.timeUntilNextEgg);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -214,9 +214,9 @@ public class EntityCorruptedSheep extends EntityAspectedDemonBase implements ISh
|
|||
@Override
|
||||
public void writeEntityToNBT(CompoundNBT tag) {
|
||||
super.writeEntityToNBT(tag);
|
||||
tag.setBoolean("Sheared", this.getSheared());
|
||||
tag.setByte("Color", (byte) this.getFleeceColor().getMetadata());
|
||||
tag.setInteger("protection", this.protectionCooldown);
|
||||
tag.putBoolean("Sheared", this.getSheared());
|
||||
tag.putByte("Color", (byte) this.getFleeceColor().getMetadata());
|
||||
tag.putInt("protection", this.protectionCooldown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -224,7 +224,7 @@ public class EntityCorruptedSheep extends EntityAspectedDemonBase implements ISh
|
|||
super.readEntityFromNBT(tag);
|
||||
this.setSheared(tag.getBoolean("Sheared"));
|
||||
this.setFleeceColor(DyeColor.byMetadata(tag.getByte("Color")));
|
||||
this.protectionCooldown = tag.getInteger("protection");
|
||||
this.protectionCooldown = tag.getInt("protection");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -164,9 +164,9 @@ public class EntityDemonBase extends CreatureEntity implements IEntityOwnable {
|
|||
super.writeEntityToNBT(tag);
|
||||
|
||||
if (this.getOwnerId() == null) {
|
||||
tag.setString("OwnerUUID", "");
|
||||
tag.putString("OwnerUUID", "");
|
||||
} else {
|
||||
tag.setString("OwnerUUID", this.getOwnerId().toString());
|
||||
tag.putString("OwnerUUID", this.getOwnerId().toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -66,11 +66,11 @@ public class EntityMimic extends EntityDemonBase {
|
|||
public void writeEntityToNBT(CompoundNBT tag) {
|
||||
super.writeEntityToNBT(tag);
|
||||
|
||||
tag.setBoolean("dropItemsOnBreak", dropItemsOnBreak);
|
||||
tag.setTag("tileTag", tileTag);
|
||||
tag.setInteger("metaOfReplacedBlock", metaOfReplacedBlock);
|
||||
tag.setInteger("playerCheckRadius", playerCheckRadius);
|
||||
tag.setString("stateOfReplacedBlock", stateOfReplacedBlock.toString());
|
||||
tag.putBoolean("dropItemsOnBreak", dropItemsOnBreak);
|
||||
tag.put("tileTag", tileTag);
|
||||
tag.putInt("metaOfReplacedBlock", metaOfReplacedBlock);
|
||||
tag.putInt("playerCheckRadius", playerCheckRadius);
|
||||
tag.putString("stateOfReplacedBlock", stateOfReplacedBlock.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -78,9 +78,9 @@ public class EntityMimic extends EntityDemonBase {
|
|||
super.readEntityFromNBT(tag);
|
||||
|
||||
dropItemsOnBreak = tag.getBoolean("dropItemsOnBreak");
|
||||
tileTag = tag.getCompoundTag("tileTag");
|
||||
metaOfReplacedBlock = tag.getInteger("metaOfReplacedBlock");
|
||||
playerCheckRadius = tag.getInteger("playerCheckRadius");
|
||||
tileTag = tag.getCompound("tileTag");
|
||||
metaOfReplacedBlock = tag.getInt("metaOfReplacedBlock");
|
||||
playerCheckRadius = tag.getInt("playerCheckRadius");
|
||||
stateOfReplacedBlock = StateUtil.parseState(tag.getString("stateOfReplacedBlock"));
|
||||
}
|
||||
|
||||
|
|
|
@ -358,9 +358,9 @@ public class EntitySentientSpecter extends EntityDemonBase {
|
|||
public void writeEntityToNBT(CompoundNBT tag) {
|
||||
super.writeEntityToNBT(tag);
|
||||
|
||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
|
||||
tag.setBoolean("sentientArmour", wasGivenSentientArmour);
|
||||
tag.putBoolean("sentientArmour", wasGivenSentientArmour);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -142,15 +142,15 @@ public class EntityBloodLight extends ThrowableEntity implements IThrowableEntit
|
|||
@Override
|
||||
public void writeEntityToNBT(CompoundNBT nbt) {
|
||||
super.writeEntityToNBT(nbt);
|
||||
nbt.setInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR, ticksInAir);
|
||||
nbt.setInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR, maxTicksInAir);
|
||||
nbt.putInt(Constants.NBT.PROJECTILE_TICKS_IN_AIR, ticksInAir);
|
||||
nbt.putInt(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR, maxTicksInAir);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(CompoundNBT nbt) {
|
||||
super.readEntityFromNBT(nbt);
|
||||
ticksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR);
|
||||
maxTicksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR);
|
||||
ticksInAir = nbt.getInt(Constants.NBT.PROJECTILE_TICKS_IN_AIR);
|
||||
maxTicksInAir = nbt.getInt(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -88,22 +88,22 @@ public class EntityMeteor extends ThrowableEntity implements IThrowableEntity {
|
|||
@Override
|
||||
public void writeEntityToNBT(CompoundNBT nbt) {
|
||||
super.writeEntityToNBT(nbt);
|
||||
nbt.setInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR, ticksInAir);
|
||||
nbt.setInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR, maxTicksInAir);
|
||||
nbt.setDouble("radiusModifier", radiusModifier);
|
||||
nbt.setDouble("explosionModifier", explosionModifier);
|
||||
nbt.setDouble("fillerChance", fillerChance);
|
||||
nbt.putInt(Constants.NBT.PROJECTILE_TICKS_IN_AIR, ticksInAir);
|
||||
nbt.putInt(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR, maxTicksInAir);
|
||||
nbt.putDouble("radiusModifier", radiusModifier);
|
||||
nbt.putDouble("explosionModifier", explosionModifier);
|
||||
nbt.putDouble("fillerChance", fillerChance);
|
||||
if (!meteorStack.isEmpty())
|
||||
meteorStack.writeToNBT(nbt);
|
||||
else
|
||||
nbt.setBoolean("noItem", true);
|
||||
nbt.putBoolean("noItem", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(CompoundNBT nbt) {
|
||||
super.readEntityFromNBT(nbt);
|
||||
ticksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR);
|
||||
maxTicksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR);
|
||||
ticksInAir = nbt.getInt(Constants.NBT.PROJECTILE_TICKS_IN_AIR);
|
||||
maxTicksInAir = nbt.getInt(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR);
|
||||
radiusModifier = nbt.getDouble("radiusModifier");
|
||||
explosionModifier = nbt.getDouble("explosionModifier");
|
||||
fillerChance = nbt.getDouble("fillerChance");
|
||||
|
|
|
@ -260,9 +260,9 @@ public class EntitySentientArrow extends ArrowEntity {
|
|||
public void writeEntityToNBT(CompoundNBT tag) {
|
||||
super.writeEntityToNBT(tag);
|
||||
|
||||
tag.setDouble("reimbursement", reimbursedAmountOnHit);
|
||||
tag.setInteger("currentLevel", currentLevel);
|
||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
tag.putDouble("reimbursement", reimbursedAmountOnHit);
|
||||
tag.putInt("currentLevel", currentLevel);
|
||||
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -271,7 +271,7 @@ public class EntitySentientArrow extends ArrowEntity {
|
|||
|
||||
reimbursedAmountOnHit = tag.getDouble("reimbursement");
|
||||
type = EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH));
|
||||
currentLevel = tag.getInteger("currentLevel");
|
||||
currentLevel = tag.getInt("currentLevel");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,8 +4,8 @@ import WayofTime.bloodmagic.core.data.SoulNetwork;
|
|||
import WayofTime.bloodmagic.core.data.SoulTicket;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
|
||||
public class SoulNetworkEvent extends Event {
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ public class ItemBloodOrb extends ItemBindableBase implements IBloodOrb {
|
|||
for (BloodOrb orb : RegistrarBloodMagic.BLOOD_ORBS) {
|
||||
ItemStack orbStack = new ItemStack(this);
|
||||
CompoundNBT tag = new CompoundNBT();
|
||||
tag.setString("orb", orb.getRegistryName().toString());
|
||||
tag.putString("orb", orb.getRegistryName().toString());
|
||||
orbStack.setTagCompound(tag);
|
||||
list.add(orbStack);
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ public class ItemExperienceBook extends Item implements IVariantProvider {
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble("experience", exp);
|
||||
tag.putDouble("experience", exp);
|
||||
}
|
||||
|
||||
public static double getStoredExperience(ItemStack stack) {
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ItemInscriptionTool extends ItemEnum.Variant<EnumRuneType> implemen
|
|||
|
||||
ItemStack stack = new ItemStack(this, 1, runeType.ordinal());
|
||||
CompoundNBT tag = new CompoundNBT();
|
||||
tag.setInteger(Constants.NBT.USES, 10);
|
||||
tag.putInt(Constants.NBT.USES, 10);
|
||||
stack.setTagCompound(tag);
|
||||
list.add(stack);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.minecraft.potion.EffectInstance;
|
|||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.INBT;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
|
@ -74,12 +74,12 @@ public class ItemLavaCrystal extends ItemBindableBase implements IVariantProvide
|
|||
if (stack.getTagCompound() == null) // hasTagCompound doesn't work on empty stacks with tags
|
||||
return null;
|
||||
|
||||
NBTBase bindingTag = stack.getTagCompound().getTag("binding");
|
||||
INBT bindingTag = stack.getTagCompound().getTag("binding");
|
||||
if (bindingTag == null || bindingTag.getId() != 10 || bindingTag.isEmpty()) // Make sure it's both a tag compound and that it has actual data.
|
||||
return null;
|
||||
|
||||
CompoundNBT nbt = (CompoundNBT) bindingTag;
|
||||
return new Binding(NBTUtil.getUUIDFromTag(nbt.getCompoundTag("id")), nbt.getString("name"));
|
||||
return new Binding(NBTUtil.getUUIDFromTag(nbt.getCompound("id")), nbt.getString("name"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -375,7 +375,7 @@ public class ItemRitualDiviner extends Item implements IVariantProvider {
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setInteger(Constants.NBT.DIRECTION, direction.getIndex());
|
||||
tag.putInt(Constants.NBT.DIRECTION, direction.getIndex());
|
||||
}
|
||||
|
||||
public Direction getDirection(ItemStack stack) {
|
||||
|
@ -386,12 +386,12 @@ public class ItemRitualDiviner extends Item implements IVariantProvider {
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
int dir = tag.getInteger(Constants.NBT.DIRECTION);
|
||||
int dir = tag.getInt(Constants.NBT.DIRECTION);
|
||||
if (dir == 0) {
|
||||
return Direction.NORTH;
|
||||
}
|
||||
|
||||
return Direction.VALUES[tag.getInteger(Constants.NBT.DIRECTION)];
|
||||
return Direction.VALUES[tag.getInt(Constants.NBT.DIRECTION)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -464,7 +464,7 @@ public class ItemRitualDiviner extends Item implements IVariantProvider {
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setString("current_ritual", key);
|
||||
tag.putString("current_ritual", key);
|
||||
}
|
||||
|
||||
public String getCurrentRitual(ItemStack stack) {
|
||||
|
|
|
@ -204,9 +204,9 @@ public class ItemRitualReader extends Item implements IVariantProvider {
|
|||
public ItemStack setBlockPos(ItemStack stack, BlockPos pos) {
|
||||
stack = NBTHelper.checkNBT(stack);
|
||||
CompoundNBT itemTag = stack.getTagCompound();
|
||||
itemTag.setInteger(Constants.NBT.X_COORD, pos.getX());
|
||||
itemTag.setInteger(Constants.NBT.Y_COORD, pos.getY());
|
||||
itemTag.setInteger(Constants.NBT.Z_COORD, pos.getZ());
|
||||
itemTag.putInt(Constants.NBT.X_COORD, pos.getX());
|
||||
itemTag.putInt(Constants.NBT.Y_COORD, pos.getY());
|
||||
itemTag.putInt(Constants.NBT.Z_COORD, pos.getZ());
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
@ -218,9 +218,9 @@ public class ItemRitualReader extends Item implements IVariantProvider {
|
|||
public ItemStack setMasterBlockPos(ItemStack stack, BlockPos pos) {
|
||||
stack = NBTHelper.checkNBT(stack);
|
||||
CompoundNBT itemTag = stack.getTagCompound();
|
||||
itemTag.setInteger(Constants.NBT.X_COORD + "master", pos.getX());
|
||||
itemTag.setInteger(Constants.NBT.Y_COORD + "master", pos.getY());
|
||||
itemTag.setInteger(Constants.NBT.Z_COORD + "master", pos.getZ());
|
||||
itemTag.putInt(Constants.NBT.X_COORD + "master", pos.getX());
|
||||
itemTag.putInt(Constants.NBT.Y_COORD + "master", pos.getY());
|
||||
itemTag.putInt(Constants.NBT.Z_COORD + "master", pos.getZ());
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
@ -237,7 +237,7 @@ public class ItemRitualReader extends Item implements IVariantProvider {
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setString("range", range);
|
||||
tag.putString("range", range);
|
||||
}
|
||||
|
||||
public void cycleReader(ItemStack stack, PlayerEntity player) {
|
||||
|
@ -259,7 +259,7 @@ public class ItemRitualReader extends Item implements IVariantProvider {
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setInteger(Constants.NBT.RITUAL_READER, state.ordinal());
|
||||
tag.putInt(Constants.NBT.RITUAL_READER, state.ordinal());
|
||||
}
|
||||
|
||||
public EnumRitualReaderState getState(ItemStack stack) {
|
||||
|
@ -270,7 +270,7 @@ public class ItemRitualReader extends Item implements IVariantProvider {
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
return EnumRitualReaderState.values()[tag.getInteger(Constants.NBT.RITUAL_READER)];
|
||||
return EnumRitualReaderState.values()[tag.getInt(Constants.NBT.RITUAL_READER)];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -64,7 +64,7 @@ public class ItemTelepositionFocus extends ItemEnum.Variant<ItemTelepositionFocu
|
|||
|
||||
if (coords != null && tag != null) {
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.bloodmagic.telepositionFocus.coords", coords.getX(), coords.getY(), coords.getZ()));
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.bloodmagic.telepositionFocus.dimension", tag.getInteger(Constants.NBT.DIMENSION_ID)));
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.bloodmagic.telepositionFocus.dimension", tag.getInt(Constants.NBT.DIMENSION_ID)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,10 +81,10 @@ public class ItemTelepositionFocus extends ItemEnum.Variant<ItemTelepositionFocu
|
|||
public ItemStack setBlockPos(ItemStack stack, World world, BlockPos pos) {
|
||||
stack = NBTHelper.checkNBT(stack);
|
||||
CompoundNBT itemTag = stack.getTagCompound();
|
||||
itemTag.setInteger(Constants.NBT.X_COORD, pos.getX());
|
||||
itemTag.setInteger(Constants.NBT.Y_COORD, pos.getY());
|
||||
itemTag.setInteger(Constants.NBT.Z_COORD, pos.getZ());
|
||||
itemTag.setInteger(Constants.NBT.DIMENSION_ID, world.provider.getDimension());
|
||||
itemTag.putInt(Constants.NBT.X_COORD, pos.getX());
|
||||
itemTag.putInt(Constants.NBT.Y_COORD, pos.getY());
|
||||
itemTag.putInt(Constants.NBT.Z_COORD, pos.getZ());
|
||||
itemTag.putInt(Constants.NBT.DIMENSION_ID, world.provider.getDimension());
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,14 +38,14 @@ public class ItemCuttingFluid extends ItemEnum.Variant<ItemCuttingFluid.FluidTyp
|
|||
NBTHelper.checkNBT(stack);
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
return tag.getInteger("used");
|
||||
return tag.getInt("used");
|
||||
}
|
||||
|
||||
public void applyDamageToFluid(ItemStack stack) {
|
||||
int damage = Math.min(getDamageOfFluid(stack) + 1, getMaxUsesForFluid(stack));
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setInteger("used", damage);
|
||||
tag.putInt("used", damage);
|
||||
}
|
||||
|
||||
public int getMaxUsesForFluid(ItemStack stack) {
|
||||
|
|
|
@ -396,13 +396,13 @@ public class ItemLivingArmour extends ArmorItem implements ISpecialArmor, IMeshP
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setTag(Constants.NBT.LIVING_ARMOUR, livingTag);
|
||||
tag.put(Constants.NBT.LIVING_ARMOUR, livingTag);
|
||||
}
|
||||
|
||||
public void setIsEnabled(ItemStack stack, boolean bool) {
|
||||
NBTHelper.checkNBT(stack);
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
tag.setBoolean("enabled", bool);
|
||||
tag.putBoolean("enabled", bool);
|
||||
}
|
||||
|
||||
public boolean isEnabled(ItemStack stack) {
|
||||
|
@ -414,7 +414,7 @@ public class ItemLivingArmour extends ArmorItem implements ISpecialArmor, IMeshP
|
|||
public void setIsElytra(ItemStack stack, boolean bool) {
|
||||
NBTHelper.checkNBT(stack);
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
tag.setBoolean("elytra", bool);
|
||||
tag.putBoolean("elytra", bool);
|
||||
}
|
||||
|
||||
public boolean isElytra(ItemStack stack) {
|
||||
|
@ -439,7 +439,7 @@ public class ItemLivingArmour extends ArmorItem implements ISpecialArmor, IMeshP
|
|||
}
|
||||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
return tag.getCompoundTag(Constants.NBT.LIVING_ARMOUR);
|
||||
return tag.getCompound(Constants.NBT.LIVING_ARMOUR);
|
||||
}
|
||||
|
||||
//TODO: Add the ability to have the armour give an upgrade with a higher level
|
||||
|
|
|
@ -250,7 +250,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
|||
NBTHelper.checkNBT(stack);
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble("costModifier", modifier);
|
||||
tag.putDouble("costModifier", modifier);
|
||||
}
|
||||
|
||||
public double getArmourModifier(ItemStack stack) {
|
||||
|
@ -264,7 +264,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
|||
NBTHelper.checkNBT(stack);
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble("armourModifier", modifier);
|
||||
tag.putDouble("armourModifier", modifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -338,7 +338,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
|||
newArmour.setTagCompound(omegaTag);
|
||||
}
|
||||
|
||||
omegaTag.setTag("armour", tag);
|
||||
omegaTag.put("armour", tag);
|
||||
Map<Enchantment, Integer> enchantmentMap = EnchantmentHelper.getEnchantments(previousArmour);
|
||||
EnchantmentHelper.setEnchantments(enchantmentMap, newArmour);
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
|||
return null;
|
||||
}
|
||||
|
||||
CompoundNBT tag = omegaTag.getCompoundTag("armour");
|
||||
CompoundNBT tag = omegaTag.getCompound("armour");
|
||||
return new ItemStack(tag);
|
||||
}
|
||||
|
||||
|
@ -380,7 +380,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
}
|
||||
|
||||
public void setAbilitiesOfArmour(EnumDemonWillType type, double willValue, ItemStack armourStack) {
|
||||
|
@ -468,7 +468,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||
}
|
||||
|
||||
public double getKnockbackResistance(ItemStack stack) {
|
||||
|
@ -483,7 +483,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble("knockback", kb);
|
||||
tag.putDouble("knockback", kb);
|
||||
}
|
||||
|
||||
public double getSpeedBoost(ItemStack stack) {
|
||||
|
@ -498,7 +498,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble("speed", speed);
|
||||
tag.putDouble("speed", speed);
|
||||
}
|
||||
|
||||
public double getDamageBoost(ItemStack stack) {
|
||||
|
@ -513,7 +513,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble("damage", damage);
|
||||
tag.putDouble("damage", damage);
|
||||
}
|
||||
|
||||
public double getAttackSpeedBoost(ItemStack stack) {
|
||||
|
@ -528,7 +528,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble("attackSpeed", attackSpeed);
|
||||
tag.putDouble("attackSpeed", attackSpeed);
|
||||
}
|
||||
|
||||
public static void revertAllArmour(PlayerEntity player) {
|
||||
|
|
|
@ -59,9 +59,9 @@ public class ItemBlockMimic extends ItemBlockEnum {
|
|||
CompoundNBT tileTag = getTagFromTileEntity(tileReplaced);
|
||||
if (tileReplaced != null) {
|
||||
CompoundNBT voidTag = new CompoundNBT();
|
||||
voidTag.setInteger("x", pos.getX());
|
||||
voidTag.setInteger("y", pos.getY());
|
||||
voidTag.setInteger("z", pos.getZ());
|
||||
voidTag.putInt("x", pos.getX());
|
||||
voidTag.putInt("y", pos.getY());
|
||||
voidTag.putInt("z", pos.getZ());
|
||||
tileReplaced.readFromNBT(voidTag);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ public class InventoryHolding extends ItemInventory {
|
|||
nbtTagCompound = new CompoundNBT();
|
||||
|
||||
UUID uuid = UUID.randomUUID();
|
||||
nbtTagCompound.setLong(Constants.NBT.MOST_SIG, uuid.getMostSignificantBits());
|
||||
nbtTagCompound.setLong(Constants.NBT.LEAST_SIG, uuid.getLeastSignificantBits());
|
||||
nbtTagCompound.putLong(Constants.NBT.MOST_SIG, uuid.getMostSignificantBits());
|
||||
nbtTagCompound.putLong(Constants.NBT.LEAST_SIG, uuid.getLeastSignificantBits());
|
||||
}
|
||||
|
||||
writeToNBT(nbtTagCompound);
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ItemInventory implements IInventory {
|
|||
|
||||
for (int i = 0; i < tags.tagCount(); i++) {
|
||||
if (!isSyncedSlot(i)) {
|
||||
CompoundNBT data = tags.getCompoundTagAt(i);
|
||||
CompoundNBT data = tags.getCompound(i);
|
||||
byte j = data.getByte(Constants.NBT.SLOT);
|
||||
|
||||
if (j >= 0 && j < inventory.size()) {
|
||||
|
@ -71,14 +71,14 @@ public class ItemInventory implements IInventory {
|
|||
}
|
||||
}
|
||||
|
||||
tagCompound.setTag(Constants.NBT.ITEMS, tags);
|
||||
tagCompound.putTag(Constants.NBT.ITEMS, tags);
|
||||
}
|
||||
|
||||
public void readFromStack(ItemStack masterStack) {
|
||||
if (masterStack != null) {
|
||||
NBTHelper.checkNBT(masterStack);
|
||||
CompoundNBT tag = masterStack.getTagCompound();
|
||||
readFromNBT(tag.getCompoundTag(Constants.NBT.ITEM_INVENTORY));
|
||||
readFromNBT(tag.getCompound(Constants.NBT.ITEM_INVENTORY));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ public class ItemInventory implements IInventory {
|
|||
CompoundNBT tag = masterStack.getTagCompound();
|
||||
CompoundNBT invTag = new CompoundNBT();
|
||||
writeToNBT(invTag);
|
||||
tag.setTag(Constants.NBT.ITEM_INVENTORY, invTag);
|
||||
tag.put(Constants.NBT.ITEM_INVENTORY, invTag);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -187,9 +187,9 @@ public class ItemNodeRouter extends Item implements INodeRenderer, IVariantProvi
|
|||
public ItemStack setBlockPos(ItemStack stack, BlockPos pos) {
|
||||
NBTHelper.checkNBT(stack);
|
||||
CompoundNBT itemTag = stack.getTagCompound();
|
||||
itemTag.setInteger(Constants.NBT.X_COORD, pos.getX());
|
||||
itemTag.setInteger(Constants.NBT.Y_COORD, pos.getY());
|
||||
itemTag.setInteger(Constants.NBT.Z_COORD, pos.getZ());
|
||||
itemTag.putInt(Constants.NBT.X_COORD, pos.getX());
|
||||
itemTag.putInt(Constants.NBT.Y_COORD, pos.getY());
|
||||
itemTag.putInt(Constants.NBT.Z_COORD, pos.getZ());
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,14 +140,14 @@ public class ItemSigilHolding extends ItemSigilBase implements IKeybindable, IAl
|
|||
for (int i = 0; i < inventorySize; i++) {
|
||||
if (!inventory.get(i).isEmpty()) {
|
||||
CompoundNBT tag = new CompoundNBT();
|
||||
tag.setByte(Constants.NBT.SLOT, (byte) i);
|
||||
tag.putByte(Constants.NBT.SLOT, (byte) i);
|
||||
inventory.get(i).writeToNBT(tag);
|
||||
itemList.appendTag(tag);
|
||||
}
|
||||
}
|
||||
|
||||
inventoryTag.setTag(Constants.NBT.ITEMS, itemList);
|
||||
itemTag.setTag(Constants.NBT.ITEM_INVENTORY, inventoryTag);
|
||||
inventoryTag.put(Constants.NBT.ITEMS, itemList);
|
||||
itemTag.put(Constants.NBT.ITEM_INVENTORY, inventoryTag);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -248,7 +248,7 @@ public class ItemSigilHolding extends ItemSigilBase implements IKeybindable, IAl
|
|||
}
|
||||
|
||||
CompoundNBT inventoryTag = tagCompound.getCompoundTag(Constants.NBT.ITEM_INVENTORY);
|
||||
ListNBT tagList = inventoryTag.getTagList(Constants.NBT.ITEMS, 10);
|
||||
ListNBT tagList = inventoryTag.getList(Constants.NBT.ITEMS, 10);
|
||||
|
||||
if (tagList.isEmpty()) {
|
||||
return NonNullList.withSize(inventorySize, ItemStack.EMPTY);
|
||||
|
|
|
@ -117,7 +117,7 @@ public class ItemSigilTeleposition extends ItemSigilBase {
|
|||
else
|
||||
tagCompound = stack.getTagCompound();
|
||||
|
||||
tagCompound.setTag("tplocation", location.serializeNBT());
|
||||
tagCompound.putTag("tplocation", location.serializeNBT());
|
||||
}
|
||||
|
||||
public static class TeleportLocation implements INBTSerializable<CompoundNBT> {
|
||||
|
@ -140,14 +140,14 @@ public class ItemSigilTeleposition extends ItemSigilBase {
|
|||
@Override
|
||||
public CompoundNBT serializeNBT() {
|
||||
CompoundNBT tag = new CompoundNBT();
|
||||
tag.setInteger("dim", dim);
|
||||
tag.setLong("pos", pos.toLong());
|
||||
tag.putInt("dim", dim);
|
||||
tag.putLong("pos", pos.toLong());
|
||||
return tag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeNBT(CompoundNBT nbt) {
|
||||
this.dim = nbt.getInteger("dim");
|
||||
this.dim = nbt.getInt("dim");
|
||||
this.pos = BlockPos.fromLong(nbt.getLong("pos"));
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class ItemSigilTransposition extends ItemSigilBase {
|
|||
|
||||
if (tag.hasKey("stored")) {
|
||||
tooltip.add(" ");
|
||||
tooltip.add(tag.getCompoundTag("stored").getString("display"));
|
||||
tooltip.add(tag.getCompound("stored").getString("display"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ public class ItemSigilTransposition extends ItemSigilBase {
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
if (tag.hasKey("stored"))
|
||||
return super.getItemStackDisplayName(stack) + " (" + tag.getCompoundTag("stored").getString("display") + ")";
|
||||
return super.getItemStackDisplayName(stack) + " (" + tag.getCompound("stored").getString("display") + ")";
|
||||
|
||||
return super.getItemStackDisplayName(stack);
|
||||
}
|
||||
|
@ -96,8 +96,8 @@ public class ItemSigilTransposition extends ItemSigilBase {
|
|||
} else if (stack.hasTagCompound() && stack.getTagCompound().hasKey("stored")) {
|
||||
BlockState worldState = world.getBlockState(blockPos);
|
||||
CompoundNBT storedTag = stack.getTagCompound().getCompoundTag("stored");
|
||||
BlockState storedState = NBTUtil.readBlockState(storedTag.getCompoundTag("state"));
|
||||
CompoundNBT tileData = storedTag.hasKey("tileData") ? storedTag.getCompoundTag("tileData") : null;
|
||||
BlockState storedState = NBTUtil.readBlockState(storedTag.getCompound("state"));
|
||||
CompoundNBT tileData = storedTag.hasKey("tileData") ? storedTag.getCompound("tileData") : null;
|
||||
|
||||
if (!worldState.getBlock().isReplaceable(world, blockPos))
|
||||
blockPos = blockPos.offset(side);
|
||||
|
@ -133,7 +133,7 @@ public class ItemSigilTransposition extends ItemSigilBase {
|
|||
return super.getNBTShareTag(stack);
|
||||
|
||||
CompoundNBT shareTag = stack.getTagCompound().copy();
|
||||
CompoundNBT storedTag = shareTag.getCompoundTag("stored");
|
||||
CompoundNBT storedTag = shareTag.getCompound("stored");
|
||||
storedTag.removeTag("state");
|
||||
storedTag.removeTag("stored");
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public class ItemMonsterSoul extends ItemEnum.Variant<ItemMonsterSoul.WillType>
|
|||
|
||||
soulStack.setItemDamage(type.ordinal());
|
||||
|
||||
tag.setDouble(Constants.NBT.SOULS, souls);
|
||||
tag.putDouble(Constants.NBT.SOULS, souls);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -61,7 +61,7 @@ public class ItemSentientArmourGem extends Item implements IMeshProvider {
|
|||
public ItemMeshDefinition getMeshDefinition() {
|
||||
return stack -> {
|
||||
boolean flag = false;
|
||||
NonNullList<ItemStack> armourInventory = Minecraft.getMinecraft().player.inventory.armorInventory;
|
||||
NonNullList<ItemStack> armourInventory = Minecraft.getInstance().player.inventory.armorInventory;
|
||||
for (ItemStack armourStack : armourInventory) {
|
||||
if (armourStack != null && armourStack.getItem() instanceof ItemSentientArmour) {
|
||||
flag = true;
|
||||
|
|
|
@ -232,7 +232,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -349,7 +349,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||
}
|
||||
|
||||
public double getDrainOfActivatedSword(ItemStack stack) {
|
||||
|
@ -364,7 +364,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||
}
|
||||
|
||||
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
||||
|
@ -379,7 +379,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||
}
|
||||
|
||||
public double getDropOfActivatedSword(ItemStack stack) {
|
||||
|
@ -394,7 +394,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||
}
|
||||
|
||||
public double getHealthBonusOfSword(ItemStack stack) {
|
||||
|
@ -409,7 +409,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||
}
|
||||
|
||||
public double getAttackSpeedOfSword(ItemStack stack) {
|
||||
|
@ -424,7 +424,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||
}
|
||||
|
||||
public double getSpeedOfSword(ItemStack stack) {
|
||||
|
@ -439,7 +439,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||
}
|
||||
|
||||
public double getDigSpeedOfSword(ItemStack stack) {
|
||||
|
@ -454,7 +454,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -164,7 +164,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble("damage", damage);
|
||||
tag.putDouble("damage", damage);
|
||||
}
|
||||
|
||||
public double getDamageAdded(ItemStack stack) {
|
||||
|
@ -180,7 +180,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setFloat("velocity", velocity);
|
||||
tag.putFloat("velocity", velocity);
|
||||
}
|
||||
|
||||
public float getVelocityOfArrow(ItemStack stack) {
|
||||
|
@ -200,7 +200,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
}
|
||||
|
||||
public double getDrainOfActivatedBow(ItemStack stack) {
|
||||
|
@ -215,7 +215,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||
}
|
||||
|
||||
public double getStaticDropOfActivatedBow(ItemStack stack) {
|
||||
|
@ -230,7 +230,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||
}
|
||||
|
||||
public double getDropOfActivatedBow(ItemStack stack) {
|
||||
|
@ -245,7 +245,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -232,7 +232,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -348,7 +348,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||
}
|
||||
|
||||
public double getDrainOfActivatedSword(ItemStack stack) {
|
||||
|
@ -363,7 +363,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||
}
|
||||
|
||||
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
||||
|
@ -378,7 +378,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||
}
|
||||
|
||||
public double getDropOfActivatedSword(ItemStack stack) {
|
||||
|
@ -393,7 +393,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||
}
|
||||
|
||||
public double getHealthBonusOfSword(ItemStack stack) {
|
||||
|
@ -408,7 +408,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||
}
|
||||
|
||||
public double getAttackSpeedOfSword(ItemStack stack) {
|
||||
|
@ -423,7 +423,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||
}
|
||||
|
||||
public double getSpeedOfSword(ItemStack stack) {
|
||||
|
@ -438,7 +438,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||
}
|
||||
|
||||
public double getDigSpeedOfSword(ItemStack stack) {
|
||||
|
@ -453,7 +453,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -232,7 +232,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -349,7 +349,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||
}
|
||||
|
||||
public double getDrainOfActivatedSword(ItemStack stack) {
|
||||
|
@ -364,7 +364,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||
}
|
||||
|
||||
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
||||
|
@ -379,7 +379,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||
}
|
||||
|
||||
public double getDropOfActivatedSword(ItemStack stack) {
|
||||
|
@ -394,7 +394,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||
}
|
||||
|
||||
public double getHealthBonusOfSword(ItemStack stack) {
|
||||
|
@ -409,7 +409,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||
}
|
||||
|
||||
public double getAttackSpeedOfSword(ItemStack stack) {
|
||||
|
@ -424,7 +424,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||
}
|
||||
|
||||
public double getSpeedOfSword(ItemStack stack) {
|
||||
|
@ -439,7 +439,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||
}
|
||||
|
||||
public double getDigSpeedOfSword(ItemStack stack) {
|
||||
|
@ -454,7 +454,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -214,7 +214,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -330,7 +330,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||
}
|
||||
|
||||
public double getDrainOfActivatedSword(ItemStack stack) {
|
||||
|
@ -345,7 +345,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||
}
|
||||
|
||||
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
||||
|
@ -360,7 +360,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||
}
|
||||
|
||||
public double getDropOfActivatedSword(ItemStack stack) {
|
||||
|
@ -375,7 +375,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||
}
|
||||
|
||||
public double getHealthBonusOfSword(ItemStack stack) {
|
||||
|
@ -390,7 +390,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||
}
|
||||
|
||||
public double getAttackSpeedOfSword(ItemStack stack) {
|
||||
|
@ -405,7 +405,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||
}
|
||||
|
||||
public double getSpeedOfSword(ItemStack stack) {
|
||||
|
@ -420,7 +420,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
|||
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||
tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -176,7 +176,7 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IMeshProvider, I
|
|||
|
||||
CompoundNBT tag = soulGemStack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.SOULS, souls);
|
||||
tag.putDouble(Constants.NBT.SOULS, souls);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -244,7 +244,7 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IMeshProvider, I
|
|||
return;
|
||||
}
|
||||
|
||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,7 +18,7 @@ public abstract class ItemSoulBreathContainer extends Item implements ISoulBreat
|
|||
public void setBreath(ItemStack stack, double amount) {
|
||||
CompoundNBT tag = stack.getTagCompound();
|
||||
|
||||
tag.setDouble(Constants.NBT.BREATH, amount);
|
||||
tag.putDouble(Constants.NBT.BREATH, amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -212,15 +212,15 @@ public class LivingArmour implements ILivingArmour {
|
|||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
maxUpgradePoints = Math.max(100, tag.getInteger("maxUpgradePoints"));
|
||||
maxUpgradePoints = Math.max(100, tag.getInt("maxUpgradePoints"));
|
||||
|
||||
ListNBT upgradeTags = tag.getTagList("upgrades", 10);
|
||||
ListNBT upgradeTags = tag.getList("upgrades", 10);
|
||||
if (upgradeTags != null) {
|
||||
for (int i = 0; i < upgradeTags.tagCount(); i++) {
|
||||
CompoundNBT upgradeTag = upgradeTags.getCompoundTagAt(i);
|
||||
CompoundNBT upgradeTag = upgradeTags.getCompound(i);
|
||||
String key = upgradeTag.getString("key");
|
||||
int level = upgradeTag.getInteger("level");
|
||||
CompoundNBT nbtTag = upgradeTag.getCompoundTag("upgrade");
|
||||
int level = upgradeTag.getInt("level");
|
||||
CompoundNBT nbtTag = upgradeTag.getCompound("upgrade");
|
||||
LivingArmourUpgrade upgrade = LivingArmourHandler.generateUpgradeFromKey(key, level, nbtTag);
|
||||
if (upgrade != null) {
|
||||
upgradeMap.put(key, upgrade);
|
||||
|
@ -238,7 +238,7 @@ public class LivingArmour implements ILivingArmour {
|
|||
}
|
||||
StatTracker tracker = (StatTracker) obj;
|
||||
String key = tracker.getUniqueIdentifier();
|
||||
CompoundNBT trackerTag = tag.getCompoundTag(key);
|
||||
CompoundNBT trackerTag = tag.getCompound(key);
|
||||
if (!trackerTag.isEmpty()) {
|
||||
tracker.readFromNBT(trackerTag);
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ public class LivingArmour implements ILivingArmour {
|
|||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag, boolean forceWrite) {
|
||||
tag.setInteger("maxUpgradePoints", maxUpgradePoints);
|
||||
tag.putInt("maxUpgradePoints", maxUpgradePoints);
|
||||
|
||||
ListNBT tags = new ListNBT();
|
||||
|
||||
|
@ -262,14 +262,14 @@ public class LivingArmour implements ILivingArmour {
|
|||
CompoundNBT nbtTag = new CompoundNBT();
|
||||
upgrade.writeToNBT(nbtTag);
|
||||
|
||||
upgradeTag.setString("key", upgrade.getUniqueIdentifier());
|
||||
upgradeTag.setInteger("level", upgrade.getUpgradeLevel());
|
||||
upgradeTag.setTag("upgrade", nbtTag);
|
||||
upgradeTag.putString("key", upgrade.getUniqueIdentifier());
|
||||
upgradeTag.putInt("level", upgrade.getUpgradeLevel());
|
||||
upgradeTag.put("upgrade", nbtTag);
|
||||
|
||||
tags.appendTag(upgradeTag);
|
||||
}
|
||||
|
||||
tag.setTag("upgrades", tags);
|
||||
tag.put("upgrades", tags);
|
||||
|
||||
for (Entry<String, StatTracker> entry : trackerMap.entrySet()) {
|
||||
StatTracker tracker = entry.getValue();
|
||||
|
@ -284,7 +284,7 @@ public class LivingArmour implements ILivingArmour {
|
|||
CompoundNBT trackerTag = new CompoundNBT();
|
||||
tracker.writeToNBT(trackerTag);
|
||||
|
||||
tag.setTag(key, trackerTag);
|
||||
tag.put(key, trackerTag);
|
||||
|
||||
tracker.resetDirty();
|
||||
}
|
||||
|
|
|
@ -51,12 +51,12 @@ public class LivingArmourUpgradeBattleHungry extends LivingArmourUpgrade {
|
|||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger("timer", timer);
|
||||
tag.putInt("timer", timer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
timer = tag.getInteger("timer");
|
||||
timer = tag.getInt("timer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,12 +31,12 @@ public class StatTrackerArrowProtect extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDamage = tag.getInteger(BloodMagic.MODID + ".tracker.arrowProtect");
|
||||
totalDamage = tag.getInt(BloodMagic.MODID + ".tracker.arrowProtect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.arrowProtect", totalDamage);
|
||||
tag.putInt(BloodMagic.MODID + ".tracker.arrowProtect", totalDamage);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,12 +31,12 @@ public class StatTrackerArrowShot extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalShots = tag.getInteger(BloodMagic.MODID + ".tracker.trickShot");
|
||||
totalShots = tag.getInt(BloodMagic.MODID + ".tracker.trickShot");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.trickShot", totalShots);
|
||||
tag.putInt(BloodMagic.MODID + ".tracker.trickShot", totalShots);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,7 +36,7 @@ public class StatTrackerCriticalStrike extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.criticalStrike", totalDamageDealt);
|
||||
tag.putDouble(BloodMagic.MODID + ".tracker.criticalStrike", totalDamageDealt);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,12 +31,12 @@ public class StatTrackerDigging extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalBlocksDug = tag.getInteger(BloodMagic.MODID + ".tracker.digging");
|
||||
totalBlocksDug = tag.getInt(BloodMagic.MODID + ".tracker.digging");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.digging", totalBlocksDug);
|
||||
tag.putInt(BloodMagic.MODID + ".tracker.digging", totalBlocksDug);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,7 +36,7 @@ public class StatTrackerExperience extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.experienced", totalExperienceGained);
|
||||
tag.putDouble(BloodMagic.MODID + ".tracker.experienced", totalExperienceGained);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,12 +31,12 @@ public class StatTrackerFallProtect extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDamage = tag.getInteger(BloodMagic.MODID + ".tracker.fallProtect");
|
||||
totalDamage = tag.getInt(BloodMagic.MODID + ".tracker.fallProtect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.fallProtect", totalDamage);
|
||||
tag.putInt(BloodMagic.MODID + ".tracker.fallProtect", totalDamage);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,12 +29,12 @@ public class StatTrackerFireResist extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalFireTicks = tag.getInteger(BloodMagic.MODID + ".tracker.fire");
|
||||
totalFireTicks = tag.getInt(BloodMagic.MODID + ".tracker.fire");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.fire", totalFireTicks);
|
||||
tag.putInt(BloodMagic.MODID + ".tracker.fire", totalFireTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,12 +34,12 @@ public class StatTrackerFood extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
foodEaten = tag.getInteger(BloodMagic.MODID + ".tracker.foodEaten");
|
||||
foodEaten = tag.getInt(BloodMagic.MODID + ".tracker.foodEaten");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.foodEaten", foodEaten);
|
||||
tag.putInt(BloodMagic.MODID + ".tracker.foodEaten", foodEaten);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class StatTrackerGraveDigger extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.graveDigger", totalDamageDealt);
|
||||
tag.putDouble(BloodMagic.MODID + ".tracker.graveDigger", totalDamageDealt);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,12 +32,12 @@ public class StatTrackerGrimReaperSprint extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalDeaths = tag.getInteger(BloodMagic.MODID + ".tracker.grimReaper");
|
||||
totalDeaths = tag.getInt(BloodMagic.MODID + ".tracker.grimReaper");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.grimReaper", totalDeaths);
|
||||
tag.putInt(BloodMagic.MODID + ".tracker.grimReaper", totalDeaths);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,7 +36,7 @@ public class StatTrackerHealthboost extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.health", totalHealthGenned);
|
||||
tag.putDouble(BloodMagic.MODID + ".tracker.health", totalHealthGenned);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,12 +32,12 @@ public class StatTrackerJump extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void readFromNBT(CompoundNBT tag) {
|
||||
totalJumps = tag.getInteger(BloodMagic.MODID + ".tracker.jump");
|
||||
totalJumps = tag.getInt(BloodMagic.MODID + ".tracker.jump");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setInteger(BloodMagic.MODID + ".tracker.jump", totalJumps);
|
||||
tag.putInt(BloodMagic.MODID + ".tracker.jump", totalJumps);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class StatTrackerMeleeDamage extends StatTracker {
|
|||
|
||||
@Override
|
||||
public void writeToNBT(CompoundNBT tag) {
|
||||
tag.setDouble(BloodMagic.MODID + ".tracker.meleeDamage", totalDamageDealt);
|
||||
tag.putDouble(BloodMagic.MODID + ".tracker.meleeDamage", totalDamageDealt);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue