mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-27 15:33:08 +00:00
Bump mappings to 20200707-1.16.1
This commit is contained in:
1 parent
0339191502
commit
919d3f94a9
87 files changed
+210
-210
No files matched your search
@@ -28,7 +28,7 @@ public interface IPetalApothecary {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String func_176610_l() {
|
||||
public String getString() {
|
||||
return name().toLowerCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ public enum AlfPortalState implements IStringSerializable {
|
||||
ON_X;
|
||||
|
||||
@Override
|
||||
public String func_176610_l() {
|
||||
public String getString() {
|
||||
return name().toLowerCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public enum CratePattern implements IStringSerializable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_176610_l() {
|
||||
public String getString() {
|
||||
return name().toLowerCase(Locale.ROOT);
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ public enum LuminizerVariant implements IStringSerializable {
|
||||
TOGGLE;
|
||||
|
||||
@Override
|
||||
public String func_176610_l() {
|
||||
public String getString() {
|
||||
return name().toLowerCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickableTile
|
||||
@Override
|
||||
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) {
|
||||
if (cap == FLOATING_FLOWER_CAP) {
|
||||
if (hasWorld() && getBlockState().func_235714_a_(ModTags.Blocks.SPECIAL_FLOATING_FLOWERS)) {
|
||||
if (hasWorld() && getBlockState().isIn(ModTags.Blocks.SPECIAL_FLOATING_FLOWERS)) {
|
||||
return floatingDataCap.cast();
|
||||
}
|
||||
}
|
||||
@@ -158,8 +158,8 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickableTile
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void func_230337_a_(BlockState state, CompoundNBT cmp) {
|
||||
super.func_230337_a_(state, cmp);
|
||||
public final void read(BlockState state, CompoundNBT cmp) {
|
||||
super.read(state, cmp);
|
||||
if (cmp.contains(TAG_TICKS_EXISTED)) {
|
||||
ticksExisted = cmp.getInt(TAG_TICKS_EXISTED);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public final class ContributorFancinessHandler extends LayerRenderer<AbstractCli
|
||||
String rawName = value.toLowerCase(Locale.ROOT);
|
||||
String flowerName = LEGACY_FLOWER_NAMES.getOrDefault(rawName, rawName);
|
||||
|
||||
Item item = ModTags.Items.SPECIAL_FLOWERS.func_230236_b_().stream()
|
||||
Item item = ModTags.Items.SPECIAL_FLOWERS.getAllElements().stream()
|
||||
.filter(flower -> Registry.ITEM.getKey(flower).getPath().equals(flowerName))
|
||||
.findFirst().orElse(Items.POPPY);
|
||||
m.put(key, new ItemStack(item));
|
||||
|
||||
@@ -52,12 +52,12 @@ public class CorporeaInputHandler {
|
||||
int count = 1;
|
||||
int max = stack.getMaxStackSize();
|
||||
|
||||
if (Screen.func_231173_s_()) {
|
||||
if (Screen.hasShiftDown()) {
|
||||
count = max;
|
||||
if (Screen.func_231172_r_()) {
|
||||
if (Screen.hasControlDown()) {
|
||||
count /= 4;
|
||||
}
|
||||
} else if (Screen.func_231172_r_()) {
|
||||
} else if (Screen.hasControlDown()) {
|
||||
count = max / 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public final class DebugHandler {
|
||||
}
|
||||
}
|
||||
|
||||
if (Screen.func_231172_r_() && Screen.func_231173_s_()) {
|
||||
if (Screen.hasControlDown() && Screen.hasShiftDown()) {
|
||||
event.getLeft().add(PREFIX + "Config Context");
|
||||
event.getLeft().add(" shaders.enabled: " + ConfigHandler.CLIENT.useShaders.get());
|
||||
|
||||
|
||||
@@ -307,13 +307,13 @@ public final class HUDHandler {
|
||||
int w = mc.getMainWindow().getScaledWidth();
|
||||
int h = mc.getMainWindow().getScaledHeight();
|
||||
int boxH = h / 2 + (tile.locked ? 20 : 10);
|
||||
AbstractGui.func_238467_a_(ms, w / 2 + 8, h / 2 - 12, w / 2 + strlen + 32, boxH, 0x44000000);
|
||||
AbstractGui.func_238467_a_(ms, w / 2 + 6, h / 2 - 14, w / 2 + strlen + 34, boxH + 2, 0x44000000);
|
||||
AbstractGui.fill(ms, w / 2 + 8, h / 2 - 12, w / 2 + strlen + 32, boxH, 0x44000000);
|
||||
AbstractGui.fill(ms, w / 2 + 6, h / 2 - 14, w / 2 + strlen + 34, boxH + 2, 0x44000000);
|
||||
|
||||
mc.fontRenderer.func_238405_a_(ms, s1, w / 2 + 30, h / 2 - 10, 0x6666FF);
|
||||
mc.fontRenderer.func_238405_a_(ms, tile.getItemCount() + "x", w / 2 + 30, h / 2, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, s1, w / 2 + 30, h / 2 - 10, 0x6666FF);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, tile.getItemCount() + "x", w / 2 + 30, h / 2, 0xFFFFFF);
|
||||
if (tile.locked) {
|
||||
mc.fontRenderer.func_238405_a_(ms, I18n.format("botaniamisc.locked"), w / 2 + 30, h / 2 + 10, 0xFFAA00);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, I18n.format("botaniamisc.locked"), w / 2 + 30, h / 2 + 10, 0xFFAA00);
|
||||
}
|
||||
RenderSystem.enableRescaleNormal();
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(target, w / 2 + 10, h / 2 - 10);
|
||||
@@ -332,14 +332,14 @@ public final class HUDHandler {
|
||||
int x = mc.getMainWindow().getScaledWidth() - l - 20;
|
||||
int y = mc.getMainWindow().getScaledHeight() - 60;
|
||||
|
||||
AbstractGui.func_238467_a_(ms, x - 6, y - 6, x + l + 6, y + 37, 0x44000000);
|
||||
AbstractGui.func_238467_a_(ms, x - 4, y - 4, x + l + 4, y + 35, 0x44000000);
|
||||
AbstractGui.fill(ms, x - 6, y - 6, x + l + 6, y + 37, 0x44000000);
|
||||
AbstractGui.fill(ms, x - 4, y - 4, x + l + 4, y + 35, 0x44000000);
|
||||
RenderSystem.enableRescaleNormal();
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(new ItemStack(ModBlocks.corporeaIndex), x, y + 10);
|
||||
|
||||
mc.fontRenderer.func_238405_a_(ms, txt0, x + 20, y, 0xFFFFFF);
|
||||
mc.fontRenderer.func_238405_a_(ms, txt1, x + 20, y + 14, 0xFFFFFF);
|
||||
mc.fontRenderer.func_238405_a_(ms, txt2, x + 20, y + 24, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, txt0, x + 20, y, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, txt1, x + 20, y + 14, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, txt2, x + 20, y + 24, 0xFFFFFF);
|
||||
}
|
||||
|
||||
public static void drawSimpleManaHUD(MatrixStack ms, int color, int mana, int maxMana, String name) {
|
||||
@@ -349,7 +349,7 @@ public final class HUDHandler {
|
||||
int x = mc.getMainWindow().getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(name) / 2;
|
||||
int y = mc.getMainWindow().getScaledHeight() / 2 + 10;
|
||||
|
||||
mc.fontRenderer.func_238405_a_(ms, name, x, y, color);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, name, x, y, color);
|
||||
|
||||
x = mc.getMainWindow().getScaledWidth() / 2 - 51;
|
||||
y += 10;
|
||||
@@ -372,11 +372,11 @@ public final class HUDHandler {
|
||||
|
||||
RenderSystem.disableDepthTest();
|
||||
if (properlyBound) {
|
||||
mc.fontRenderer.func_238405_a_(ms, "\u2714", x + 10, y + 9, 0x004C00);
|
||||
mc.fontRenderer.func_238405_a_(ms, "\u2714", x + 10, y + 8, 0x0BD20D);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, "\u2714", x + 10, y + 9, 0x004C00);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, "\u2714", x + 10, y + 8, 0x0BD20D);
|
||||
} else {
|
||||
mc.fontRenderer.func_238405_a_(ms, "\u2718", x + 10, y + 9, 0x4C0000);
|
||||
mc.fontRenderer.func_238405_a_(ms, "\u2718", x + 10, y + 8, 0xD2080D);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, "\u2718", x + 10, y + 9, 0x4C0000);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, "\u2718", x + 10, y + 8, 0xD2080D);
|
||||
}
|
||||
RenderSystem.enableDepthTest();
|
||||
}
|
||||
|
||||
@@ -66,11 +66,11 @@ public final class ItemsRemainingRenderHandler {
|
||||
RenderSystem.color4f(1F, 1F, 1F, 1F);
|
||||
RenderSystem.enableBlend();
|
||||
|
||||
ITextComponent text = StringTextComponent.field_240750_d_;
|
||||
ITextComponent text = StringTextComponent.EMPTY;
|
||||
|
||||
if (customString == null) {
|
||||
if (!stack.isEmpty()) {
|
||||
text = stack.getDisplayName().func_230532_e_().func_240699_a_(TextFormatting.GREEN);
|
||||
text = stack.getDisplayName().deepCopy().func_240699_a_(TextFormatting.GREEN);
|
||||
if (count >= 0) {
|
||||
int max = stack.getMaxStackSize();
|
||||
int stacks = count / max;
|
||||
|
||||
@@ -67,13 +67,13 @@ public class KonamiHandler {
|
||||
RenderSystem.disableDepthTest();
|
||||
ms.push();
|
||||
int fullWidth = Minecraft.getInstance().fontRenderer.getStringWidth(meme);
|
||||
int left = evt.gui.field_230708_k_;
|
||||
double widthPerTick = (fullWidth + evt.gui.field_230708_k_) / 240;
|
||||
int left = evt.gui.width;
|
||||
double widthPerTick = (fullWidth + evt.gui.width) / 240;
|
||||
double currWidth = left - widthPerTick * (240 - (konamiTime - evt.partialTicks)) * 3.2;
|
||||
|
||||
ms.translate(currWidth, evt.gui.field_230709_l_ / 2 - 10, 0);
|
||||
ms.translate(currWidth, evt.gui.height / 2 - 10, 0);
|
||||
ms.scale(4, 4, 4);
|
||||
Minecraft.getInstance().fontRenderer.func_238405_a_(evt.matrixStack, meme, 0, 0, 0xFFFFFF);
|
||||
Minecraft.getInstance().fontRenderer.drawStringWithShadow(evt.matrixStack, meme, 0, 0, 0xFFFFFF);
|
||||
ms.pop();
|
||||
RenderSystem.enableDepthTest();
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ public class RenderLexicon {
|
||||
|
||||
ms.translate(0F, 10F, 0F);
|
||||
ms.scale(0.6F, 0.6F, 0.6F);
|
||||
ITextComponent edition = ItemLexicon.getEdition().func_230532_e_().func_240701_a_(TextFormatting.ITALIC, TextFormatting.BOLD);
|
||||
ITextComponent edition = ItemLexicon.getEdition().deepCopy().func_240701_a_(TextFormatting.ITALIC, TextFormatting.BOLD);
|
||||
font.func_238416_a_(edition, 0, 0, 0xA07100, false, ms.getLast().getMatrix(), buffers, false, 0, light);
|
||||
|
||||
if (quote == -1) {
|
||||
|
||||
@@ -56,11 +56,11 @@ public final class TooltipAdditionDisplayHandler {
|
||||
float hueOff = (ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.01F;
|
||||
|
||||
RenderSystem.disableDepthTest();
|
||||
AbstractGui.func_238467_a_(ms, mouseX - 1, mouseY - height - 1, mouseX + width + 1, mouseY, 0xFF000000);
|
||||
AbstractGui.fill(ms, mouseX - 1, mouseY - height - 1, mouseX + width + 1, mouseY, 0xFF000000);
|
||||
for (int i = 0; i < rainbowWidth; i++) {
|
||||
AbstractGui.func_238467_a_(ms, mouseX + i, mouseY - height, mouseX + i + 1, mouseY, 0xFF000000 | MathHelper.hsvToRGB((hueOff + huePer * i) % 1F, 1F, 1F));
|
||||
AbstractGui.fill(ms, mouseX + i, mouseY - height, mouseX + i + 1, mouseY, 0xFF000000 | MathHelper.hsvToRGB((hueOff + huePer * i) % 1F, 1F, 1F));
|
||||
}
|
||||
AbstractGui.func_238467_a_(ms, mouseX + rainbowWidth, mouseY - height, mouseX + width, mouseY, 0xFF555555);
|
||||
AbstractGui.fill(ms, mouseX + rainbowWidth, mouseY - height, mouseX + width, mouseY, 0xFF555555);
|
||||
|
||||
String rank = I18n.format("botania.rank" + level).replaceAll("&", "\u00a7");
|
||||
|
||||
@@ -68,10 +68,10 @@ public final class TooltipAdditionDisplayHandler {
|
||||
RenderSystem.disableLighting();
|
||||
ms.push();
|
||||
ms.translate(0, 0, 300);
|
||||
font.func_238405_a_(ms, rank, mouseX, mouseY - 12, 0xFFFFFF);
|
||||
font.drawStringWithShadow(ms, rank, mouseX, mouseY - 12, 0xFFFFFF);
|
||||
if (!ss) {
|
||||
rank = I18n.format("botania.rank" + (level + 1)).replaceAll("&", "\u00a7");
|
||||
font.func_238405_a_(ms, rank, mouseX + width - font.getStringWidth(rank), mouseY - 12, 0xFFFFFF);
|
||||
font.drawStringWithShadow(ms, rank, mouseX + width - font.getStringWidth(rank), mouseY - 12, 0xFFFFFF);
|
||||
}
|
||||
ms.pop();
|
||||
RenderSystem.enableLighting();
|
||||
@@ -84,9 +84,9 @@ public final class TooltipAdditionDisplayHandler {
|
||||
int manaBarWidth = (int) Math.ceil(width * fraction);
|
||||
|
||||
RenderSystem.disableDepthTest();
|
||||
AbstractGui.func_238467_a_(ms, mouseX - 1, mouseY - height - 1, mouseX + width + 1, mouseY, 0xFF000000);
|
||||
AbstractGui.func_238467_a_(ms, mouseX, mouseY - height, mouseX + manaBarWidth, mouseY, 0xFF000000 | MathHelper.hsvToRGB(0.528F, ((float) Math.sin((ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.2) + 1F) * 0.3F + 0.4F, 1F));
|
||||
AbstractGui.func_238467_a_(ms, mouseX + manaBarWidth, mouseY - height, mouseX + width, mouseY, 0xFF555555);
|
||||
AbstractGui.fill(ms, mouseX - 1, mouseY - height - 1, mouseX + width + 1, mouseY, 0xFF000000);
|
||||
AbstractGui.fill(ms, mouseX, mouseY - height, mouseX + manaBarWidth, mouseY, 0xFF000000 | MathHelper.hsvToRGB(0.528F, ((float) Math.sin((ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.2) + 1F) * 0.3F + 0.4F, 1F));
|
||||
AbstractGui.fill(ms, mouseX + manaBarWidth, mouseY - height, mouseX + width, mouseY, 0xFF555555);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -33,7 +33,7 @@ public final class TooltipHandler {
|
||||
}
|
||||
|
||||
public static void addOnShift(List<ITextComponent> tooltip, Runnable lambda) {
|
||||
if (Screen.func_231173_s_()) {
|
||||
if (Screen.hasShiftDown()) {
|
||||
lambda.run();
|
||||
} else {
|
||||
tooltip.add(getShiftInfoTooltip());
|
||||
|
||||
@@ -219,7 +219,7 @@ public final class RenderHelper {
|
||||
}
|
||||
|
||||
public static void drawTexturedModalRect(MatrixStack ms, int x, int y, int u, int v, int width, int height) {
|
||||
AbstractGui.func_238463_a_(ms, x, y, u, v, width, height, 256, 256);
|
||||
AbstractGui.blit(ms, x, y, u, v, width, height, 256, 256);
|
||||
}
|
||||
|
||||
public static void renderStar(MatrixStack ms, IRenderTypeBuffer buffers, int color, float xScale, float yScale, float zScale, long seed) {
|
||||
|
||||
@@ -35,17 +35,17 @@ public class GuiFlowerBag extends ContainerScreen<ContainerFlowerBag> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_230430_a_(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
|
||||
this.func_230446_a_(ms);
|
||||
super.func_230430_a_(ms, mouseX, mouseY, partialTicks);
|
||||
public void render(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
|
||||
this.renderBackground(ms);
|
||||
super.render(ms, mouseX, mouseY, partialTicks);
|
||||
this.func_230459_a_(ms, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void func_230451_b_(MatrixStack ms, int mouseX, int mouseY) {
|
||||
String s = I18n.format(ModItems.flowerBag.getTranslationKey());
|
||||
field_230712_o_.func_238421_b_(ms, s, xSize / 2 - field_230712_o_.getStringWidth(s) / 2, 6, 4210752);
|
||||
field_230712_o_.func_238421_b_(ms, I18n.format("container.inventory"), 8, ySize - 96 + 2, 4210752);
|
||||
font.drawString(ms, s, xSize / 2 - font.getStringWidth(s) / 2, 6, 4210752);
|
||||
font.drawString(ms, I18n.format("container.inventory"), 8, ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -53,9 +53,9 @@ public class GuiFlowerBag extends ContainerScreen<ContainerFlowerBag> {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(texture);
|
||||
int k = (field_230708_k_ - xSize) / 2;
|
||||
int l = (field_230709_l_ - ySize) / 2;
|
||||
func_238474_b_(ms, k, l, 0, 0, xSize, ySize);
|
||||
int k = (width - xSize) / 2;
|
||||
int l = (height - ySize) / 2;
|
||||
blit(ms, k, l, 0, 0, xSize, ySize);
|
||||
|
||||
for (Slot slot : container.inventorySlots) {
|
||||
if (slot.inventory == container.flowerBagInv && !slot.getHasStack()) {
|
||||
@@ -64,7 +64,7 @@ public class GuiFlowerBag extends ContainerScreen<ContainerFlowerBag> {
|
||||
int x = guiLeft + slot.xPos;
|
||||
int y = guiTop + slot.yPos;
|
||||
mc.getItemRenderer().renderItemIntoGUI(stack, x, y);
|
||||
mc.fontRenderer.func_238405_a_(ms, "0", x + 11, y + 9, 0xFF6666);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, "0", x + 11, y + 9, 0xFF6666);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ public class GuiBaubleBox extends ContainerScreen<ContainerBaubleBox> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_230430_a_(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
|
||||
this.func_230446_a_(ms);
|
||||
super.func_230430_a_(ms, mouseX, mouseY, partialTicks);
|
||||
public void render(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
|
||||
this.renderBackground(ms);
|
||||
super.render(ms, mouseX, mouseY, partialTicks);
|
||||
this.mouseX = mouseX;
|
||||
this.mouseY = mouseY;
|
||||
this.func_230459_a_(ms, mouseX, mouseY);
|
||||
@@ -43,8 +43,8 @@ public class GuiBaubleBox extends ContainerScreen<ContainerBaubleBox> {
|
||||
protected void func_230450_a_(MatrixStack ms, float partialTicks, int mouseX, int mouseY) {
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getInstance().getTextureManager().bindTexture(texture);
|
||||
func_238474_b_(ms, guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
InventoryScreen.drawEntityOnScreen(guiLeft + 31, guiTop + 75, 30, guiLeft + 31 - this.mouseX, guiTop + 75 - 50 - this.mouseY, field_230706_i_.player);
|
||||
blit(ms, guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
InventoryScreen.drawEntityOnScreen(guiLeft + 31, guiTop + 75, 30, guiLeft + 31 - this.mouseX, guiTop + 75 - 50 - this.mouseY, minecraft.player);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class JEIBotaniaPlugin implements IModPlugin {
|
||||
}
|
||||
|
||||
public static boolean doesOreExist(ResourceLocation tagId) {
|
||||
return !BlockTags.getCollection().getOrCreate(tagId).func_230236_b_().isEmpty();
|
||||
return !BlockTags.getCollection().getOrCreate(tagId).getAllElements().isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -221,7 +221,7 @@ public class JEIBotaniaPlugin implements IModPlugin {
|
||||
public static void addDefaultRecipeIdTooltip(IGuiIngredientGroup<?> group, int slot, ResourceLocation recipeId) {
|
||||
group.addTooltipCallback((slotIndex, input, ingredient, tooltip) -> {
|
||||
if (slotIndex == slot) {
|
||||
if (Minecraft.getInstance().gameSettings.advancedItemTooltips || Screen.func_231173_s_()) {
|
||||
if (Minecraft.getInstance().gameSettings.advancedItemTooltips || Screen.hasShiftDown()) {
|
||||
tooltip.add(new TranslationTextComponent("jei.tooltip.recipe.id", recipeId).func_240699_a_(TextFormatting.DARK_GRAY));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class CompositeLensRecipeWrapper implements ICustomCraftingCategoryExtens
|
||||
|
||||
public CompositeLensRecipeWrapper(CompositeLensRecipe recipe) {
|
||||
List<ItemStack> lensStacks = ItemTags.getCollection().getOrCreate(new ResourceLocation(LibMisc.MOD_ID, "lens"))
|
||||
.func_230236_b_().stream()
|
||||
.getAllElements().stream()
|
||||
.map(ItemStack::new)
|
||||
.filter(s -> !((ItemLens) s.getItem()).isControlLens(s))
|
||||
.filter(s -> ((ItemLens) s.getItem()).isCombinable(s))
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ public class ElvenTradeRecipeCategory implements IRecipeCategory<IElvenTradeReci
|
||||
ResourceLocation recipeId = recipe.getId();
|
||||
recipeLayout.getItemStacks().addTooltipCallback((slotIndex, input, ingredient, tooltip) -> {
|
||||
if (slotIndex >= endIndex) {
|
||||
if (Minecraft.getInstance().gameSettings.advancedItemTooltips || Screen.func_231173_s_()) {
|
||||
if (Minecraft.getInstance().gameSettings.advancedItemTooltips || Screen.hasShiftDown()) {
|
||||
tooltip.add(new TranslationTextComponent("jei.tooltip.recipe.id", recipeId).func_240699_a_(TextFormatting.DARK_GRAY));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ public abstract class OrechidRecipeCategoryBase<T extends OrechidRecipeWrapper>
|
||||
// Shouldn't ever return an empty list since the ore weight
|
||||
// list is filtered to only have ores with ItemBlocks
|
||||
List<ItemStack> stackList = BlockTags.getCollection().getOrCreate(recipe.entry.getKey())
|
||||
.func_230236_b_()
|
||||
.getAllElements()
|
||||
.stream()
|
||||
.filter(s -> s.asItem() != Items.AIR)
|
||||
.map(ItemStack::new)
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ abstract class RotatingItemListComponentBase implements ICustomComponent {
|
||||
int ticksElapsed = context.getTicksInBook();
|
||||
|
||||
float currentDegree = ConfigHandler.CLIENT.lexiconRotatingItems.get()
|
||||
? Screen.func_231173_s_()
|
||||
? Screen.hasShiftDown()
|
||||
? ticksElapsed
|
||||
: ticksElapsed + pticks
|
||||
: 0;
|
||||
|
||||
@@ -214,12 +214,12 @@ public class Botania {
|
||||
}
|
||||
|
||||
GlobalEntityTypeAttributes.put(ModEntities.DOPPLEGANGER, MobEntity.func_233666_p_()
|
||||
.func_233815_a_(Attributes.field_233821_d_, 0.4)
|
||||
.func_233815_a_(Attributes.field_233818_a_, EntityDoppleganger.MAX_HP)
|
||||
.func_233815_a_(Attributes.field_233820_c_, 1.0)
|
||||
.func_233815_a_(Attributes.MOVEMENT_SPEED, 0.4)
|
||||
.func_233815_a_(Attributes.MAX_HEALTH, EntityDoppleganger.MAX_HP)
|
||||
.func_233815_a_(Attributes.KNOCKBACK_RESISTANCE, 1.0)
|
||||
.func_233813_a_());
|
||||
GlobalEntityTypeAttributes.put(ModEntities.PIXIE, MobEntity.func_233666_p_()
|
||||
.func_233815_a_(Attributes.field_233818_a_, 2.0)
|
||||
.func_233815_a_(Attributes.MAX_HEALTH, 2.0)
|
||||
.func_233813_a_());
|
||||
ModBanners.init();
|
||||
ColorHelper.init();
|
||||
@@ -265,7 +265,7 @@ public class Botania {
|
||||
}
|
||||
};
|
||||
IStateMatcher sm = PatchouliAPI.instance.predicateMatcher(Blocks.IRON_BLOCK,
|
||||
state -> state.func_235714_a_(BlockTags.field_232875_ap_));
|
||||
state -> state.isIn(BlockTags.BEACON_BASE_BLOCKS));
|
||||
IMultiblock mb = PatchouliAPI.instance.makeMultiblock(
|
||||
pat,
|
||||
'P', ModBlocks.gaiaPylon,
|
||||
|
||||
@@ -60,8 +60,8 @@ public class BlockCraftyCrate extends BlockOpenCrate implements IWandHUD {
|
||||
int xc = mc.getMainWindow().getScaledWidth() / 2 + 20;
|
||||
int yc = mc.getMainWindow().getScaledHeight() / 2 - height / 2;
|
||||
|
||||
AbstractGui.func_238467_a_(ms, xc - 6, yc - 6, xc + width + 6, yc + height + 6, 0x22000000);
|
||||
AbstractGui.func_238467_a_(ms, xc - 4, yc - 4, xc + width + 4, yc + height + 4, 0x22000000);
|
||||
AbstractGui.fill(ms, xc - 6, yc - 6, xc + width + 6, yc + height + 6, 0x22000000);
|
||||
AbstractGui.fill(ms, xc - 4, yc - 4, xc + width + 4, yc + height + 4, 0x22000000);
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 3; j++) {
|
||||
@@ -74,7 +74,7 @@ public class BlockCraftyCrate extends BlockOpenCrate implements IWandHUD {
|
||||
enabled = craft.getPattern().openSlots.get(index);
|
||||
}
|
||||
|
||||
AbstractGui.func_238467_a_(ms, xp, yp, xp + 16, yp + 16, enabled ? 0x22FFFFFF : 0x22FF0000);
|
||||
AbstractGui.fill(ms, xp, yp, xp + 16, yp + 16, enabled ? 0x22FFFFFF : 0x22FF0000);
|
||||
|
||||
ItemStack item = craft.getItemHandler().getStackInSlot(index);
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(item, xp, yp);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class BlockGhostRail extends AbstractRailBlock {
|
||||
boolean air = state.isAir(cart.world, entPos);
|
||||
|
||||
if (state.getBlock() == ModBlocks.dreamwood
|
||||
|| (state.getBlock() != ModBlocks.ghostRail && state.func_235714_a_(BlockTags.RAILS))) {
|
||||
|| (state.getBlock() != ModBlocks.ghostRail && state.isIn(BlockTags.RAILS))) {
|
||||
cart.world.playEvent(2003, entPos, 0);
|
||||
cart.getPersistentData().putInt(TAG_FLOAT_TICKS, 0);
|
||||
} else {
|
||||
|
||||
@@ -81,7 +81,7 @@ public class BlockHourglass extends BlockModWaterloggable implements IManaTrigge
|
||||
|
||||
if (hourglass.lock) {
|
||||
if (!player.world.isRemote) {
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.hourglassLock"), Util.field_240973_b_);
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.hourglassLock"), Util.DUMMY_UUID);
|
||||
}
|
||||
return ActionResultType.FAIL;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public final class ModBlocks {
|
||||
public static final Block blackFlower = new BlockModFlower(DyeColor.BLACK, Block.Properties.from(whiteFlower));
|
||||
|
||||
public static final Block defaultAltar = new BlockAltar(BlockAltar.Variant.DEFAULT, Block.Properties.create(Material.ROCK).hardnessAndResistance(3.5F).sound(SoundType.STONE)
|
||||
.func_235838_a_(s -> s.get(BlockAltar.FLUID) == IPetalApothecary.State.LAVA ? 15 : 0));
|
||||
.setLightLevel(s -> s.get(BlockAltar.FLUID) == IPetalApothecary.State.LAVA ? 15 : 0));
|
||||
public static final Block forestAltar = new BlockAltar(BlockAltar.Variant.FOREST, Block.Properties.from(defaultAltar));
|
||||
public static final Block plainsAltar = new BlockAltar(BlockAltar.Variant.PLAINS, Block.Properties.from(defaultAltar));
|
||||
public static final Block mountainAltar = new BlockAltar(BlockAltar.Variant.MOUNTAIN, Block.Properties.from(defaultAltar));
|
||||
@@ -90,13 +90,13 @@ public final class ModBlocks {
|
||||
public static final Block livingwoodPlanksMossy = new BlockMod(Block.Properties.from(livingwood));
|
||||
public static final Block livingwoodFramed = new BlockMod(Block.Properties.from(livingwood));
|
||||
public static final Block livingwoodPatternFramed = new BlockMod(Block.Properties.from(livingwood));
|
||||
public static final Block livingwoodGlimmering = new BlockMod(Block.Properties.from(livingwood).func_235838_a_(s -> 12));
|
||||
public static final Block livingwoodGlimmering = new BlockMod(Block.Properties.from(livingwood).setLightLevel(s -> 12));
|
||||
|
||||
private static final AbstractBlock.IExtendedPositionPredicate<EntityType<?>> NO_SPAWN = (state, world, pos, et) -> false;
|
||||
public static final Block manaSpreader = new BlockSpreader(BlockSpreader.Variant.MANA, Block.Properties.from(livingwood).func_235827_a_(NO_SPAWN));
|
||||
public static final Block redstoneSpreader = new BlockSpreader(BlockSpreader.Variant.REDSTONE, Block.Properties.from(livingwood).func_235827_a_(NO_SPAWN));
|
||||
public static final Block elvenSpreader = new BlockSpreader(BlockSpreader.Variant.ELVEN, Block.Properties.from(livingwood).func_235827_a_(NO_SPAWN));
|
||||
public static final Block gaiaSpreader = new BlockSpreader(BlockSpreader.Variant.GAIA, Block.Properties.from(livingwood).func_235827_a_(NO_SPAWN));
|
||||
public static final Block manaSpreader = new BlockSpreader(BlockSpreader.Variant.MANA, Block.Properties.from(livingwood).setPropagatesDownwards(NO_SPAWN));
|
||||
public static final Block redstoneSpreader = new BlockSpreader(BlockSpreader.Variant.REDSTONE, Block.Properties.from(livingwood).setPropagatesDownwards(NO_SPAWN));
|
||||
public static final Block elvenSpreader = new BlockSpreader(BlockSpreader.Variant.ELVEN, Block.Properties.from(livingwood).setPropagatesDownwards(NO_SPAWN));
|
||||
public static final Block gaiaSpreader = new BlockSpreader(BlockSpreader.Variant.GAIA, Block.Properties.from(livingwood).setPropagatesDownwards(NO_SPAWN));
|
||||
|
||||
public static final Block manaPool = new BlockPool(BlockPool.Variant.DEFAULT, Block.Properties.from(livingrock));
|
||||
public static final Block creativePool = new BlockPool(BlockPool.Variant.CREATIVE, Block.Properties.from(livingrock));
|
||||
@@ -104,15 +104,15 @@ public final class ModBlocks {
|
||||
public static final Block fabulousPool = new BlockPool(BlockPool.Variant.FABULOUS, Block.Properties.from(livingrock));
|
||||
|
||||
public static final Block runeAltar = new BlockRuneAltar(Block.Properties.from(livingrock));
|
||||
public static final Block manaPylon = new BlockPylon(BlockPylon.Variant.MANA, Block.Properties.create(Material.IRON).hardnessAndResistance(5.5F).sound(SoundType.METAL).func_235838_a_(s -> 7));
|
||||
public static final Block manaPylon = new BlockPylon(BlockPylon.Variant.MANA, Block.Properties.create(Material.IRON).hardnessAndResistance(5.5F).sound(SoundType.METAL).setLightLevel(s -> 7));
|
||||
public static final Block naturaPylon = new BlockPylon(BlockPylon.Variant.NATURA, Block.Properties.from(manaPylon));
|
||||
public static final Block gaiaPylon = new BlockPylon(BlockPylon.Variant.GAIA, Block.Properties.from(manaPylon));
|
||||
|
||||
public static final Block pistonRelay = new BlockPistonRelay(Block.Properties.create(Material.GOURD).hardnessAndResistance(2, 10).sound(SoundType.METAL).func_235827_a_(NO_SPAWN));
|
||||
public static final Block pistonRelay = new BlockPistonRelay(Block.Properties.create(Material.GOURD).hardnessAndResistance(2, 10).sound(SoundType.METAL).setPropagatesDownwards(NO_SPAWN));
|
||||
public static final Block distributor = new BlockDistributor(Block.Properties.create(Material.ROCK).hardnessAndResistance(2, 10).sound(SoundType.STONE));
|
||||
public static final Block manaVoid = new BlockManaVoid(Block.Properties.create(Material.ROCK).hardnessAndResistance(2, 2000).sound(SoundType.STONE));
|
||||
public static final Block manaDetector = new BlockManaDetector(Block.Properties.from(livingrock));
|
||||
public static final Block enchanter = new BlockEnchanter(Block.Properties.create(Material.ROCK).hardnessAndResistance(3, 5).func_235838_a_(s -> 15).sound(SoundType.STONE));
|
||||
public static final Block enchanter = new BlockEnchanter(Block.Properties.create(Material.ROCK).hardnessAndResistance(3, 5).setLightLevel(s -> 15).sound(SoundType.STONE));
|
||||
public static final Block turntable = new BlockTurntable(Block.Properties.from(livingwood));
|
||||
public static final Block tinyPlanet = new BlockTinyPlanet(Block.Properties.create(Material.ROCK).hardnessAndResistance(20, 100).sound(SoundType.STONE));
|
||||
public static final Block alchemyCatalyst = new BlockAlchemyCatalyst(Block.Properties.from(livingrock));
|
||||
@@ -128,7 +128,7 @@ public final class ModBlocks {
|
||||
public static final Block gatheringDrum = new BlockForestDrum(BlockForestDrum.Variant.GATHERING, Block.Properties.from(livingwood));
|
||||
public static final Block canopyDrum = new BlockForestDrum(BlockForestDrum.Variant.CANOPY, Block.Properties.from(livingwood));
|
||||
|
||||
public static final Block whiteShinyFlower = new BlockShinyFlower(DyeColor.WHITE, Block.Properties.from(whiteFlower).func_235838_a_(s -> 15));
|
||||
public static final Block whiteShinyFlower = new BlockShinyFlower(DyeColor.WHITE, Block.Properties.from(whiteFlower).setLightLevel(s -> 15));
|
||||
public static final Block orangeShinyFlower = new BlockShinyFlower(DyeColor.ORANGE, Block.Properties.from(whiteShinyFlower));
|
||||
public static final Block magentaShinyFlower = new BlockShinyFlower(DyeColor.MAGENTA, Block.Properties.from(whiteShinyFlower));
|
||||
public static final Block lightBlueShinyFlower = new BlockShinyFlower(DyeColor.LIGHT_BLUE, Block.Properties.from(whiteShinyFlower));
|
||||
@@ -149,7 +149,7 @@ public final class ModBlocks {
|
||||
public static final Block spectralPlatform = new BlockPlatform(BlockPlatform.Variant.SPECTRAL, Block.Properties.from(abstrusePlatform));
|
||||
public static final Block infrangiblePlatform = new BlockPlatform(BlockPlatform.Variant.INFRANGIBLE, Block.Properties.create(Material.WOOD).hardnessAndResistance(-1, Float.MAX_VALUE).sound(SoundType.WOOD));
|
||||
public static final Block alfPortal = new BlockAlfPortal(Block.Properties.create(Material.WOOD).hardnessAndResistance(10).sound(SoundType.WOOD)
|
||||
.func_235838_a_(s -> s.get(BotaniaStateProps.ALFPORTAL_STATE) != AlfPortalState.OFF ? 15 : 0));
|
||||
.setLightLevel(s -> s.get(BotaniaStateProps.ALFPORTAL_STATE) != AlfPortalState.OFF ? 15 : 0));
|
||||
public static final Block dreamwood = new BlockMod(Block.Properties.from(livingwood));
|
||||
public static final Block dreamwoodPlanks = new BlockMod(Block.Properties.from(livingwood));
|
||||
public static final Block dreamwoodPlanksMossy = new BlockMod(Block.Properties.from(livingwood));
|
||||
@@ -157,10 +157,10 @@ public final class ModBlocks {
|
||||
public static final Block dreamwoodPatternFramed = new BlockMod(Block.Properties.from(livingwood));
|
||||
public static final Block dreamwoodGlimmering = new BlockMod(Block.Properties.from(livingwoodGlimmering));
|
||||
public static final Block conjurationCatalyst = new BlockConjurationCatalyst(Block.Properties.from(livingrock));
|
||||
public static final Block bifrost = new BlockBifrost(Block.Properties.create(Material.GLASS).hardnessAndResistance(-1, 0.3F).func_235838_a_(s -> 15).sound(SoundType.GLASS).notSolid());
|
||||
public static final Block bifrost = new BlockBifrost(Block.Properties.create(Material.GLASS).hardnessAndResistance(-1, 0.3F).setLightLevel(s -> 15).sound(SoundType.GLASS).notSolid());
|
||||
public static final Block solidVines = new BlockSolidVines(Block.Properties.create(Material.TALL_PLANTS).hardnessAndResistance(0.2F).sound(SoundType.PLANT).notSolid());
|
||||
|
||||
public static final Block whiteBuriedPetals = new BlockBuriedPetals(DyeColor.WHITE, Block.Properties.from(whiteFlower).func_235838_a_(s -> 4));
|
||||
public static final Block whiteBuriedPetals = new BlockBuriedPetals(DyeColor.WHITE, Block.Properties.from(whiteFlower).setLightLevel(s -> 4));
|
||||
public static final Block orangeBuriedPetals = new BlockBuriedPetals(DyeColor.ORANGE, Block.Properties.from(whiteBuriedPetals));
|
||||
public static final Block magentaBuriedPetals = new BlockBuriedPetals(DyeColor.MAGENTA, Block.Properties.from(whiteBuriedPetals));
|
||||
public static final Block lightBlueBuriedPetals = new BlockBuriedPetals(DyeColor.LIGHT_BLUE, Block.Properties.from(whiteBuriedPetals));
|
||||
@@ -177,7 +177,7 @@ public final class ModBlocks {
|
||||
public static final Block redBuriedPetals = new BlockBuriedPetals(DyeColor.RED, Block.Properties.from(whiteBuriedPetals));
|
||||
public static final Block blackBuriedPetals = new BlockBuriedPetals(DyeColor.BLACK, Block.Properties.from(whiteBuriedPetals));
|
||||
|
||||
public static final Block whiteFloatingFlower = new BlockFloatingFlower(DyeColor.WHITE, Block.Properties.create(Material.EARTH).hardnessAndResistance(0.5F).sound(SoundType.GROUND).func_235838_a_(s -> 15));
|
||||
public static final Block whiteFloatingFlower = new BlockFloatingFlower(DyeColor.WHITE, Block.Properties.create(Material.EARTH).hardnessAndResistance(0.5F).sound(SoundType.GROUND).setLightLevel(s -> 15));
|
||||
public static final Block orangeFloatingFlower = new BlockFloatingFlower(DyeColor.ORANGE, Block.Properties.from(whiteFloatingFlower));
|
||||
public static final Block magentaFloatingFlower = new BlockFloatingFlower(DyeColor.MAGENTA, Block.Properties.from(whiteFloatingFlower));
|
||||
public static final Block lightBlueFloatingFlower = new BlockFloatingFlower(DyeColor.LIGHT_BLUE, Block.Properties.from(whiteFloatingFlower));
|
||||
@@ -216,7 +216,7 @@ public final class ModBlocks {
|
||||
public static final Block enderEye = new BlockEnderEye(Block.Properties.from(manasteelBlock));
|
||||
public static final Block starfield = new BlockStarfield(Block.Properties.create(Material.IRON).hardnessAndResistance(5, 2000).sound(SoundType.METAL));
|
||||
public static final Block rfGenerator = new BlockRFGenerator(Block.Properties.from(livingrock));
|
||||
public static final Block elfGlass = new BlockModGlass(Block.Properties.from(Blocks.GLASS).func_235838_a_(s -> 15));
|
||||
public static final Block elfGlass = new BlockModGlass(Block.Properties.from(Blocks.GLASS).setLightLevel(s -> 15));
|
||||
public static final Block brewery = new BlockBrewery(Block.Properties.from(livingrock));
|
||||
public static final Block manaGlass = new BlockModGlass(Block.Properties.from(elfGlass));
|
||||
public static final Block terraPlate = new BlockTerraPlate(Block.Properties.create(Material.IRON).hardnessAndResistance(3, 10).sound(SoundType.METAL));
|
||||
@@ -226,7 +226,7 @@ public final class ModBlocks {
|
||||
public static final Block redStringComparator = new BlockRedStringComparator(Block.Properties.from(livingrock));
|
||||
public static final Block redStringRelay = new BlockRedStringRelay(Block.Properties.from(livingrock));
|
||||
public static final Block redStringInterceptor = new BlockRedStringInterceptor(Block.Properties.from(livingrock));
|
||||
public static final Block manaFlame = new BlockManaFlame(Block.Properties.create(Material.WOOL).sound(SoundType.CLOTH).func_235838_a_(s -> 15).doesNotBlockMovement());
|
||||
public static final Block manaFlame = new BlockManaFlame(Block.Properties.create(Material.WOOL).sound(SoundType.CLOTH).setLightLevel(s -> 15).doesNotBlockMovement());
|
||||
public static final Block prism = new BlockPrism(Block.Properties.from(elfGlass).doesNotBlockMovement());
|
||||
public static final Block enchantedSoil = new BlockEnchantedSoil(Block.Properties.create(Material.ORGANIC).hardnessAndResistance(0.6F).sound(SoundType.PLANT));
|
||||
|
||||
@@ -250,7 +250,7 @@ public final class ModBlocks {
|
||||
public static final Block corporeaIndex = new BlockCorporeaIndex(Block.Properties.create(Material.IRON).hardnessAndResistance(5.5F).sound(SoundType.METAL).notSolid());
|
||||
public static final Block corporeaFunnel = new BlockCorporeaFunnel(Block.Properties.create(Material.IRON).hardnessAndResistance(5.5F).sound(SoundType.METAL));
|
||||
|
||||
public static final Block whiteMushroom = new BlockModMushroom(DyeColor.WHITE, Block.Properties.from(whiteFlower).func_235838_a_(s -> 3));
|
||||
public static final Block whiteMushroom = new BlockModMushroom(DyeColor.WHITE, Block.Properties.from(whiteFlower).setLightLevel(s -> 3));
|
||||
public static final Block orangeMushroom = new BlockModMushroom(DyeColor.ORANGE, Block.Properties.from(whiteMushroom));
|
||||
public static final Block magentaMushroom = new BlockModMushroom(DyeColor.MAGENTA, Block.Properties.from(whiteMushroom));
|
||||
public static final Block lightBlueMushroom = new BlockModMushroom(DyeColor.LIGHT_BLUE, Block.Properties.from(whiteMushroom));
|
||||
@@ -287,7 +287,7 @@ public final class ModBlocks {
|
||||
public static final Block doubleFlowerBlack = new BlockModDoubleFlower(DyeColor.BLACK, Block.Properties.from(doubleFlowerWhite));
|
||||
|
||||
public static final Block fakeAir = new BlockFakeAir(Block.Properties.create(Material.STRUCTURE_VOID).tickRandomly());
|
||||
public static final Block blazeBlock = new BlockMod(Block.Properties.from(manasteelBlock).func_235838_a_(s -> 15));
|
||||
public static final Block blazeBlock = new BlockMod(Block.Properties.from(manasteelBlock).setLightLevel(s -> 15));
|
||||
public static final Block corporeaInterceptor = new BlockCorporeaInterceptor(Block.Properties.create(Material.IRON).hardnessAndResistance(5.5F).sound(SoundType.METAL));
|
||||
public static final Block corporeaCrystalCube = new BlockCorporeaCrystalCube(Block.Properties.from(corporeaInterceptor));
|
||||
public static final Block incensePlate = new BlockIncensePlate(Block.Properties.from(livingwood));
|
||||
@@ -305,7 +305,7 @@ public final class ModBlocks {
|
||||
public static final Block manaBomb = new BlockManaBomb(Block.Properties.create(Material.WOOD).hardnessAndResistance(12).sound(SoundType.WOOD));
|
||||
public static final Block cacophonium = new BlockCacophonium(Block.Properties.create(Material.WOOD).hardnessAndResistance(0.8F));
|
||||
public static final Block bellows = new BlockBellows(Block.Properties.from(livingwood));
|
||||
public static final Block bifrostPerm = new BlockBifrostPerm(Block.Properties.create(Material.GLASS).hardnessAndResistance(0.3F).func_235838_a_(s -> 15).sound(SoundType.GLASS).notSolid());
|
||||
public static final Block bifrostPerm = new BlockBifrostPerm(Block.Properties.create(Material.GLASS).hardnessAndResistance(0.3F).setLightLevel(s -> 15).sound(SoundType.GLASS).notSolid());
|
||||
public static final Block cellBlock = new BlockCell(Block.Properties.create(Material.GOURD).sound(SoundType.CLOTH));
|
||||
public static final Block gaiaHeadWall = new BlockGaiaHeadWall(Block.Properties.create(Material.MISCELLANEOUS).hardnessAndResistance(1));
|
||||
public static final Block gaiaHead = new BlockGaiaHead(Block.Properties.create(Material.MISCELLANEOUS).hardnessAndResistance(1));
|
||||
@@ -320,7 +320,7 @@ public final class ModBlocks {
|
||||
public static final Block scorchedGrass = new BlockAltGrass(BlockAltGrass.Variant.SCORCHED, Block.Properties.from(dryGrass));
|
||||
public static final Block infusedGrass = new BlockAltGrass(BlockAltGrass.Variant.INFUSED, Block.Properties.from(dryGrass));
|
||||
public static final Block mutatedGrass = new BlockAltGrass(BlockAltGrass.Variant.MUTATED, Block.Properties.from(dryGrass));
|
||||
public static final Block animatedTorch = new BlockAnimatedTorch(Block.Properties.create(Material.MISCELLANEOUS).func_235838_a_(s -> 7).notSolid());
|
||||
public static final Block animatedTorch = new BlockAnimatedTorch(Block.Properties.create(Material.MISCELLANEOUS).setLightLevel(s -> 7).notSolid());
|
||||
|
||||
public static void registerBlocks(RegistryEvent.Register<Block> evt) {
|
||||
IForgeRegistry<Block> r = evt.getRegistry();
|
||||
|
||||
@@ -39,7 +39,7 @@ import static vazkii.botania.common.block.ModBlocks.register;
|
||||
|
||||
public class ModSubtiles {
|
||||
public static final Block pureDaisy = new BlockSpecialFlower(Block.Properties.from(Blocks.POPPY), SubTilePureDaisy::new);
|
||||
public static final Block pureDaisyFloating = new BlockFloatingSpecialFlower(Block.Properties.create(Material.EARTH).hardnessAndResistance(0.5F).sound(SoundType.GROUND).func_235838_a_(s -> 15), SubTilePureDaisy::new);
|
||||
public static final Block pureDaisyFloating = new BlockFloatingSpecialFlower(Block.Properties.create(Material.EARTH).hardnessAndResistance(0.5F).sound(SoundType.GROUND).setLightLevel(s -> 15), SubTilePureDaisy::new);
|
||||
|
||||
public static final Block manastar = new BlockSpecialFlower(Block.Properties.from(pureDaisy), SubTileManastar::new);
|
||||
public static final Block manastarFloating = new BlockFloatingSpecialFlower(Block.Properties.from(pureDaisyFloating), SubTileManastar::new);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class BlockManaFlame extends BlockMod implements ITileEntityProvider {
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (Botania.gardenOfGlassLoaded) {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if (!stack.isEmpty() && ItemTags.SAPLINGS.func_230235_a_(stack.getItem()) && !player.inventory.hasItemStack(new ItemStack(ModItems.lexicon))) {
|
||||
if (!stack.isEmpty() && ItemTags.SAPLINGS.contains(stack.getItem()) && !player.inventory.hasItemStack(new ItemStack(ModItems.lexicon))) {
|
||||
if (!world.isRemote) {
|
||||
stack.shrink(1);
|
||||
player.inventory.placeItemBackInInventory(player.world, new ItemStack(ModItems.lexicon));
|
||||
|
||||
@@ -41,14 +41,14 @@ public class BehaviourPoolMinecart extends DefaultDispenseItemBehavior {
|
||||
BlockState iblockstate = world.getBlockState(blockpos);
|
||||
RailShape railshape = iblockstate.getBlock() instanceof AbstractRailBlock ? ((AbstractRailBlock) iblockstate.getBlock()).getRailDirection(iblockstate, world, blockpos, null) : RailShape.NORTH_SOUTH;
|
||||
double d3;
|
||||
if (iblockstate.func_235714_a_(BlockTags.RAILS)) {
|
||||
if (iblockstate.isIn(BlockTags.RAILS)) {
|
||||
if (railshape.isAscending()) {
|
||||
d3 = 0.6D;
|
||||
} else {
|
||||
d3 = 0.1D;
|
||||
}
|
||||
} else {
|
||||
if (!iblockstate.isAir() || !world.getBlockState(blockpos.down()).func_235714_a_(BlockTags.RAILS)) {
|
||||
if (!iblockstate.isAir() || !world.getBlockState(blockpos.down()).isIn(BlockTags.RAILS)) {
|
||||
return this.behaviourDefaultDispenseItem.dispense(source, stack);
|
||||
}
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ public class SubTileHopperhock extends TileEntityFunctionalFlower {
|
||||
int x = mc.getMainWindow().getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(filter) / 2;
|
||||
int y = mc.getMainWindow().getScaledHeight() / 2 + 30;
|
||||
|
||||
mc.fontRenderer.func_238405_a_(ms, filter, x, y, TextFormatting.GRAY.getColor());
|
||||
mc.fontRenderer.drawStringWithShadow(ms, filter, x, y, TextFormatting.GRAY.getColor());
|
||||
RenderSystem.disableLighting();
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public class SubTileLoonuim extends TileEntityFunctionalFlower {
|
||||
Collections.shuffle(stacks);
|
||||
stack = stacks.get(0);
|
||||
}
|
||||
} while (stack.isEmpty() || ModTags.Items.LOONIUM_BLACKLIST.func_230235_a_(stack.getItem()));
|
||||
} while (stack.isEmpty() || ModTags.Items.LOONIUM_BLACKLIST.contains(stack.getItem()));
|
||||
|
||||
int bound = RANGE * 2 + 1;
|
||||
int xp = getEffectivePos().getX() - RANGE + rand.nextInt(bound);
|
||||
@@ -129,8 +129,8 @@ public class SubTileLoonuim extends TileEntityFunctionalFlower {
|
||||
entity.setPositionAndRotation(x, y, z, world.rand.nextFloat() * 360F, 0);
|
||||
entity.setMotion(Vector3d.ZERO);
|
||||
|
||||
entity.getAttribute(Attributes.field_233818_a_).func_233769_c_(new AttributeModifier("Loonium Modififer Health", 2, AttributeModifier.Operation.MULTIPLY_BASE));
|
||||
entity.getAttribute(Attributes.field_233823_f_).func_233769_c_(new AttributeModifier("Loonium Modififer Damage", 1.5, AttributeModifier.Operation.MULTIPLY_BASE));
|
||||
entity.getAttribute(Attributes.MAX_HEALTH).func_233769_c_(new AttributeModifier("Loonium Modififer Health", 2, AttributeModifier.Operation.MULTIPLY_BASE));
|
||||
entity.getAttribute(Attributes.ATTACK_DAMAGE).func_233769_c_(new AttributeModifier("Loonium Modififer Damage", 1.5, AttributeModifier.Operation.MULTIPLY_BASE));
|
||||
|
||||
entity.addPotionEffect(new EffectInstance(Effects.FIRE_RESISTANCE,
|
||||
entity instanceof CreeperEntity ? 100 : Integer.MAX_VALUE, 0));
|
||||
|
||||
@@ -85,7 +85,7 @@ public class SubTileOrechid extends TileEntityFunctionalFlower {
|
||||
List<TagRandomItem> values = map.entrySet().stream()
|
||||
.flatMap(e -> {
|
||||
ITag<Block> tag = BlockTags.getCollection().get(e.getKey());
|
||||
if (tag != null && !tag.func_230236_b_().isEmpty()) {
|
||||
if (tag != null && !tag.getAllElements().isEmpty()) {
|
||||
return Stream.of(new TagRandomItem(e.getValue(), tag));
|
||||
} else {
|
||||
return Stream.empty();
|
||||
|
||||
@@ -49,7 +49,7 @@ public class SubTileRafflowsia extends TileEntityGeneratingFlower {
|
||||
BlockPos pos = getEffectivePos().add(i - RANGE, j - RANGE, k - RANGE);
|
||||
|
||||
BlockState state = getWorld().getBlockState(pos);
|
||||
if (state.func_235714_a_(ModTags.Blocks.SPECIAL_FLOWERS) && state.getBlock() != ModSubtiles.rafflowsia) {
|
||||
if (state.isIn(ModTags.Blocks.SPECIAL_FLOWERS) && state.getBlock() != ModSubtiles.rafflowsia) {
|
||||
if (state.getBlock() == lastFlower) {
|
||||
lastFlowerTimes++;
|
||||
} else {
|
||||
|
||||
@@ -317,8 +317,8 @@ public class TileAlfPortal extends TileMod implements ITickableTileEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_230337_a_(BlockState state, CompoundNBT cmp) {
|
||||
super.func_230337_a_(state, cmp);
|
||||
public void read(BlockState state, CompoundNBT cmp) {
|
||||
super.read(state, cmp);
|
||||
|
||||
int count = cmp.getInt(TAG_STACK_COUNT);
|
||||
stacksIn.clear();
|
||||
|
||||
@@ -360,7 +360,7 @@ public class TileAltar extends TileSimpleInventory implements IPetalApothecary,
|
||||
|
||||
mc.getItemRenderer().renderItemIntoGUI(stack, xc + radius + 32, yc - 8);
|
||||
mc.getItemRenderer().renderItemIntoGUI(new ItemStack(Items.WHEAT_SEEDS), xc + radius + 16, yc + 6);
|
||||
mc.fontRenderer.func_238421_b_(ms, "+", xc + radius + 14, yc + 10, 0xFFFFFF);
|
||||
mc.fontRenderer.drawString(ms, "+", xc + radius + 14, yc + 10, 0xFFFFFF);
|
||||
});
|
||||
|
||||
for (int i = 0; i < amt; i++) {
|
||||
@@ -374,9 +374,9 @@ public class TileAltar extends TileSimpleInventory implements IPetalApothecary,
|
||||
}
|
||||
} else if (recipeKeepTicks > 0 && getFluid() == State.WATER) {
|
||||
String s = I18n.format("botaniamisc.altarRefill0");
|
||||
mc.fontRenderer.func_238421_b_(ms, s, xc - mc.fontRenderer.getStringWidth(s) / 2, yc + 10, 0xFFFFFF);
|
||||
mc.fontRenderer.drawString(ms, s, xc - mc.fontRenderer.getStringWidth(s) / 2, yc + 10, 0xFFFFFF);
|
||||
s = I18n.format("botaniamisc.altarRefill1");
|
||||
mc.fontRenderer.func_238421_b_(ms, s, xc - mc.fontRenderer.getStringWidth(s) / 2, yc + 20, 0xFFFFFF);
|
||||
mc.fontRenderer.drawString(ms, s, xc - mc.fontRenderer.getStringWidth(s) / 2, yc + 20, 0xFFFFFF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ public class TileAnimatedTorch extends TileMod implements ITickableTileEntity {
|
||||
int y = mc.getMainWindow().getScaledHeight() / 2 - 8;
|
||||
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(new ItemStack(Blocks.REDSTONE_TORCH), x, y);
|
||||
mc.fontRenderer.func_238405_a_(ms, I18n.format("botania.animatedTorch." + torchMode.name().toLowerCase()), x + 18, y + 6, 0xFF4444);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, I18n.format("botania.animatedTorch." + torchMode.name().toLowerCase()), x + 18, y + 6, 0xFF4444);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,8 +43,8 @@ public class TileBifrost extends TileMod implements ITickableTileEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_230337_a_(BlockState state, CompoundNBT tag) {
|
||||
super.func_230337_a_(state, tag);
|
||||
public void read(BlockState state, CompoundNBT tag) {
|
||||
super.read(state, tag);
|
||||
ticks = tag.getInt(TAG_TICKS);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ public class TileFakeAir extends TileMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_230337_a_(BlockState state, CompoundNBT tag) {
|
||||
super.func_230337_a_(state, tag);
|
||||
public void read(BlockState state, CompoundNBT tag) {
|
||||
super.read(state, tag);
|
||||
flowerPos = new BlockPos(
|
||||
tag.getInt(TAG_FLOWER_X),
|
||||
tag.getInt(TAG_FLOWER_Y),
|
||||
|
||||
@@ -213,7 +213,7 @@ public class TileHourglass extends TileExposedSimpleInventory implements ITickab
|
||||
|
||||
int time = getTotalTime();
|
||||
String timeStr = StringUtils.ticksToElapsedTime(time);
|
||||
mc.fontRenderer.func_238405_a_(ms, timeStr, x + 20, y, getColor());
|
||||
mc.fontRenderer.drawStringWithShadow(ms, timeStr, x + 20, y, getColor());
|
||||
|
||||
String status = "";
|
||||
if (lock) {
|
||||
@@ -223,7 +223,7 @@ public class TileHourglass extends TileExposedSimpleInventory implements ITickab
|
||||
status = status.isEmpty() ? "stopped" : "lockedStopped";
|
||||
}
|
||||
if (!status.isEmpty()) {
|
||||
mc.fontRenderer.func_238405_a_(ms, I18n.format("botaniamisc." + status), x + 20, y + 12, getColor());
|
||||
mc.fontRenderer.drawStringWithShadow(ms, I18n.format("botaniamisc." + status), x + 20, y + 12, getColor());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ public class TileMod extends TileEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_230337_a_(BlockState state, CompoundNBT tag) {
|
||||
super.func_230337_a_(state, tag);
|
||||
public void read(BlockState state, CompoundNBT tag) {
|
||||
super.read(state, tag);
|
||||
readPacketNBT(tag);
|
||||
}
|
||||
|
||||
|
||||
@@ -393,7 +393,7 @@ public class TileRuneAltar extends TileSimpleInventory implements IManaReceiver,
|
||||
RenderHelper.renderProgressPie(ms, xc + radius + 32, yc - 8, progress, recipe.getCraftingResult(getItemHandler()));
|
||||
|
||||
if (progress == 1F) {
|
||||
mc.fontRenderer.func_238421_b_(ms, "+", xc + radius + 14, yc + 12, 0xFFFFFF);
|
||||
mc.fontRenderer.drawString(ms, "+", xc + radius + 14, yc + 12, 0xFFFFFF);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -409,9 +409,9 @@ public class TileRuneAltar extends TileSimpleInventory implements IManaReceiver,
|
||||
}
|
||||
} else if (recipeKeepTicks > 0) {
|
||||
String s = I18n.format("botaniamisc.altarRefill0");
|
||||
mc.fontRenderer.func_238405_a_(ms, s, xc - mc.fontRenderer.getStringWidth(s) / 2, yc + 10, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, s, xc - mc.fontRenderer.getStringWidth(s) / 2, yc + 10, 0xFFFFFF);
|
||||
s = I18n.format("botaniamisc.altarRefill1");
|
||||
mc.fontRenderer.func_238405_a_(ms, s, xc - mc.fontRenderer.getStringWidth(s) / 2, yc + 20, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, s, xc - mc.fontRenderer.getStringWidth(s) / 2, yc + 20, 0xFFFFFF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class TileTinyPotato extends TileExposedSimpleInventory implements ITicka
|
||||
for (int i = 0; i < inventorySize(); i++) {
|
||||
ItemStack stackAt = getItemHandler().getStackInSlot(i);
|
||||
if (!stackAt.isEmpty() && stackAt.getItem() == ModBlocks.tinyPotato.asItem()) {
|
||||
player.sendMessage(new StringTextComponent("Don't talk to me or my son ever again."), Util.field_240973_b_);
|
||||
player.sendMessage(new StringTextComponent("Don't talk to me or my son ever again."), Util.DUMMY_UUID);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@ public class TileCorporeaIndex extends TileCorporeaBase implements ICorporeaRequ
|
||||
if (!MinecraftForge.EVENT_BUS.post(indexReqEvent)) {
|
||||
ICorporeaResult res = this.doRequest(request, count, this.getSpark());
|
||||
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.requestMsg", count, request.getRequestName(), res.getMatchedCount(), res.getExtractedCount()).func_240699_a_(TextFormatting.LIGHT_PURPLE), Util.field_240973_b_);
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.requestMsg", count, request.getRequestName(), res.getMatchedCount(), res.getExtractedCount()).func_240699_a_(TextFormatting.LIGHT_PURPLE), Util.DUMMY_UUID);
|
||||
CorporeaRequestTrigger.INSTANCE.trigger(player, player.getServerWorld(), this.getPos(), res.getExtractedCount());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -552,7 +552,7 @@ public class TileSpreader extends TileExposedSimpleInventory implements IManaCol
|
||||
int x = mc.getMainWindow().getScaledWidth() / 2 - width;
|
||||
int y = mc.getMainWindow().getScaledHeight() / 2 + 50;
|
||||
|
||||
mc.fontRenderer.func_238405_a_(ms, lensName, x + 20, y + 5, color);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, lensName, x + 20, y + 5, color);
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(lens, x, y);
|
||||
RenderSystem.disableLighting();
|
||||
}
|
||||
@@ -566,7 +566,7 @@ public class TileSpreader extends TileExposedSimpleInventory implements IManaCol
|
||||
int x = mc.getMainWindow().getScaledWidth() / 2 - width;
|
||||
int y = mc.getMainWindow().getScaledHeight() / 2 + 30;
|
||||
|
||||
mc.fontRenderer.func_238405_a_(ms, stackName, x + 20, y + 5, color);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, stackName, x + 20, y + 5, color);
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(recieverStack, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public class TileTurntable extends TileMod implements ITickableTileEntity {
|
||||
|
||||
int x = mc.getMainWindow().getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(speed) / 2;
|
||||
int y = mc.getMainWindow().getScaledHeight() / 2 - 15;
|
||||
mc.fontRenderer.func_238405_a_(ms, speed, x, y, color);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, speed, x, y, color);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -693,7 +693,7 @@ public final class BotaniaCreativeTab extends ItemGroup {
|
||||
}
|
||||
|
||||
private void addTag(ResourceLocation tagId) {
|
||||
ItemTags.getCollection().getOrCreate(tagId).func_230236_b_().stream()
|
||||
ItemTags.getCollection().getOrCreate(tagId).getAllElements().stream()
|
||||
.sorted(Comparator.comparing(Registry.ITEM::getKey))
|
||||
.forEach(this::addItem);
|
||||
}
|
||||
|
||||
@@ -101,11 +101,11 @@ public abstract class EquipmentHandler {
|
||||
|
||||
if (!ItemStack.areItemStacksEqual(old, current)) {
|
||||
if (old.getItem() instanceof ItemBauble) {
|
||||
player.func_233645_dx_().func_233785_a_(((ItemBauble) old.getItem()).getEquippedAttributeModifiers(old));
|
||||
player.getAttributeManager().func_233785_a_(((ItemBauble) old.getItem()).getEquippedAttributeModifiers(old));
|
||||
((ItemBauble) old.getItem()).onUnequipped(old, player);
|
||||
}
|
||||
if (canEquip(current, player)) {
|
||||
player.func_233645_dx_().func_233793_b_(((ItemBauble) old.getItem()).getEquippedAttributeModifiers(old));
|
||||
player.getAttributeManager().func_233793_b_(((ItemBauble) old.getItem()).getEquippedAttributeModifiers(old));
|
||||
((ItemBauble) current.getItem()).onEquipped(current, player);
|
||||
}
|
||||
oldStacks[i] = current.copy(); // shift-clicking mutates the stack we stored,
|
||||
|
||||
@@ -35,14 +35,14 @@ public class StateIngredientTag extends StateIngredientBlocks {
|
||||
|
||||
@Override
|
||||
public boolean test(BlockState state) {
|
||||
return tag.func_230235_a_(state.getBlock());
|
||||
return tag.contains(state.getBlock());
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonObject serialize() {
|
||||
JsonObject object = new JsonObject();
|
||||
object.addProperty("type", "tag");
|
||||
object.addProperty("tag", tag.func_230234_a_().toString());
|
||||
object.addProperty("tag", tag.getName().toString());
|
||||
return object;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class StateIngredientTag extends StateIngredientBlocks {
|
||||
|
||||
@Override
|
||||
public List<BlockState> getDisplayed() {
|
||||
return tag.func_230236_b_().stream().map(Block::getDefaultState).collect(Collectors.toList());
|
||||
return tag.getAllElements().stream().map(Block::getDefaultState).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public class BannerRecipe extends SpecialRecipe {
|
||||
|
||||
if (ModBanners.PATTERNS.containsKey(item.delegate) && !foundItem) {
|
||||
foundItem = true;
|
||||
} else if (ItemTags.BANNERS.func_230235_a_(item) && !foundBanner && BannerTileEntity.getPatterns(stack) < 6) {
|
||||
} else if (ItemTags.BANNERS.contains(item) && !foundBanner && BannerTileEntity.getPatterns(stack) < 6) {
|
||||
foundBanner = true;
|
||||
} else if (item instanceof DyeItem && !foundDye) {
|
||||
foundDye = true;
|
||||
@@ -73,7 +73,7 @@ public class BannerRecipe extends SpecialRecipe {
|
||||
Item item = stack.getItem();
|
||||
if (ModBanners.PATTERNS.containsKey(item.delegate)) {
|
||||
pattern = ModBanners.PATTERNS.get(item.delegate);
|
||||
} else if (ItemTags.BANNERS.func_230235_a_(item)) {
|
||||
} else if (ItemTags.BANNERS.contains(item)) {
|
||||
banner = stack;
|
||||
} else if (item instanceof DyeItem) {
|
||||
dye = stack;
|
||||
|
||||
@@ -157,7 +157,7 @@ public class EntityDoppleganger extends MobEntity implements IEntityAdditionalSp
|
||||
//check difficulty
|
||||
if (world.getDifficulty() == Difficulty.PEACEFUL) {
|
||||
if (!world.isRemote) {
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.peacefulNoob").func_240699_a_(TextFormatting.RED), Util.field_240973_b_);
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.peacefulNoob").func_240699_a_(TextFormatting.RED), Util.DUMMY_UUID);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -168,7 +168,7 @@ public class EntityDoppleganger extends MobEntity implements IEntityAdditionalSp
|
||||
if (world.isRemote) {
|
||||
warnInvalidBlocks(world, invalidPylonBlocks);
|
||||
} else {
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.needsCatalysts").func_240699_a_(TextFormatting.RED), Util.field_240973_b_);
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.needsCatalysts").func_240699_a_(TextFormatting.RED), Util.DUMMY_UUID);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -183,7 +183,7 @@ public class EntityDoppleganger extends MobEntity implements IEntityAdditionalSp
|
||||
PacketHandler.sendTo((ServerPlayerEntity) player,
|
||||
new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.ARENA_INDICATOR, pos.getX(), pos.getY(), pos.getZ()));
|
||||
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.badArena").func_240699_a_(TextFormatting.RED), Util.field_240973_b_);
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.badArena").func_240699_a_(TextFormatting.RED), Util.DUMMY_UUID);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -203,9 +203,9 @@ public class EntityDoppleganger extends MobEntity implements IEntityAdditionalSp
|
||||
|
||||
int playerCount = e.getPlayersAround().size();
|
||||
e.playerCount = playerCount;
|
||||
e.getAttribute(Attributes.field_233818_a_).setBaseValue(MAX_HP * playerCount);
|
||||
e.getAttribute(Attributes.MAX_HEALTH).setBaseValue(MAX_HP * playerCount);
|
||||
if (hard) {
|
||||
e.getAttribute(Attributes.field_233826_i_).setBaseValue(15);
|
||||
e.getAttribute(Attributes.ARMOR).setBaseValue(15);
|
||||
}
|
||||
|
||||
e.playSound(SoundEvents.ENTITY_ENDER_DRAGON_GROWL, 10F, 0.1F);
|
||||
@@ -266,7 +266,7 @@ public class EntityDoppleganger extends MobEntity implements IEntityAdditionalSp
|
||||
trippedPositions.add(pos.down());
|
||||
}
|
||||
|
||||
if (!allowBlockHere && isBlockHere && !BLACKLIST.func_230235_a_(state.getBlock())) //ceiling is obstructed in this column
|
||||
if (!allowBlockHere && isBlockHere && !BLACKLIST.contains(state.getBlock())) //ceiling is obstructed in this column
|
||||
{
|
||||
trippedPositions.add(pos);
|
||||
}
|
||||
@@ -554,7 +554,7 @@ public class EntityDoppleganger extends MobEntity implements IEntityAdditionalSp
|
||||
world.destroyBlock(pos, true);
|
||||
} else {
|
||||
//don't break blacklisted blocks
|
||||
if (BLACKLIST.func_230235_a_(block)) {
|
||||
if (BLACKLIST.contains(block)) {
|
||||
continue;
|
||||
}
|
||||
//don't break the floor
|
||||
@@ -945,7 +945,7 @@ public class EntityDoppleganger extends MobEntity implements IEntityAdditionalSp
|
||||
ItemStack stack = new ItemStack(Items.PLAYER_HEAD);
|
||||
mc.getItemRenderer().renderItemIntoGUI(stack, px, py);
|
||||
|
||||
mc.fontRenderer.func_238405_a_(ms, Integer.toString(playerCount), px + 15, py + 4, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, Integer.toString(playerCount), px + 15, py + 4, 0xFFFFFF);
|
||||
ms.pop();
|
||||
|
||||
return 5;
|
||||
|
||||
@@ -278,7 +278,7 @@ public class ItemAstrolabe extends Item {
|
||||
|
||||
tip.add(new StringTextComponent(size + " x " + size));
|
||||
if (block != Blocks.AIR) {
|
||||
tip.add(new ItemStack(block).getDisplayName().func_230531_f_().func_240699_a_(TextFormatting.GRAY));
|
||||
tip.add(new ItemStack(block).getDisplayName().copyRaw().func_240699_a_(TextFormatting.GRAY));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -175,11 +175,11 @@ public class ItemBlackHoleTalisman extends Item implements IBlockProvider {
|
||||
public ITextComponent getDisplayName(@Nonnull ItemStack stack) {
|
||||
Block block = getBlock(stack);
|
||||
ItemStack bstack = new ItemStack(block);
|
||||
IFormattableTextComponent cand = super.getDisplayName(stack).func_230532_e_();
|
||||
IFormattableTextComponent cand = super.getDisplayName(stack).deepCopy();
|
||||
|
||||
if (!bstack.isEmpty()) {
|
||||
cand.func_240702_b_(" (");
|
||||
cand.func_230529_a_(bstack.getDisplayName().func_230532_e_().func_240699_a_(TextFormatting.GREEN));
|
||||
cand.func_230529_a_(bstack.getDisplayName().deepCopy().func_240699_a_(TextFormatting.GREEN));
|
||||
cand.func_240702_b_(")");
|
||||
}
|
||||
|
||||
|
||||
@@ -538,11 +538,11 @@ public class ItemCraftingHalo extends Item {
|
||||
int x = mc.getMainWindow().getScaledWidth() / 2 - l / 2;
|
||||
int y = mc.getMainWindow().getScaledHeight() / 2 - 65;
|
||||
|
||||
AbstractGui.func_238467_a_(ms, x - 6, y - 6, x + l + 6, y + 37, 0x22000000);
|
||||
AbstractGui.func_238467_a_(ms, x - 4, y - 4, x + l + 4, y + 35, 0x22000000);
|
||||
AbstractGui.fill(ms, x - 6, y - 6, x + l + 6, y + 37, 0x22000000);
|
||||
AbstractGui.fill(ms, x - 4, y - 4, x + l + 4, y + 35, 0x22000000);
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(craftingTable, mc.getMainWindow().getScaledWidth() / 2 - 8, mc.getMainWindow().getScaledHeight() / 2 - 52);
|
||||
|
||||
mc.fontRenderer.func_238405_a_(ms, name, x, y, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, name, x, y, 0xFFFFFF);
|
||||
} else {
|
||||
ItemStack[] recipe = getCraftingItems(stack, slot);
|
||||
ITextComponent label = new TranslationTextComponent("botaniamisc.unsetRecipe");
|
||||
@@ -567,18 +567,18 @@ public class ItemCraftingHalo extends Item {
|
||||
int x = mc.getMainWindow().getScaledWidth() / 2 - 45;
|
||||
int y = mc.getMainWindow().getScaledHeight() / 2 - 90;
|
||||
|
||||
AbstractGui.func_238467_a_(ms, x - 6, y - 6, x + 90 + 6, y + 60, 0x22000000);
|
||||
AbstractGui.func_238467_a_(ms, x - 4, y - 4, x + 90 + 4, y + 58, 0x22000000);
|
||||
AbstractGui.fill(ms, x - 6, y - 6, x + 90 + 6, y + 60, 0x22000000);
|
||||
AbstractGui.fill(ms, x - 4, y - 4, x + 90 + 4, y + 58, 0x22000000);
|
||||
|
||||
AbstractGui.func_238467_a_(ms, x + 66, y + 14, x + 92, y + 40, 0x22000000);
|
||||
AbstractGui.func_238467_a_(ms, x - 2, y - 2, x + 56, y + 56, 0x22000000);
|
||||
AbstractGui.fill(ms, x + 66, y + 14, x + 92, y + 40, 0x22000000);
|
||||
AbstractGui.fill(ms, x - 2, y - 2, x + 56, y + 56, 0x22000000);
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
ItemStack stack = recipe[i];
|
||||
if (!stack.isEmpty()) {
|
||||
int xpos = x + i % 3 * 18;
|
||||
int ypos = y + i / 3 * 18;
|
||||
AbstractGui.func_238467_a_(ms, xpos, ypos, xpos + 16, ypos + 16, 0x22000000);
|
||||
AbstractGui.fill(ms, xpos, ypos, xpos + 16, ypos + 16, 0x22000000);
|
||||
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(stack, xpos, ypos);
|
||||
}
|
||||
@@ -592,7 +592,7 @@ public class ItemCraftingHalo extends Item {
|
||||
int yoff = 110;
|
||||
if (setRecipe && !canCraft(recipe, getFakeInv(player))) {
|
||||
String warning = TextFormatting.RED + I18n.format("botaniamisc.cantCraft");
|
||||
mc.fontRenderer.func_238405_a_(ms, warning, mc.getMainWindow().getScaledWidth() / 2.0F - mc.fontRenderer.getStringWidth(warning) / 2.0F, mc.getMainWindow().getScaledHeight() / 2.0F - yoff, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, warning, mc.getMainWindow().getScaledWidth() / 2.0F - mc.fontRenderer.getStringWidth(warning) / 2.0F, mc.getMainWindow().getScaledHeight() / 2.0F - yoff, 0xFFFFFF);
|
||||
yoff += 12;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ public class ItemHorn extends Item {
|
||||
if (block instanceof IHornHarvestable
|
||||
? ((IHornHarvestable) block).canHornHarvest(world, pos, stack, type)
|
||||
: type == EnumHornType.WILD && block instanceof BushBlock && !block.isIn(ModTags.Blocks.SPECIAL_FLOWERS)
|
||||
|| type == EnumHornType.CANOPY && BlockTags.LEAVES.func_230235_a_(block)
|
||||
|| type == EnumHornType.CANOPY && BlockTags.LEAVES.contains(block)
|
||||
|| type == EnumHornType.COVERING && block == Blocks.SNOW) {
|
||||
coords.add(pos.toImmutable());
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ public class ItemLaputaShard extends Item implements ILensEffect, ITinyPlanetExc
|
||||
TileEntity tile = null;
|
||||
CompoundNBT tilecmp = ItemNBTHelper.getCompound(lens, TAG_TILE, false);
|
||||
if (tilecmp.contains("id")) {
|
||||
tile = TileEntity.func_235657_b_(state, tilecmp);
|
||||
tile = TileEntity.readTileEntity(state, tilecmp);
|
||||
}
|
||||
|
||||
entity.world.setBlockState(pos, state);
|
||||
|
||||
@@ -64,7 +64,7 @@ public class ItemLexicon extends Item implements IElvenItem {
|
||||
super.addInformation(stack, worldIn, tooltip, flagIn);
|
||||
|
||||
TooltipHandler.addOnShift(tooltip, () -> {
|
||||
tooltip.add(getEdition().func_230532_e_().func_240699_a_(TextFormatting.GRAY));
|
||||
tooltip.add(getEdition().deepCopy().func_240699_a_(TextFormatting.GRAY));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ public class ItemManaGun extends Item implements IManaUsingItem {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flags) {
|
||||
boolean clip = hasClip(stack);
|
||||
if (clip && !Screen.func_231173_s_()) {
|
||||
if (clip && !Screen.hasShiftDown()) {
|
||||
tooltip.add(TooltipHandler.getShiftInfoTooltip());
|
||||
return;
|
||||
}
|
||||
@@ -207,10 +207,10 @@ public class ItemManaGun extends Item implements IManaUsingItem {
|
||||
@Override
|
||||
public ITextComponent getDisplayName(@Nonnull ItemStack stack) {
|
||||
ItemStack lens = getLens(stack);
|
||||
IFormattableTextComponent cmp = super.getDisplayName(stack).func_230532_e_();
|
||||
IFormattableTextComponent cmp = super.getDisplayName(stack).deepCopy();
|
||||
if (!lens.isEmpty()) {
|
||||
cmp.func_240702_b_(" (");
|
||||
cmp.func_230529_a_(lens.getDisplayName().func_230532_e_().func_240699_a_(TextFormatting.GREEN));
|
||||
cmp.func_230529_a_(lens.getDisplayName().deepCopy().func_240699_a_(TextFormatting.GREEN));
|
||||
cmp.func_240702_b_(")");
|
||||
}
|
||||
return cmp;
|
||||
|
||||
@@ -155,7 +155,7 @@ public class ItemManaMirror extends Item implements IManaItem, ICoordBoundItem,
|
||||
}
|
||||
|
||||
ResourceLocation dim = new ResourceLocation(getDimension(stack));
|
||||
RegistryKey<World> type = RegistryKey.func_240903_a_(Registry.field_239699_ae_, dim);
|
||||
RegistryKey<World> type = RegistryKey.func_240903_a_(Registry.WORLD_KEY, dim);
|
||||
World world = server.getWorld(type);
|
||||
if (world != null) {
|
||||
TileEntity tile = world.getTileEntity(coords);
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ItemPoolMinecart extends Item {
|
||||
World world = context.getWorld();
|
||||
BlockPos blockpos = context.getPos();
|
||||
BlockState iblockstate = world.getBlockState(blockpos);
|
||||
if (!iblockstate.func_235714_a_(BlockTags.RAILS)) {
|
||||
if (!iblockstate.isIn(BlockTags.RAILS)) {
|
||||
return ActionResultType.FAIL;
|
||||
} else {
|
||||
ItemStack itemstack = context.getItem();
|
||||
|
||||
@@ -200,7 +200,7 @@ public class ItemSextant extends Item {
|
||||
s = TextFormatting.RED + s;
|
||||
}
|
||||
|
||||
font.func_238405_a_(ms, s, x - font.getStringWidth(s) / 2, y - 4, 0xFFFFFF);
|
||||
font.drawStringWithShadow(ms, s, x - font.getStringWidth(s) / 2, y - 4, 0xFFFFFF);
|
||||
|
||||
if (inRange) {
|
||||
radius += 4;
|
||||
|
||||
@@ -107,7 +107,7 @@ public class ItemSpawnerMover extends Item {
|
||||
spawnerTag.putInt("x", pos.getX());
|
||||
spawnerTag.putInt("y", pos.getY());
|
||||
spawnerTag.putInt("z", pos.getZ());
|
||||
te.func_230337_a_(world.getBlockState(pos), spawnerTag);
|
||||
te.read(world.getBlockState(pos), spawnerTag);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < 100; i++) {
|
||||
|
||||
@@ -354,7 +354,7 @@ public class ItemTwigWand extends Item implements ICoordBoundItem {
|
||||
ITextComponent mode = new StringTextComponent(" (")
|
||||
.func_230529_a_(new TranslationTextComponent(getModeString(stack)).func_240699_a_(TextFormatting.DARK_GREEN))
|
||||
.func_240702_b_(")");
|
||||
return displayName.func_230532_e_().func_230529_a_(mode);
|
||||
return displayName.deepCopy().func_230529_a_(mode);
|
||||
}
|
||||
|
||||
public static ItemStack forColors(int color1, int color2) {
|
||||
|
||||
@@ -73,16 +73,16 @@ public class ItemVirus extends Item {
|
||||
newHorse.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElseThrow(NullPointerException::new).insertItem(0, saddle, false);
|
||||
}
|
||||
|
||||
ModifiableAttributeInstance movementSpeed = newHorse.getAttribute(Attributes.field_233821_d_);
|
||||
movementSpeed.setBaseValue(horse.getAttribute(Attributes.field_233821_d_).getBaseValue());
|
||||
ModifiableAttributeInstance movementSpeed = newHorse.getAttribute(Attributes.MOVEMENT_SPEED);
|
||||
movementSpeed.setBaseValue(horse.getAttribute(Attributes.MOVEMENT_SPEED).getBaseValue());
|
||||
movementSpeed.func_233769_c_(new AttributeModifier("Ermergerd Virus D:", movementSpeed.getBaseValue(), AttributeModifier.Operation.ADDITION));
|
||||
|
||||
ModifiableAttributeInstance health = newHorse.getAttribute(Attributes.field_233818_a_);
|
||||
health.setBaseValue(horse.getAttribute(Attributes.field_233818_a_).getBaseValue());
|
||||
ModifiableAttributeInstance health = newHorse.getAttribute(Attributes.MAX_HEALTH);
|
||||
health.setBaseValue(horse.getAttribute(Attributes.MAX_HEALTH).getBaseValue());
|
||||
health.func_233769_c_(new AttributeModifier("Ermergerd Virus D:", health.getBaseValue(), AttributeModifier.Operation.ADDITION));
|
||||
|
||||
ModifiableAttributeInstance jumpHeight = newHorse.getAttribute(Attributes.field_233830_m_);
|
||||
jumpHeight.setBaseValue(horse.getAttribute(Attributes.field_233830_m_).getBaseValue());
|
||||
ModifiableAttributeInstance jumpHeight = newHorse.getAttribute(Attributes.HORSE_JUMP_STRENGTH);
|
||||
jumpHeight.setBaseValue(horse.getAttribute(Attributes.HORSE_JUMP_STRENGTH).getBaseValue());
|
||||
jumpHeight.func_233769_c_(new AttributeModifier("Ermergerd Virus D:", jumpHeight.getBaseValue() * 0.5, AttributeModifier.Operation.ADDITION));
|
||||
|
||||
newHorse.playSound(SoundEvents.ENTITY_ZOMBIE_VILLAGER_CURE, 1.0F + living.world.rand.nextFloat(), living.world.rand.nextFloat() * 0.7F + 1.3F);
|
||||
|
||||
@@ -48,11 +48,11 @@ public class ItemBlockSpecialFlower extends BlockItem {
|
||||
// Prevent crash when tooltips queried before configs load
|
||||
if (Botania.finishedLoading) {
|
||||
if (world != null) {
|
||||
if (GENERATING.func_230235_a_(this)) {
|
||||
if (GENERATING.contains(this)) {
|
||||
tooltip.add(new TranslationTextComponent("botania.flowerType.generating").func_240701_a_(TextFormatting.ITALIC, TextFormatting.BLUE));
|
||||
} else if (FUNCTIONAL.func_230235_a_(this)) {
|
||||
} else if (FUNCTIONAL.contains(this)) {
|
||||
tooltip.add(new TranslationTextComponent("botania.flowerType.functional").func_240701_a_(TextFormatting.ITALIC, TextFormatting.BLUE));
|
||||
} else if (MISC.func_230235_a_(this)) {
|
||||
} else if (MISC.contains(this)) {
|
||||
tooltip.add(new TranslationTextComponent("botania.flowerType.misc").func_240701_a_(TextFormatting.ITALIC, TextFormatting.BLUE));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ItemBlockTinyPotato extends BlockItem {
|
||||
PlayerEntity player = (PlayerEntity) e;
|
||||
int ticks = ItemNBTHelper.getInt(stack, TAG_TICKS, 0);
|
||||
if (ticks < NOT_MY_NAME.length) {
|
||||
player.sendMessage(new StringTextComponent(NOT_MY_NAME[ticks]).func_240699_a_(TextFormatting.RED), Util.field_240973_b_);
|
||||
player.sendMessage(new StringTextComponent(NOT_MY_NAME[ticks]).func_240699_a_(TextFormatting.RED), Util.DUMMY_UUID);
|
||||
ItemNBTHelper.setInt(stack, TAG_TICKS, ticks + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ public class ItemBrewBase extends Item implements IBrewItem {
|
||||
}
|
||||
|
||||
if (!list1.isEmpty()) {
|
||||
lores.add(StringTextComponent.field_240750_d_);
|
||||
lores.add(StringTextComponent.EMPTY);
|
||||
lores.add((new TranslationTextComponent("potion.whenDrank")).func_240699_a_(TextFormatting.DARK_PURPLE));
|
||||
|
||||
for (Pair<Attribute, AttributeModifier> pair : list1) {
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ public class ItemTerrasteelArmor extends ItemManasteelArmor {
|
||||
if (slot == getEquipmentSlot()) {
|
||||
ret = HashMultimap.create(ret);
|
||||
int reduction = material.getDamageReductionAmount(slot);
|
||||
ret.put(Attributes.field_233820_c_,
|
||||
ret.put(Attributes.KNOCKBACK_RESISTANCE,
|
||||
new AttributeModifier(uuid, "Terrasteel modifier " + type, (double) reduction / 20, AttributeModifier.Operation.ADDITION));
|
||||
}
|
||||
return ret;
|
||||
|
||||
@@ -129,8 +129,8 @@ public class ItemDodgeRing extends ItemBauble {
|
||||
int width = Math.min((int) ((cd - pticks) * 2), 40);
|
||||
RenderSystem.color4f(1F, 1F, 1F, 1F);
|
||||
if (width > 0) {
|
||||
AbstractGui.func_238467_a_(ms, xo, y - 2, xo + 40, y - 1, 0x88000000);
|
||||
AbstractGui.func_238467_a_(ms, xo, y - 2, xo + width, y - 1, 0xFFFFFFFF);
|
||||
AbstractGui.fill(ms, xo, y - 2, xo + 40, y - 1, 0x88000000);
|
||||
AbstractGui.fill(ms, xo, y - 2, xo + width, y - 1, 0xFFFFFFFF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -480,14 +480,14 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem {
|
||||
int width = ItemNBTHelper.getInt(stack, TAG_DASH_COOLDOWN, 0);
|
||||
RenderSystem.color4f(1F, 1F, 1F, 1F);
|
||||
if (width > 0) {
|
||||
AbstractGui.func_238467_a_(ms, xo, y - 2, xo + 80, y - 1, 0x88000000);
|
||||
AbstractGui.fill(ms, xo, y - 2, xo + 80, y - 1, 0x88000000);
|
||||
}
|
||||
AbstractGui.func_238467_a_(ms, xo, y - 2, xo + width, y - 1, 0xFFFFFFFF);
|
||||
AbstractGui.fill(ms, xo, y - 2, xo + width, y - 1, 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
RenderSystem.enableAlphaTest();
|
||||
RenderSystem.color4f(1F, 1F, 1F, 1F);
|
||||
mc.textureManager.bindTexture(AbstractGui.field_230665_h_);
|
||||
mc.textureManager.bindTexture(AbstractGui.GUI_ICONS_LOCATION);
|
||||
}
|
||||
|
||||
public static int getVariant(ItemStack stack) {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ItemKnockbackBelt extends ItemBauble {
|
||||
@Override
|
||||
public Multimap<Attribute, AttributeModifier> getEquippedAttributeModifiers(ItemStack stack) {
|
||||
Multimap<Attribute, AttributeModifier> attributes = HashMultimap.create();
|
||||
attributes.put(Attributes.field_233820_c_, new AttributeModifier(getBaubleUUID(stack), "Knockback Belt", 1, AttributeModifier.Operation.ADDITION));
|
||||
attributes.put(Attributes.KNOCKBACK_RESISTANCE, new AttributeModifier(getBaubleUUID(stack), "Knockback Belt", 1, AttributeModifier.Operation.ADDITION));
|
||||
return attributes;
|
||||
}
|
||||
|
||||
|
||||
@@ -107,17 +107,17 @@ public class ItemMagnetRing extends ItemBauble {
|
||||
}
|
||||
|
||||
ItemStack stack = item.getItem();
|
||||
if (stack.isEmpty() || stack.getItem() instanceof IManaItem || stack.getItem() instanceof IRelic || ModTags.Items.MAGNET_RING_BLACKLIST.func_230235_a_(stack.getItem())) {
|
||||
if (stack.isEmpty() || stack.getItem() instanceof IManaItem || stack.getItem() instanceof IRelic || ModTags.Items.MAGNET_RING_BLACKLIST.contains(stack.getItem())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
BlockPos pos = item.func_233580_cy_();
|
||||
|
||||
if (ModTags.Blocks.MAGNET_RING_BLACKLIST.func_230235_a_(item.world.getBlockState(pos).getBlock())) {
|
||||
if (ModTags.Blocks.MAGNET_RING_BLACKLIST.contains(item.world.getBlockState(pos).getBlock())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ModTags.Blocks.MAGNET_RING_BLACKLIST.func_230235_a_(item.world.getBlockState(pos.down()).getBlock())) {
|
||||
if (ModTags.Blocks.MAGNET_RING_BLACKLIST.contains(item.world.getBlockState(pos.down()).getBlock())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ public class ItemMonocle extends ItemBauble implements IBurstViewerBauble, ICosm
|
||||
|
||||
mc.getItemRenderer().renderItemAndEffectIntoGUI(dispStack, x, y);
|
||||
|
||||
mc.fontRenderer.func_238405_a_(ms, text, x + 20, y + 4, 0xFFFFFF);
|
||||
mc.fontRenderer.drawStringWithShadow(ms, text, x + 20, y + 4, 0xFFFFFF);
|
||||
}
|
||||
|
||||
public static boolean hasMonocle(PlayerEntity player) {
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ItemGlassPick extends ItemManasteelPick {
|
||||
@Override
|
||||
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, PlayerEntity player) {
|
||||
BlockState state = player.world.getBlockState(pos);
|
||||
boolean isGlass = state.getMaterial() == Material.GLASS || Tags.Blocks.GLASS.func_230235_a_(state.getBlock());
|
||||
boolean isGlass = state.getMaterial() == Material.GLASS || Tags.Blocks.GLASS.contains(state.getBlock());
|
||||
boolean hasSilk = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) > 0;
|
||||
if (hasSilk || !isGlass) {
|
||||
return super.onBlockStartBreak(itemstack, pos, player);
|
||||
|
||||
+3
-3
@@ -34,7 +34,7 @@ public class ItemElementiumPick extends ItemManasteelPick {
|
||||
}
|
||||
|
||||
public static boolean isDisposable(Block block) {
|
||||
return ModTags.Items.DISPOSABLE.func_230235_a_(block.asItem());
|
||||
return ModTags.Items.DISPOSABLE.contains(block.asItem());
|
||||
}
|
||||
|
||||
private static boolean isDisposable(ItemStack stack) {
|
||||
@@ -42,10 +42,10 @@ public class ItemElementiumPick extends ItemManasteelPick {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ModTags.Items.DISPOSABLE.func_230235_a_(stack.getItem());
|
||||
return ModTags.Items.DISPOSABLE.contains(stack.getItem());
|
||||
}
|
||||
|
||||
private static boolean isSemiDisposable(ItemStack stack) {
|
||||
return ModTags.Items.SEMI_DISPOSABLE.func_230235_a_(stack.getItem());
|
||||
return ModTags.Items.SEMI_DISPOSABLE.contains(stack.getItem());
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -278,8 +278,8 @@ public class ItemTerraAxe extends ItemManasteelAxe implements ISequentialBreaker
|
||||
for (BlockPos adj : adjacent(cand.coordinates)) {
|
||||
Block block = world.getBlockState(adj).getBlock();
|
||||
|
||||
boolean isWood = BlockTags.LOGS.func_230235_a_(block);
|
||||
boolean isLeaf = BlockTags.LEAVES.func_230235_a_(block);
|
||||
boolean isWood = BlockTags.LOGS.contains(block);
|
||||
boolean isLeaf = BlockTags.LEAVES.contains(block);
|
||||
|
||||
// If it's not wood or a leaf, we aren't interested.
|
||||
if (!isWood && !isLeaf) {
|
||||
|
||||
@@ -63,12 +63,12 @@ public class ItemDice extends ItemRelic {
|
||||
}
|
||||
|
||||
if (possible.isEmpty()) {
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.dudDiceRoll", world.rand.nextInt(6) + 1).func_240699_a_(TextFormatting.DARK_GREEN), Util.field_240973_b_);
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.dudDiceRoll", world.rand.nextInt(6) + 1).func_240699_a_(TextFormatting.DARK_GREEN), Util.DUMMY_UUID);
|
||||
stack.shrink(1);
|
||||
return ActionResult.resultSuccess(stack);
|
||||
} else {
|
||||
int relic = possible.get(world.rand.nextInt(possible.size()));
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.diceRoll", relic + 1).func_240699_a_(TextFormatting.DARK_GREEN), Util.field_240973_b_);
|
||||
player.sendMessage(new TranslationTextComponent("botaniamisc.diceRoll", relic + 1).func_240699_a_(TextFormatting.DARK_GREEN), Util.DUMMY_UUID);
|
||||
return ActionResult.resultSuccess(new ItemStack(getRelics()[relic]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ItemOdinRing extends ItemRelicBauble {
|
||||
@Override
|
||||
public Multimap<Attribute, AttributeModifier> getEquippedAttributeModifiers(ItemStack stack) {
|
||||
Multimap<Attribute, AttributeModifier> attributes = HashMultimap.create();
|
||||
attributes.put(Attributes.field_233818_a_,
|
||||
attributes.put(Attributes.MAX_HEALTH,
|
||||
new AttributeModifier(getBaubleUUID(stack), "Odin Ring", 20, AttributeModifier.Operation.ADDITION));
|
||||
return attributes;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public class ItemDiviningRod extends Item implements IManaUsingItem, IAvatarWiel
|
||||
BlockState state = world.getBlockState(pos_);
|
||||
|
||||
Block block = state.getBlock();
|
||||
if (Tags.Blocks.ORES.func_230235_a_(block)) {
|
||||
if (Tags.Blocks.ORES.contains(block)) {
|
||||
Random rand = new Random(Registry.BLOCK.getKey(block).hashCode() ^ seedxor);
|
||||
WispParticleData data = WispParticleData.wisp(0.25F, rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), 8, false);
|
||||
world.addParticle(data, pos_.getX() + world.rand.nextFloat(),
|
||||
|
||||
@@ -349,11 +349,11 @@ public class ItemExchangeRod extends Item implements IManaUsingItem, IWireframeC
|
||||
@Override
|
||||
public ITextComponent getDisplayName(@Nonnull ItemStack stack) {
|
||||
BlockState state = getState(stack);
|
||||
IFormattableTextComponent cmp = super.getDisplayName(stack).func_230532_e_();
|
||||
IFormattableTextComponent cmp = super.getDisplayName(stack).deepCopy();
|
||||
if (!state.isAir()) {
|
||||
cmp.func_240702_b_(" (");
|
||||
ITextComponent sub = new ItemStack(state.getBlock()).getDisplayName();
|
||||
cmp.func_230529_a_(sub.func_230532_e_().func_240699_a_(TextFormatting.GREEN));
|
||||
cmp.func_230529_a_(sub.deepCopy().func_240699_a_(TextFormatting.GREEN));
|
||||
cmp.func_240702_b_(")");
|
||||
}
|
||||
return cmp;
|
||||
|
||||
@@ -150,7 +150,7 @@ public class ItemGravityRod extends Item implements IManaUsingItem {
|
||||
}
|
||||
|
||||
if (target != null) {
|
||||
if (BLACKLIST.func_230235_a_(target.getType())) {
|
||||
if (BLACKLIST.contains(target.getType())) {
|
||||
return ActionResult.resultFail(stack);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ public class ItemTerraformRod extends Item implements IManaUsingItem, IBlockProv
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ModTags.Blocks.TERRAFORMABLE.func_230235_a_(state.getBlock())) {
|
||||
if (ModTags.Blocks.TERRAFORMABLE.contains(state.getBlock())) {
|
||||
List<BlockPos> airBlocks = new ArrayList<>();
|
||||
|
||||
for (Direction dir : Direction.Plane.HORIZONTAL) {
|
||||
|
||||
@@ -86,7 +86,7 @@ public final class SkyblockWorldEvents {
|
||||
BlockState state = event.getWorld().getBlockState(event.getPos());
|
||||
Block block = state.getBlock();
|
||||
|
||||
if (ModTags.Blocks.PEBBLE_SOURCES.func_230235_a_(block)) {
|
||||
if (ModTags.Blocks.PEBBLE_SOURCES.contains(block)) {
|
||||
SoundType st = state.getSoundType(event.getWorld(), event.getPos(), player);
|
||||
player.playSound(st.getBreakSound(), st.getVolume() * 0.4F, st.getPitch() + (float) (Math.random() * 0.2 - 0.1));
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ public class BlockTagProvider extends BlockTagsProvider {
|
||||
func_240522_a_(BlockTags.FLOWERS).func_240531_a_(ModTags.Blocks.SPECIAL_FLOWERS);
|
||||
|
||||
func_240522_a_(BlockTags.IMPERMEABLE).func_240534_a_(ModBlocks.elfGlass, ModBlocks.manaGlass, ModBlocks.bifrost, ModBlocks.bifrostPerm);
|
||||
func_240522_a_(BlockTags.field_232875_ap_).func_240534_a_(ModBlocks.manasteelBlock, ModBlocks.terrasteelBlock, ModBlocks.elementiumBlock,
|
||||
func_240522_a_(BlockTags.BEACON_BASE_BLOCKS).func_240534_a_(ModBlocks.manasteelBlock, ModBlocks.terrasteelBlock, ModBlocks.elementiumBlock,
|
||||
ModBlocks.manaDiamondBlock, ModBlocks.dragonstoneBlock);
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public class BlockstateProvider extends BlockStateProvider {
|
||||
String craftCrateName = Registry.BLOCK.getKey(craftCrate).getPath();
|
||||
getVariantBuilder(craftCrate).forAllStates(s -> {
|
||||
CratePattern pat = s.get(BotaniaStateProps.CRATE_PATTERN);
|
||||
String suffix = pat == CratePattern.NONE ? "" : "_" + pat.func_176610_l().substring("crafty_".length());
|
||||
String suffix = pat == CratePattern.NONE ? "" : "_" + pat.getString().substring("crafty_".length());
|
||||
String name = craftCrateName + suffix;
|
||||
ModelFile model = models().withExistingParent(name, prefix("block/shapes/crate"))
|
||||
.texture("bottom", prefix("block/" + craftCrateName + "_bottom"))
|
||||
@@ -392,7 +392,7 @@ public class BlockstateProvider extends BlockStateProvider {
|
||||
|
||||
takeAll(remainingBlocks, b -> b instanceof BlockBuriedPetals).forEach(b -> {
|
||||
DyeColor color = ((BlockBuriedPetals) b).color;
|
||||
ResourceLocation wool = new ResourceLocation("block/" + color.func_176610_l() + "_wool");
|
||||
ResourceLocation wool = new ResourceLocation("block/" + color.getString() + "_wool");
|
||||
particleOnly(remainingBlocks, b, wool);
|
||||
});
|
||||
|
||||
|
||||
@@ -909,19 +909,19 @@ public class RecipeProvider extends net.minecraft.data.RecipeProvider {
|
||||
.setGroup("botania:petal_double")
|
||||
.addCriterion("has_item", hasItem(ModBlocks.getDoubleFlower(color)))
|
||||
.addCriterion("has_alt_item", hasItem(ModItems.getPetal(color)))
|
||||
.build(consumer, "botania:petal_" + color.func_176610_l() + "_double");
|
||||
.build(consumer, "botania:petal_" + color.getString() + "_double");
|
||||
ShapelessRecipeBuilder.shapelessRecipe(ModItems.getPetal(color), 2)
|
||||
.addIngredient(ModBlocks.getFlower(color))
|
||||
.setGroup("botania:petal")
|
||||
.addCriterion("has_item", hasItem(ModBlocks.getFlower(color)))
|
||||
.addCriterion("has_alt_item", hasItem(ModItems.getPetal(color)))
|
||||
.build(consumer, "botania:petal_" + color.func_176610_l());
|
||||
.build(consumer, "botania:petal_" + color.getString());
|
||||
ShapelessRecipeBuilder.shapelessRecipe(DyeItem.getItem(color))
|
||||
.addIngredient(colorOverrides.getOrDefault(color, Ingredient.fromTag(ModTags.Items.getFlowerTag(color))))
|
||||
.addIngredient(ModItems.pestleAndMortar)
|
||||
.setGroup("botania:dye")
|
||||
.addCriterion("has_item", hasItem(ModItems.getPetal(color)))
|
||||
.build(consumer, "botania:dye_" + color.func_176610_l());
|
||||
.build(consumer, "botania:dye_" + color.getString());
|
||||
}
|
||||
|
||||
ShapelessRecipeBuilder.shapelessRecipe(Items.MAGENTA_DYE, 2)
|
||||
@@ -1187,7 +1187,7 @@ public class RecipeProvider extends net.minecraft.data.RecipeProvider {
|
||||
if (pattern == CratePattern.NONE) {
|
||||
continue;
|
||||
}
|
||||
Item item = Registry.ITEM.getValue(prefix(LibItemNames.CRAFT_PATTERN_PREFIX + pattern.func_176610_l().split("_", 2)[1])).get();
|
||||
Item item = Registry.ITEM.getValue(prefix(LibItemNames.CRAFT_PATTERN_PREFIX + pattern.getString().split("_", 2)[1])).get();
|
||||
String s = pattern.openSlots.stream().map(bool -> bool ? "R" : "P").collect(Collectors.joining());
|
||||
ShapedRecipeBuilder.shapedRecipe(item)
|
||||
.key('P', ModItems.placeholder)
|
||||
|
||||
Reference in new issue
Block a user