Skip to content

Commit

Permalink
Update to MC 1.19.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnuecke committed Jan 22, 2023
1 parent 02b0383 commit c3beb86
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 22 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"

// Just for in-dev convenience. Mod doesn't use any JEI APIs.
runtimeOnly fg.deobf("curse.maven:jei-238222:4239206")
runtimeOnly fg.deobf("curse.maven:jei-238222:4354617")
}

minecraft {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

minecraft_version=1.19.2
minecraft_version=1.19.3

archives_base_name=bedrockores
maven_group=li.cil.bedrockores

forge_version=43.2.3
forge_version=44.1.0

# Set by build pipeline.
semver=0.0.0
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
package li.cil.bedrockores.client.render;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.mojang.datafixers.util.Pair;
import net.minecraft.client.renderer.block.model.ItemOverrides;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.resources.model.*;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.client.model.geometry.IGeometryBakingContext;
import net.minecraftforge.client.model.geometry.IUnbakedGeometry;

import java.util.Collection;
import java.util.Set;
import java.util.function.Function;

public final class BedrockOreModel implements IUnbakedGeometry<BedrockOreModel> {
@Override
public BakedModel bake(final IGeometryBakingContext context, final ModelBakery baker, final Function<Material, TextureAtlasSprite> spriteGetter, final ModelState modelState, final ItemOverrides overrides, final ResourceLocation modelLocation) {
public BakedModel bake(final IGeometryBakingContext context, final ModelBaker baker, final Function<Material, TextureAtlasSprite> spriteGetter, final ModelState modelState, final ItemOverrides overrides, final ResourceLocation modelLocation) {
return new BedrockOreBakedModel();
}

@Override
public Collection<Material> getMaterials(final IGeometryBakingContext context, final Function<ResourceLocation, UnbakedModel> modelGetter, final Set<Pair<String, String>> missingTextureErrors) {
return ImmutableList.of();
public void resolveParents(final Function<ResourceLocation, UnbakedModel> modelGetter, final IGeometryBakingContext context) {
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package li.cil.bedrockores.client.render;

import com.mojang.blaze3d.vertex.Tesselator;
import com.mojang.math.Matrix4f;
import li.cil.bedrockores.common.block.entity.BlockEntityWithInfo;
import li.cil.bedrockores.common.config.Constants;
import li.cil.bedrockores.common.config.Settings;
Expand Down Expand Up @@ -67,7 +66,7 @@ public static void onWorldRender(final RenderLevelStageEvent event) {

stack.scale(-0.025f, -0.025f, 0.025f);

final Matrix4f matrix = stack.last().pose();
final var matrix = stack.last().pose();

final Font font = Minecraft.getInstance().font;
final MultiBufferSource.BufferSource buffer = MultiBufferSource.immediate(Tesselator.getInstance().getBuilder());
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/li/cil/bedrockores/common/item/Items.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import li.cil.bedrockores.common.block.Blocks;
import li.cil.bedrockores.common.config.Constants;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Item;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.registries.DeferredRegister;
Expand All @@ -15,7 +14,7 @@ public final class Items {

// --------------------------------------------------------------------- //

public static final RegistryObject<Item> BEDROCK_MINER = ITEMS.register(Blocks.BEDROCK_MINER.getId().getPath(), () -> new BlockItem(Blocks.BEDROCK_MINER.get(), new Item.Properties().tab(CreativeModeTab.TAB_DECORATIONS)));
public static final RegistryObject<Item> BEDROCK_MINER = ITEMS.register(Blocks.BEDROCK_MINER.getId().getPath(), () -> new BlockItem(Blocks.BEDROCK_MINER.get(), new Item.Properties()));

// --------------------------------------------------------------------- //

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package li.cil.bedrockores.common.item;

import li.cil.bedrockores.common.config.Constants;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.event.CreativeModeTabEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

@Mod.EventBusSubscriber(value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD, modid = Constants.MOD_ID)
public final class ModCreativeModTabs {
@SubscribeEvent
public static void handleCreativeTabEvent(final CreativeModeTabEvent.BuildContents event) {
if (event.getTab() == CreativeModeTabs.FUNCTIONAL_BLOCKS) {
event.accept(Items.BEDROCK_MINER.get());
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/li/cil/bedrockores/common/sound/Sounds.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public final class Sounds {

// --------------------------------------------------------------------- //

public static final RegistryObject<SoundEvent> MINER = SOUND_EVENTS.register("bedrock_miner", () -> new SoundEvent(new ResourceLocation(Constants.MOD_ID, "bedrock_miner")));
public static final RegistryObject<SoundEvent> MINER = SOUND_EVENTS.register("bedrock_miner", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(Constants.MOD_ID, "bedrock_miner")));

// --------------------------------------------------------------------- //

Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
modLoader = "javafml"
loaderVersion = "[43,)"
loaderVersion = "[44,)"
issueTrackerURL = "https://github.com/MightyPirates/BedrockOres/issues"
license = "MIT"

Expand All @@ -16,12 +16,12 @@ Large ore deposits embedded in the bedrock.
[[dependencies.bedrockores]]
modId = "forge"
mandatory = true
versionRange = "[43.2.0,)"
versionRange = "[44.1.0,)"
ordering = "NONE"
side = "BOTH"
[[dependencies.bedrockores]]
modId = "minecraft"
mandatory = true
versionRange = "[1.19.2,)"
versionRange = "[1.19.3,)"
ordering = "NONE"
side = "BOTH"
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@
}
],
"textures": {
"top": "bedrockores:blocks/bedrock_miner_top",
"side": "bedrockores:blocks/bedrock_miner_side",
"bottom": "bedrockores:blocks/bedrock_miner_bottom",
"top": "bedrockores:block/bedrock_miner_top",
"side": "bedrockores:block/bedrock_miner_side",
"bottom": "bedrockores:block/bedrock_miner_bottom",
"particle": "#side"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "bedrockores:blocks/bedrock_ore_mask"
"all": "bedrockores:block/bedrock_ore_mask"
},
"render_type": "minecraft:cutout"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parent": "minecraft:block/cube_mirrored_all",
"textures": {
"all": "bedrockores:blocks/bedrock_ore_mask"
"all": "bedrockores:block/bedrock_ore_mask"
},
"render_type": "minecraft:cutout"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit c3beb86

Please sign in to comment.