1.20.1 first trials
This commit is contained in:
@ -4,17 +4,17 @@
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/versions.html
|
# check these on https://fabricmc.net/versions.html
|
||||||
minecraft_version=1.19.4
|
minecraft_version=1.20.1
|
||||||
yarn_mappings=1.19.4+build.1
|
yarn_mappings=1.20.1+build.5
|
||||||
loader_version=0.14.17
|
loader_version=0.14.21
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.19.4.0
|
mod_version = 1.20.1.0
|
||||||
maven_group = de.jottyfan.minecraft
|
maven_group = de.jottyfan.minecraft
|
||||||
archives_base_name = quickiefabric
|
archives_base_name = quickiefabric
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.76.0+1.19.4
|
fabric_version=0.84.0+1.20.1
|
||||||
|
|
||||||
# for ExtendedLeavesBlock
|
# for ExtendedLeavesBlock
|
||||||
terraform_wood_api_version=5.0.0-beta.1
|
terraform_wood_api_version=7.0.1
|
||||||
|
@ -11,7 +11,6 @@ import net.minecraft.block.CropBlock;
|
|||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemConvertible;
|
import net.minecraft.item.ItemConvertible;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.loot.context.LootContext.Builder;
|
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.ItemScatterer;
|
import net.minecraft.util.ItemScatterer;
|
||||||
@ -19,6 +18,7 @@ import net.minecraft.util.collection.DefaultedList;
|
|||||||
import net.minecraft.util.hit.BlockHitResult;
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
||||||
|
|
||||||
public class BlockCottonplant extends CropBlock {
|
public class BlockCottonplant extends CropBlock {
|
||||||
|
|
||||||
|
@ -12,17 +12,18 @@ import net.minecraft.block.GravelBlock;
|
|||||||
import net.minecraft.block.Material;
|
import net.minecraft.block.Material;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.loot.context.LootContext.Builder;
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jotty
|
* @author jotty
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class BlockDirtSalpeter extends GravelBlock {
|
public class BlockDirtSalpeter extends GravelBlock {
|
||||||
|
|
||||||
public BlockDirtSalpeter() {
|
public BlockDirtSalpeter() {
|
||||||
super(FabricBlockSettings.of(Material.STONE).hardness(3.1f));
|
super(FabricBlockSettings.copyOf(Material.STONE).hardness(3.1f));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -6,9 +6,9 @@ import de.jottyfan.minecraft.quickiefabric.init.RegistryManager;
|
|||||||
import de.jottyfan.minecraft.quickiefabric.items.ItemBackpack;
|
import de.jottyfan.minecraft.quickiefabric.items.ItemBackpack;
|
||||||
import net.fabricmc.api.EnvType;
|
import net.fabricmc.api.EnvType;
|
||||||
import net.fabricmc.api.Environment;
|
import net.fabricmc.api.Environment;
|
||||||
|
import net.minecraft.client.gui.DrawContext;
|
||||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||||
import net.minecraft.client.gui.screen.ingame.ScreenHandlerProvider;
|
import net.minecraft.client.gui.screen.ingame.ScreenHandlerProvider;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
@ -36,36 +36,31 @@ public class BackpackScreen extends HandledScreen<BackpackScreenHandler>
|
|||||||
this.titleX = (this.width - this.containerWidth) / 2;
|
this.titleX = (this.width - this.containerWidth) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawSlots(MatrixStack matrices, int guiX, int guiY) {
|
private void drawSlots(DrawContext context, int guiX, int guiY) {
|
||||||
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
RenderSystem.setShaderTexture(0, SLOT_TEXTURE);
|
RenderSystem.setShaderTexture(0, SLOT_TEXTURE);
|
||||||
for (int y = 0; y < (ItemBackpack.SLOTSIZE / 9); y++) {
|
for (int y = 0; y < (ItemBackpack.SLOTSIZE / 9); y++) {
|
||||||
for (int x = 0; x < 9; x++) {
|
for (int x = 0; x < 9; x++) {
|
||||||
this.drawTexture(matrices, guiX + 7 + (x * 18), guiY + 17 + (y * 18), 0, 0, 18, 18);
|
this.drawSlots(context, guiX, guiY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) {
|
public void render(DrawContext drawContext, int mouseX, int mouseY, float partialTicks) {
|
||||||
this.renderBackground(matrices);
|
this.renderBackground(drawContext);
|
||||||
super.render(matrices, mouseX, mouseY, partialTicks);
|
super.render(drawContext, mouseX, mouseY, partialTicks);
|
||||||
this.drawMouseoverTooltip(matrices, mouseX, mouseY);
|
this.drawMouseoverTooltip(drawContext, mouseX, mouseY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY) {
|
protected void drawBackground(DrawContext context, float delta, int mouseX, int mouseY) {
|
||||||
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
RenderSystem.setShaderTexture(0, TEXTURE);
|
RenderSystem.setShaderTexture(0, TEXTURE);
|
||||||
int guiX = this.titleX;
|
int guiX = this.titleX;
|
||||||
int guiY = (this.height - this.containerHeight) / 2;
|
int guiY = (this.height - this.containerHeight) / 2;
|
||||||
this.drawTexture(matrices, guiX, guiY, 0, 0, this.containerWidth, this.containerHeight);
|
super.renderBackground(context);
|
||||||
|
|
||||||
drawSlots(matrices, guiX, guiY);
|
drawSlots(context, guiX, guiY);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawForeground(MatrixStack matrixStack, int i, int j) {
|
|
||||||
this.textRenderer.draw(matrixStack, this.title, 8.0F, -20.0F, 0xffcccccc); // αrgb
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,8 +100,8 @@ public class BackpackScreenHandler extends ScreenHandler {
|
|||||||
super.onSlotClick(slotId, quickCraftData, actionType, playerEntity);
|
super.onSlotClick(slotId, quickCraftData, actionType, playerEntity);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (playerEntity.world.isClient) {
|
if (playerEntity.getEntityWorld().isClient) {
|
||||||
playerEntity.world.playSound(null, BlockPos.ofFloored(playerEntity.getPos()), SoundEvents.ENTITY_VILLAGER_NO,
|
playerEntity.getEntityWorld().playSound(null, BlockPos.ofFloored(playerEntity.getPos()), SoundEvents.ENTITY_VILLAGER_NO,
|
||||||
SoundCategory.PLAYERS, 1f, 1f);
|
SoundCategory.PLAYERS, 1f, 1f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,9 @@ import com.mojang.blaze3d.systems.RenderSystem;
|
|||||||
import de.jottyfan.minecraft.quickiefabric.init.RegistryManager;
|
import de.jottyfan.minecraft.quickiefabric.init.RegistryManager;
|
||||||
import net.fabricmc.api.EnvType;
|
import net.fabricmc.api.EnvType;
|
||||||
import net.fabricmc.api.Environment;
|
import net.fabricmc.api.Environment;
|
||||||
|
import net.minecraft.client.gui.DrawContext;
|
||||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||||
import net.minecraft.client.gui.screen.ingame.ScreenHandlerProvider;
|
import net.minecraft.client.gui.screen.ingame.ScreenHandlerProvider;
|
||||||
import net.minecraft.client.render.GameRenderer;
|
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
@ -34,18 +33,16 @@ public class BlockStackerScreen extends HandledScreen<BlockStackerScreenHandler>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) {
|
public void render(DrawContext drawContext, int mouseX, int mouseY, float partialTicks) {
|
||||||
this.renderBackground(matrices);
|
this.renderBackground(drawContext);
|
||||||
super.render(matrices, mouseX, mouseY, partialTicks);
|
super.render(drawContext, mouseX, mouseY, partialTicks);
|
||||||
this.drawMouseoverTooltip(matrices, mouseX, mouseY);
|
this.drawMouseoverTooltip(drawContext, mouseX, mouseY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY) {
|
protected void drawBackground(DrawContext drawContext, float delta, int mouseX, int mouseY) {
|
||||||
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
RenderSystem.setShaderTexture(0, TEXTURE);
|
RenderSystem.setShaderTexture(0, TEXTURE);
|
||||||
int x = (width - backgroundWidth) / 2;
|
super.renderBackground(drawContext);
|
||||||
int y = (height - backgroundHeight) / 2;
|
|
||||||
drawTexture(matrices, x, y, 0, 0, backgroundWidth, backgroundHeight);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ public class RegistryManager {
|
|||||||
public static final ScreenHandlerType<BlockStackerScreenHandler> BLOCKSTACKER_SCREEN_HANDLER = ScreenHandlerRegistry
|
public static final ScreenHandlerType<BlockStackerScreenHandler> BLOCKSTACKER_SCREEN_HANDLER = ScreenHandlerRegistry
|
||||||
.registerSimple(RegistryManager.STACKER_IDENTIFIER, BlockStackerScreenHandler::new);
|
.registerSimple(RegistryManager.STACKER_IDENTIFIER, BlockStackerScreenHandler::new);
|
||||||
|
|
||||||
public static final ItemGroup QUICKIEFABRIC_GROUP = FabricItemGroup.builder(new Identifier(QUICKIEFABRIC, "all"))
|
public static final ItemGroup QUICKIEFABRIC_GROUP = FabricItemGroup.builder()
|
||||||
.displayName(Text.literal(QUICKIEFABRIC))
|
.displayName(Text.literal(QUICKIEFABRIC))
|
||||||
.icon(() -> new ItemStack(QuickieItems.SPEEDPOWDER))
|
.icon(() -> new ItemStack(QuickieItems.SPEEDPOWDER))
|
||||||
.entries((enabledFeatures, stacks) -> {
|
.entries((enabledFeatures, stacks) -> {
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
"quickiefabric.mixins.json"
|
"quickiefabric.mixins.json"
|
||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.14.17",
|
"fabricloader": ">=0.14.21",
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"minecraft": "1.19.4",
|
"minecraft": "1.20.1",
|
||||||
"java": ">=17"
|
"java": ">=17"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
|
Reference in New Issue
Block a user