Skip to content

Commit

Permalink
1.19.4 backport
Browse files Browse the repository at this point in the history
  • Loading branch information
FakeDomi committed Jul 23, 2023
1 parent fc32ee1 commit 6fa09fd
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
tech_reborn_version=5.7.0
6 changes: 3 additions & 3 deletions src/main/java/re/domi/invisiblights/LightSourceBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
}

Expand Down Expand Up @@ -73,7 +73,7 @@ public BlockState getStateForNeighborUpdate(BlockState state, Direction directio
}

@Override
public List<ItemStack> getDroppedStacks(BlockState state, LootContextParameterSet.Builder builder)
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder)
{
List<ItemStack> drops = new ArrayList<>(1);

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/re/domi/invisiblights/config/ConfigScreen.java
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -58,7 +58,7 @@ public void onUse(BlockState state, World world, BlockPos pos, PlayerEntity play

@SuppressWarnings("deprecation")
@Override
public List<ItemStack> getDroppedStacks(BlockState state, LootContextParameterSet.Builder builder)
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder)
{
List<ItemStack> drops = new ArrayList<>(1);
drops.add(new ItemStack(Items.GLOWSTONE_DUST, Config.LightSourceGlowstoneCost));
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"depends": {
"fabricloader": ">=0.9.0",
"fabric-api": "*",
"minecraft": ">=1.20"
"minecraft": ">=1.19.4"
}
}

0 comments on commit 6fa09fd

Please sign in to comment.