Skip to content

Commit

Permalink
Update to 1.21.4
Browse files Browse the repository at this point in the history
  • Loading branch information
UnRealDinnerbone committed Dec 12, 2024
1 parent e1eb0d7 commit 9924740
Show file tree
Hide file tree
Showing 41 changed files with 212 additions and 137 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ logs/
neo/runs/

common/src/generated/resources/.cache/

fabric/runs/

4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
### 6.1.0
### 21.4.0

- 1.21.1 & Bee Compact
- Update to Minecraft 1.21.4
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
plugins {
id("dev.nanite.mlp") version("0.3.0")
id("dev.nanite.mlp") version("0.4.2")
id("java-library")
id("maven-publish")
id("me.modmuss50.mod-publish-plugin") version "0.3.0"
id("me.modmuss50.mod-publish-plugin") version "0.8.1"
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.0'
}


java.toolchain.languageVersion = JavaLanguageVersion.of(21)

multiLoader.root() {
minecraftVersion.set(project.property("minecraft_version"))
parchmentMinecraftVersion.set(project.property("minecraft_version"))
parchmentVersion.set(project.property("parchment_version"))
modID.set(project.property("mod_id"))
splitSources.set(true)
convertAccessWidener.set(true)
Expand Down
4 changes: 4 additions & 0 deletions buildSrc/src/main/groovy/multiloader.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@ publishing {
artifactId project.getArchivesBaseName()
}
}
}

jar {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "jamd:block/end_portal"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "jamd:block/nether_portal"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "jamd:block/portal_block"
}
}

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"infiniburn": "#minecraft:infiniburn_end",
"logical_height": 256,
"min_y": 0,
"monster_spawn_block_light_limit": 0,
"monster_spawn_block_light_limit": 15,
"monster_spawn_light_level": {
"type": "minecraft:uniform",
"max_inclusive": 7,
"max_inclusive": 15,
"min_inclusive": 0
},
"natural": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"infiniburn": "#minecraft:infiniburn_overworld",
"logical_height": 384,
"min_y": -64,
"monster_spawn_block_light_limit": 0,
"monster_spawn_block_light_limit": 15,
"monster_spawn_light_level": {
"type": "minecraft:uniform",
"max_inclusive": 7,
"max_inclusive": 15,
"min_inclusive": 0
},
"natural": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"infiniburn": "#minecraft:infiniburn_nether",
"logical_height": 128,
"min_y": 0,
"monster_spawn_block_light_limit": 0,
"monster_spawn_block_light_limit": 15,
"monster_spawn_light_level": {
"type": "minecraft:uniform",
"max_inclusive": 7,
"max_inclusive": 15,
"min_inclusive": 0
},
"natural": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"O": {
"item": "minecraft:end_stone"
},
"P": {
"item": "minecraft:diamond_pickaxe"
}
"O": "minecraft:end_stone",
"P": "minecraft:diamond_pickaxe"
},
"pattern": [
"OOO",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"O": {
"item": "minecraft:nether_bricks"
},
"P": {
"item": "minecraft:netherite_pickaxe"
}
"O": "minecraft:nether_bricks",
"P": "minecraft:netherite_pickaxe"
},
"pattern": [
"OOO",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"O": {
"item": "minecraft:obsidian"
},
"P": {
"item": "minecraft:diamond_pickaxe"
}
"O": "minecraft:obsidian",
"P": "minecraft:diamond_pickaxe"
},
"pattern": [
"OOO",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"carvers": {},
"carvers": [],
"downfall": 0.5,
"effects": {
"fog_color": 10518688,
"music_volume": 1.0,
"sky_color": 0,
"water_color": 4159204,
"water_fog_color": 329011
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"carvers": {},
"carvers": [],
"downfall": 0.4,
"effects": {
"fog_color": 12638463,
"music_volume": 1.0,
"sky_color": 8103167,
"water_color": 4445678,
"water_fog_color": 270131
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"carvers": {},
"carvers": [],
"downfall": 0.0,
"effects": {
"additions_sound": {
Expand All @@ -14,12 +14,18 @@
"sound": "minecraft:ambient.nether_wastes.mood",
"tick_delay": 6000
},
"music": {
"max_delay": 24000,
"min_delay": 12000,
"replace_current_music": false,
"sound": "minecraft:music.nether.nether_wastes"
},
"music": [
{
"data": {
"max_delay": 24000,
"min_delay": 12000,
"replace_current_music": false,
"sound": "minecraft:music.nether.nether_wastes"
},
"weight": 1
}
],
"music_volume": 1.0,
"sky_color": 7254527,
"water_color": 4159204,
"water_fog_color": 329011
Expand All @@ -32,7 +38,14 @@
[],
[],
[],
[]
[
"minecraft:ore_gravel_nether",
"minecraft:ore_blackstone",
"minecraft:ore_gold_nether",
"minecraft:ore_quartz_nether",
"minecraft:ore_ancient_debris_large",
"minecraft:ore_debris_small"
]
],
"has_precipitation": false,
"spawn_costs": {},
Expand Down
4 changes: 4 additions & 0 deletions common/src/main/java/com/unrealdinnerbone/jamd/JAMD.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
import com.unrealdinnerbone.trenzalore.lib.RLUtils;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.entity.Display;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.timers.TimerCallback;
import net.minecraft.world.level.timers.TimerQueue;
import org.slf4j.Logger;

import java.io.IOException;
Expand Down
25 changes: 16 additions & 9 deletions common/src/main/java/com/unrealdinnerbone/jamd/JAMDRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
import com.unrealdinnerbone.jamd.block.*;
import com.unrealdinnerbone.jamd.block.base.PortalTileEntity;
import com.unrealdinnerbone.jamd.world.CustomFlatLevelSource;
import com.unrealdinnerbone.trenzalore.api.platform.services.ICreativeTabRegister;
import com.unrealdinnerbone.trenzalore.api.platform.services.IRegistry;
import com.unrealdinnerbone.trenzalore.api.registry.BlockRegistryObjects;
import com.unrealdinnerbone.trenzalore.api.registry.ItemRegistryObjects;
import com.unrealdinnerbone.trenzalore.api.registry.Regeneration;
import com.unrealdinnerbone.trenzalore.api.registry.RegistryEntry;
import com.unrealdinnerbone.trenzalore.api.registry.RegistryObjects;
Expand All @@ -16,26 +19,30 @@
import net.minecraft.commands.synchronization.SingletonArgumentInfo;
import net.minecraft.core.BlockPos;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.tags.BiomeTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.chunk.ChunkGenerator;

import java.util.List;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.function.UnaryOperator;

public class JAMDRegistry implements IRegistry {

private static final RegistryObjects<Block> BLOCKS = Regeneration.create(Registries.BLOCK);
private static final RegistryObjects<Item> ITEMS = Regeneration.create(Registries.ITEM);
private static final RegistryObjects<BlockEntityType<?>> TILES = Regeneration.create(Registries.BLOCK_ENTITY_TYPE);
private static final RegistryObjects<MapCodec<? extends ChunkGenerator>> CHUNK_GENERATORS = Regeneration.create(Registries.CHUNK_GENERATOR);
private static final BlockRegistryObjects BLOCKS = Regeneration.createBlockRegistry(JAMD.MOD_ID);
private static final ItemRegistryObjects ITEMS = Regeneration.createItemRegistry(JAMD.MOD_ID);
private static final RegistryObjects<BlockEntityType<?>> TILES = Regeneration.create(JAMD.MOD_ID, Registries.BLOCK_ENTITY_TYPE);
private static final RegistryObjects<MapCodec<? extends ChunkGenerator>> CHUNK_GENERATORS = Regeneration.create(JAMD.MOD_ID, Registries.CHUNK_GENERATOR);

public static final RegistryEntry<MapCodec<? extends ChunkGenerator>> CUSTOM_FLAT_LEVEL_SOURCE = CHUNK_GENERATORS.register("mining", () -> CustomFlatLevelSource.CODEC);

Expand All @@ -46,14 +53,14 @@ public class JAMDRegistry implements IRegistry {
public static final WorldType END = of("end", "end_portal", "end_portal", EndPortalBlock::new, EndBlockEntity::new, BiomeTags.IS_END);


private static WorldType of(String name, String blockName, String tileName, Supplier<Block> blockSupplier, BiFunction<BlockPos, BlockState, PortalTileEntity> tileSupplier, TagKey<Biome> biomeTagKey) {
RegistryEntry<Block> block = BLOCKS.register(blockName, blockSupplier);
return new WorldType(name, block, ITEMS.register(blockName, () -> new BlockItem(block.get(), new Item.Properties())), TILES.register(tileName, () -> Regeneration.createBlockEntityType(tileSupplier, block.get())), biomeTagKey);
private static WorldType of(String name, String blockName, String tileName, Function<Block.Properties, Block> blockSupplier, Regeneration.BESuppler<PortalTileEntity> tileSupplier, TagKey<Biome> biomeTagKey) {
RegistryEntry<Block> block = BLOCKS.register(blockName, blockSupplier, UnaryOperator.identity());
return new WorldType(name, block, ITEMS.registerBlockItem(blockName, block, UnaryOperator.identity()), TILES.register(tileName, () -> Regeneration.createBEType(tileSupplier, block.getHolder().value())), biomeTagKey);
}

@Override
public void afterRegistered() {
Regeneration.addItemsToCreateTab(CreativeTabs.FUNCTIONAL_BLOCKS, List.of(OVERWORLD.getItem(), NETHER.getItem(), END.getItem()));
public void afterRegistered(ICreativeTabRegister register) {
register.addItemToCreativeTab(CreativeTabs.FUNCTIONAL_BLOCKS, List.of(OVERWORLD.getItem(), NETHER.getItem(), END.getItem()));
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/java/com/unrealdinnerbone/jamd/WorldType.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ public void export(MinecraftServer server) throws IllegalStateException, IOExcep
List<PlacedFeature> placedFeatures = getFeatures(server);
for (PlacedFeature placedFeature : placedFeatures) {

boolean b = server.registryAccess().registryOrThrow(Registries.PLACED_FEATURE).wrapAsHolder(placedFeature).is(ingoredPlaceFeatures);
boolean b = server.registryAccess().lookupOrThrow(Registries.PLACED_FEATURE).wrapAsHolder(placedFeature).is(ingoredPlaceFeatures);

if (!b && !placedFeature.feature().is(ingoredConfigFeatures)) {
RegistryAccess.Frozen frozen = server.registryAccess();
ConfiguredFeature<?, ?> configuredFeatureReference = placedFeature.feature().value();
Feature<?> feature1 = configuredFeatureReference.feature();
ResourceLocation key1 = frozen.registryOrThrow(Registries.FEATURE).getKey(feature1);
ResourceLocation key1 = frozen.lookupOrThrow(Registries.FEATURE).getKey(feature1);
FeatureTypeRegistry.getFeatureType(key1).ifPresentOrElse(iFeatureTypeCompact -> {
try {
oresCodecs.add(iFeatureTypeCompact.getOreCodec(configuredFeatureReference.config(), placedFeature.placement()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

import com.unrealdinnerbone.jamd.JAMDRegistry;
import com.unrealdinnerbone.jamd.block.base.PortalBlock;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;

public class EndPortalBlock extends PortalBlock {

public EndPortalBlock() {
super(JAMDRegistry.END);
public EndPortalBlock(Block.Properties properties) {
super(properties, JAMDRegistry.END);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import com.unrealdinnerbone.jamd.JAMDRegistry;
import com.unrealdinnerbone.jamd.block.base.PortalBlock;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;

public class NetherPortalBlock extends PortalBlock {

public NetherPortalBlock() {
super(JAMDRegistry.NETHER);
public NetherPortalBlock(Block.Properties properties) {
super(properties, JAMDRegistry.NETHER);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import com.unrealdinnerbone.jamd.JAMDRegistry;
import com.unrealdinnerbone.jamd.block.base.PortalBlock;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;

public class OverworldPortalBlock extends PortalBlock {

public OverworldPortalBlock() {
super(JAMDRegistry.OVERWORLD);
public OverworldPortalBlock(Block.Properties properties) {
super(properties, JAMDRegistry.OVERWORLD);
}

}
Loading

0 comments on commit 9924740

Please sign in to comment.