Skip to content

Commit

Permalink
Updated to 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DaNussi committed Mar 22, 2024
1 parent 804a71f commit 1618b63
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 41 deletions.
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ plugins {
id 'eclipse'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'org.spongepowered.mixin' version '0.7.+'
}

version = '1.19.2-0.0.2'
version = '1.20.1-0.0.2'
group = 'net.nussi.dae2' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'dae2'

Expand All @@ -30,7 +31,7 @@ minecraft {
//
// Use non-default mappings at your own risk. They may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: 'official', version: '1.19.2'
mappings channel: 'official', version: '1.20.1'

// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.

Expand Down Expand Up @@ -161,7 +162,7 @@ dependencies {
// Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed
// that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.19.2-43.2.11'
minecraft 'net.minecraftforge:forge:1.20.1-47.2.20'



Expand All @@ -174,8 +175,8 @@ dependencies {

// AE2
// implementation files('libs/appliedenergistics2-forge-12.9.5-api.jar')
implementation(fg.deobf("appeng:appliedenergistics2-forge:12.9.4:api"))
implementation(fg.deobf("appeng:appliedenergistics2-forge:12.9.4"))
implementation(fg.deobf("appeng:appliedenergistics2-forge:15.0.23:api"))
implementation(fg.deobf("appeng:appliedenergistics2-forge:15.0.23"))

// REDIS DB
// minecraftLibrary jarJar('redis.clients:jedis:3.6.0')
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ org.gradle.daemon=false


// JEI
mc_version=1.19.2
jei_version=11.5.0.297
mc_version=1.20.1
jei_version=15.3.0.4
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.nussi.dedicated_applied_energistics.init.BlockEntityTypeInit;
import net.nussi.dedicated_applied_energistics.init.BlockInit;
import net.nussi.dedicated_applied_energistics.init.ItemInit;
import net.nussi.dedicated_applied_energistics.init.TabInit;
import org.slf4j.Logger;

@Mod(DedicatedAppliedEnegistics.MODID)
Expand All @@ -25,6 +26,7 @@ public DedicatedAppliedEnegistics()
ItemInit.ITEMS.register(modEventBus);
BlockInit.BLOCKS.register(modEventBus);
BlockEntityTypeInit.BLOCK_ENTITY_TYPES.register(modEventBus);
TabInit.CREATIVE_MODE_TABS.register(modEventBus);
modEventBus.addListener(DedicatedAppliedEnegistics::commonSetup);

ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, DedicatedAppliedEnergisticsController.CONFIG_SPEC, "dae2-config.toml");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package net.nussi.dedicated_applied_energistics.blocks;

import com.mojang.logging.LogUtils;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.EntityBlock;
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
Expand All @@ -13,20 +15,19 @@
import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;

@Mod.EventBusSubscriber(modid = DedicatedAppliedEnegistics.MODID)
import static net.minecraft.world.level.levelgen.structure.Structure.simpleCodec;

public class InterDimensionalInterfaceBlock extends Block implements EntityBlock {
private static final Logger LOGGER = LogUtils.getLogger();

public InterDimensionalInterfaceBlock(BlockBehaviour.Properties properties) {
public InterDimensionalInterfaceBlock(Properties properties) {
super(properties);
}


@Nullable
@Override
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
return BlockEntityTypeInit.INTER_DIMENSIONAL_INTERFACE_ENTITY_TYPE.get().create(pos, state);
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.material.Material;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
Expand All @@ -15,20 +15,7 @@
public class BlockInit {
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);

public static final RegistryObject<Block> INTER_DIMENSIONAL_INTERFACE_BLOCK = BLOCKS.register("inter_dimensional_interface", () ->
new InterDimensionalInterfaceBlock(BlockBehaviour.Properties.copy(Blocks.IRON_BLOCK).strength(0.5f)));

// ========================================================== //


public static final RegistryObject<Block> INTER_DIMENSIONAL_INTERFACE_BLOCK = registerBlock("inter_dimensional_interface",
new InterDimensionalInterfaceBlock(BlockBehaviour.Properties.of(Material.STONE).strength(0.5f)),
new Item.Properties().tab(TabInit.MAIN_TAB));


// ========================================================== //

private static RegistryObject<Block> registerBlock(String name, Block block, Item.Properties properties) {
RegistryObject<Block> blockRegistry = BlockInit.BLOCKS.register(name, () -> block);
ItemInit.ITEMS.register(name, () -> new BlockItem(blockRegistry.get(), properties));
return blockRegistry;
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
package net.nussi.dedicated_applied_energistics.init;

import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

import static net.nussi.dedicated_applied_energistics.DedicatedAppliedEnegistics.MODID;
import static net.nussi.dedicated_applied_energistics.init.TabInit.addToTab;

public class ItemInit {
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);

public static RegistryObject<Item> INTER_DIMENSIONAL_INTERFACE_BLOCK_ITEM = addToTab(ITEMS.register("inter_dimensional_interface", () ->
new BlockItem(BlockInit.INTER_DIMENSIONAL_INTERFACE_BLOCK.get(), new Item.Properties())));
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,35 @@
package net.nussi.dedicated_applied_energistics.init;

import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.ItemLike;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.RegistryObject;

import java.util.ArrayList;
import java.util.List;
import java.util.function.Supplier;

import static net.nussi.dedicated_applied_energistics.DedicatedAppliedEnegistics.MODID;

public class TabInit {
public static DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MODID);
public static final List<Supplier<? extends ItemLike>> MAIN_TAB_ITEMS = new ArrayList<>();

public static final CreativeModeTab MAIN_TAB = new CreativeModeTab("dae2_main_tab") {
@Override
public ItemStack makeIcon() {
return new ItemStack(BlockInit.INTER_DIMENSIONAL_INTERFACE_BLOCK.get());
}
};

public static RegistryObject<CreativeModeTab> MAIN_TAB = CREATIVE_MODE_TABS.register("dae2_main_tab", () ->
CreativeModeTab.builder()
.icon(() -> new ItemStack(ItemInit.INTER_DIMENSIONAL_INTERFACE_BLOCK_ITEM.get()))
.title(Component.literal("Dedicated Applied Energistics 2"))
.displayItems((displayParams, output) ->
MAIN_TAB_ITEMS.forEach(itemLike -> output.accept(itemLike.get())))
.build());

public static <T extends Item> RegistryObject<T> addToTab(RegistryObject<T> itemLike) {
MAIN_TAB_ITEMS.add(itemLike);
return itemLike;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ public InterDimensionalInterfaceCrafting(InterDimensionalInterfaceBlockEntity in
}

public void onStart() {
LOGGER.info(uuid + " | Starting storage provider!");
LOGGER.info(uuid + " | Starting crafting provider!");

LOGGER.info(uuid + " | Started storage provider!");
LOGGER.info(uuid + " | Started crafting provider!");
}

public void onStop() {
LOGGER.info(uuid + " | Stopping storage provider!");
LOGGER.info(uuid + " | Stopping crafting provider!");

LOGGER.info(uuid + " | Stopped storage provider!");
LOGGER.info(uuid + " | Stopped crafting provider!");
}

@Override
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
loaderVersion="[43,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
loaderVersion="[47,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
license="All rights reserved"
Expand Down Expand Up @@ -49,7 +49,7 @@ description='''One day there will be a description...'''
# Does this dependency have to exist - if not, ordering below must be specified
mandatory=true #mandatory
# The version range of the dependency
versionRange="[43,)" #mandatory
versionRange="[47,)" #mandatory
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
ordering="NONE"
# Side this dependency is applied on - BOTH, CLIENT or SERVER
Expand All @@ -60,13 +60,13 @@ description='''One day there will be a description...'''
modId="minecraft"
mandatory=true
# This version range declares a minimum of the current minecraft version up to but not including the next major version
versionRange="[1.19.2,1.20)"
versionRange="[1.20.1,1.21)"
ordering="NONE"
side="BOTH"

[[dependencies.dae2]]
modId="ae2"
versionRange="[12.9.4,)"
versionRange="[15.0.23,)"
mandatory=true
ordering="NONE"
side="BOTH"
Expand Down

0 comments on commit 1618b63

Please sign in to comment.