mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Merge remote-tracking branch 'origin/1.20.4' into 1.20.4
This commit is contained in:
commit
0b4c9838e9
4 changed files with 12 additions and 14 deletions
|
@ -60,7 +60,7 @@ public class BlockGreenhouseGlass extends BlockBase {
|
||||||
BlockState growState = i == 0
|
BlockState growState = i == 0
|
||||||
? trip.getMiddle()
|
? trip.getMiddle()
|
||||||
: world.getBlockState(trip.getLeft());
|
: world.getBlockState(trip.getLeft());
|
||||||
if (growState.getBlock() == trip.getRight() && trip.getRight().isValidBonemealTarget(world, trip.getLeft(), growState, false)) {
|
if (growState.getBlock() == trip.getRight() && trip.getRight().isValidBonemealTarget(world, trip.getLeft(), growState)) {
|
||||||
trip.getRight().performBonemeal(world, rand, trip.getLeft(), growState);
|
trip.getRight().performBonemeal(world, rand, trip.getLeft(), growState);
|
||||||
once = true;
|
once = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class WorldData extends SavedData {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static WorldData get(Level level) {
|
public static WorldData get(Level level) {
|
||||||
return ((ServerLevel) level).getDataStorage().computeIfAbsent(WorldData::load, WorldData::new, SAVE_NAME);
|
return ((ServerLevel) level).getDataStorage().computeIfAbsent(new Factory<>(WorldData::new, WorldData::load), SAVE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO what in the world is this?
|
//TODO what in the world is this?
|
||||||
|
|
|
@ -20,6 +20,7 @@ import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||||
import net.minecraft.world.inventory.Slot;
|
import net.minecraft.world.inventory.Slot;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.crafting.RecipeHolder;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
@ -64,7 +65,7 @@ public class ContainerCanolaPress extends AbstractContainerMenu {
|
||||||
//Other Slots in Inventory excluded
|
//Other Slots in Inventory excluded
|
||||||
if (slot >= inventoryStart) {
|
if (slot >= inventoryStart) {
|
||||||
//Shift from Inventory
|
//Shift from Inventory
|
||||||
Optional<PressingRecipe> recipeOptional = TileEntityCanolaPress.getRecipeForInput(newStack);
|
Optional<RecipeHolder<PressingRecipe>> recipeOptional = TileEntityCanolaPress.getRecipeForInput(newStack);
|
||||||
if (recipeOptional.isPresent()) {
|
if (recipeOptional.isPresent()) {
|
||||||
if (!this.moveItemStackTo(newStack, 0, 1, false)) {
|
if (!this.moveItemStackTo(newStack, 0, 1, false)) {
|
||||||
return ItemStack.EMPTY;
|
return ItemStack.EMPTY;
|
||||||
|
|
|
@ -45,20 +45,17 @@ public class TexturedButton extends Button {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
|
public void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
|
||||||
if (this.visible) {
|
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
int k = this.isHovered
|
||||||
this.isHovered = mouseX >= this.getX() && mouseY >= this.getY() && mouseX < this.getX() + this.width && mouseY < this.getY() + this.height;
|
|
||||||
int k = this.isHovered
|
|
||||||
? 1
|
? 1
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
GlStateManager._enableBlend();
|
GlStateManager._enableBlend();
|
||||||
GlStateManager._blendFuncSeparate(770, 771, 1, 0);
|
GlStateManager._blendFuncSeparate(770, 771, 1, 0);
|
||||||
GlStateManager._blendFunc(770, 771);
|
GlStateManager._blendFunc(770, 771);
|
||||||
guiGraphics.blit(this.resLoc, this.getX(), this.getY(), this.texturePosX, this.texturePosY - this.height + k * this.height, this.width, this.height);
|
guiGraphics.blit(this.resLoc, this.getX(), this.getY(), this.texturePosX, this.texturePosY - this.height + k * this.height, this.width, this.height);
|
||||||
// this.mouseDragged(minecraft, x, y);
|
// this.mouseDragged(minecraft, x, y);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawHover(GuiGraphics guiGraphics, int x, int y) {
|
public void drawHover(GuiGraphics guiGraphics, int x, int y) {
|
||||||
|
|
Loading…
Reference in a new issue