diff --git a/build.gradle b/build.gradle index 3cb4142..6717884 100644 --- a/build.gradle +++ b/build.gradle @@ -31,7 +31,7 @@ dependencies { modImplementation "com.terraformersmc:modmenu:${project.mod_menu_version}" include modApi("teamreborn:energy:${project.reborn_energy_version}") - modRuntimeOnly "TechReborn:TechReborn-1.20:${project.tech_reborn_version}", { exclude(group: "me.shedaniel") } + modRuntimeOnly "TechReborn:TechReborn-1.19:${project.tech_reborn_version}", { exclude(group: "me.shedaniel") } } processResources { diff --git a/gradle.properties b/gradle.properties index fa54994..88dc3cc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,18 +4,18 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20.1 -yarn_mappings=1.20.1+build.1 +minecraft_version=1.19.4 +yarn_mappings=1.19.4+build.2 loader_version=0.14.21 # Mod Properties -mod_version=7.3+1.20 +mod_version=7.3+1.19.4 maven_group=re.domi archives_base_name=invisiblights # Dependencies -fabric_version=0.83.0+1.20.1 +fabric_version=0.79.0+1.19.4 -mod_menu_version=7.1.0 +mod_menu_version=6.3.1 reborn_energy_version=3.0.0 -tech_reborn_version=5.8.3 \ No newline at end of file +tech_reborn_version=5.7.0 \ No newline at end of file diff --git a/src/main/java/re/domi/invisiblights/LightSourceBlock.java b/src/main/java/re/domi/invisiblights/LightSourceBlock.java index e162237..ecc12a7 100644 --- a/src/main/java/re/domi/invisiblights/LightSourceBlock.java +++ b/src/main/java/re/domi/invisiblights/LightSourceBlock.java @@ -7,7 +7,7 @@ import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; -import net.minecraft.loot.context.LootContextParameterSet; +import net.minecraft.loot.context.LootContext; import net.minecraft.server.world.ServerWorld; import net.minecraft.state.StateManager; import net.minecraft.state.property.Properties; @@ -27,7 +27,7 @@ public class LightSourceBlock extends Block implements Waterloggable { public LightSourceBlock() { - super(FabricBlockSettings.of().hardness(0.2F).resistance(0.2F).luminance(15).replaceable().noCollision()); + super(FabricBlockSettings.of(Material.AIR).hardness(0.2F).resistance(0.2F).luminance(15).noCollision()); this.setDefaultState(this.getStateManager().getDefaultState().with(InvisibLights.FROM_POWERED_ROD, false).with(Properties.WATERLOGGED, false)); } @@ -73,7 +73,7 @@ public BlockState getStateForNeighborUpdate(BlockState state, Direction directio } @Override - public List getDroppedStacks(BlockState state, LootContextParameterSet.Builder builder) + public List getDroppedStacks(BlockState state, LootContext.Builder builder) { List drops = new ArrayList<>(1); diff --git a/src/main/java/re/domi/invisiblights/config/ConfigScreen.java b/src/main/java/re/domi/invisiblights/config/ConfigScreen.java index a63ec0e..c1cd5a4 100644 --- a/src/main/java/re/domi/invisiblights/config/ConfigScreen.java +++ b/src/main/java/re/domi/invisiblights/config/ConfigScreen.java @@ -1,8 +1,8 @@ package re.domi.invisiblights.config; -import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.widget.*; +import net.minecraft.client.util.math.MatrixStack; import net.minecraft.screen.ScreenTexts; import net.minecraft.text.Text; @@ -107,10 +107,10 @@ public void close() } @Override - public void render(DrawContext context, int mouseX, int mouseY, float delta) + public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { - this.renderBackground(context); - super.render(context, mouseX, mouseY, delta); + this.renderBackground(matrices); + super.render(matrices, mouseX, mouseY, delta); } private Widget createTextWidget(Text text) diff --git a/src/main/java/re/domi/invisiblights/mixin/LightBlockMixin.java b/src/main/java/re/domi/invisiblights/mixin/LightBlockMixin.java index aedd6a9..9ca251d 100644 --- a/src/main/java/re/domi/invisiblights/mixin/LightBlockMixin.java +++ b/src/main/java/re/domi/invisiblights/mixin/LightBlockMixin.java @@ -10,7 +10,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.ItemUsageContext; import net.minecraft.item.Items; -import net.minecraft.loot.context.LootContextParameterSet; +import net.minecraft.loot.context.LootContext; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.util.hit.BlockHitResult; @@ -23,8 +23,8 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import re.domi.invisiblights.config.Config; import re.domi.invisiblights.InvisibLights; +import re.domi.invisiblights.config.Config; import java.util.ArrayList; import java.util.List; @@ -58,7 +58,7 @@ public void onUse(BlockState state, World world, BlockPos pos, PlayerEntity play @SuppressWarnings("deprecation") @Override - public List getDroppedStacks(BlockState state, LootContextParameterSet.Builder builder) + public List getDroppedStacks(BlockState state, LootContext.Builder builder) { List drops = new ArrayList<>(1); drops.add(new ItemStack(Items.GLOWSTONE_DUST, Config.LightSourceGlowstoneCost)); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 8763c50..13ac1f0 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -36,6 +36,6 @@ "depends": { "fabricloader": ">=0.9.0", "fabric-api": "*", - "minecraft": ">=1.20" + "minecraft": ">=1.19.4" } }