Skip to content

Commit

Permalink
yea
Browse files Browse the repository at this point in the history
  • Loading branch information
Farcr committed Nov 21, 2023
1 parent d430fd1 commit 04f762c
Show file tree
Hide file tree
Showing 269 changed files with 4,004 additions and 265 deletions.
43 changes: 0 additions & 43 deletions README.md

This file was deleted.

24 changes: 0 additions & 24 deletions TEMPLATE_LICENSE.txt

This file was deleted.

10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ mapping_version=1.20.2

# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
# Must match the String constant located in the main mod class annotated with @Mod.
mod_id=examplemod
mod_id=nomansland
# The human-readable display name for the mod.
mod_name=Example Mod
mod_name=No Man's Land
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=All Rights Reserved
# The mod version. See https://semver.org/
mod_version=1.0.0
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
mod_group_id=com.example.examplemod
mod_group_id=com.farcr.nomansland
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=YourNameHere, OtherNameHere
mod_authors=Farcr
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
mod_description=Example mod description.\nNewline characters can be used and will be replaced properly.
mod_description= FEAR THE OLD BLOOD
# Pack version - this changes each minecraft release, in general.
pack_format_number=18
63 changes: 0 additions & 63 deletions src/main/java/com/example/examplemod/Config.java

This file was deleted.

129 changes: 0 additions & 129 deletions src/main/java/com/example/examplemod/ExampleMod.java

This file was deleted.

48 changes: 48 additions & 0 deletions src/main/java/com/farcr/nomansland/core/NoMansLand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.farcr.nomansland.core;

import com.farcr.nomansland.core.registry.NMLBlockRegistry;
import com.farcr.nomansland.core.registry.NMLItemRegistry;
import com.mojang.logging.LogUtils;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.server.ServerStartingEvent;
import org.slf4j.Logger;

@Mod(NoMansLand.MODID)
public class NoMansLand {
public static final String MODID = "nomansland";

public static final Logger LOGGER = LogUtils.getLogger();

public NoMansLand(IEventBus modEventBus) {

modEventBus.addListener(this::commonSetup);

NMLBlockRegistry.BLOCKS.register(modEventBus);

NMLItemRegistry.ITEMS.register(modEventBus);

NeoForge.EVENT_BUS.register(this);

}

private void commonSetup(final FMLCommonSetupEvent event) {
}

@SubscribeEvent
public void onServerStarting(ServerStartingEvent event) {
}


@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public static class ClientModEvents {
@SubscribeEvent
public static void onClientSetup(FMLClientSetupEvent event) {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.farcr.nomansland.core.registry;

import com.farcr.nomansland.core.NoMansLand;
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.SlabBlock;
import net.minecraft.world.level.block.StairBlock;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredBlock;
import net.neoforged.neoforge.registries.DeferredItem;
import net.neoforged.neoforge.registries.DeferredRegister;

import java.util.function.Supplier;

public class NMLBlockRegistry {
public static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(NoMansLand.MODID);

public static final DeferredBlock<Block> PINE_PLANKS = registerBlock("pine_planks",() -> new Block(Block.Properties.copy(Blocks.OAK_PLANKS)));
public static final DeferredBlock<Block> PINE_STAIRS = registerBlock("pine_stairs",() -> new StairBlock(() -> NMLBlockRegistry.PINE_PLANKS.get()
.defaultBlockState(),Block.Properties.copy(NMLBlockRegistry.PINE_PLANKS.get())));
public static final DeferredBlock<Block> PINE_SLAB = registerBlock("pine_slab",() -> new SlabBlock(Block.Properties.copy(NMLBlockRegistry.PINE_PLANKS.get())));





private static <T extends Block> DeferredBlock<T> registerBlock(String name, Supplier<T> block) {
DeferredBlock<T> toReturn = BLOCKS.register(name, block);
registerBlockItem(name, toReturn);
return toReturn;
}

private static <T extends Block> DeferredItem<Item> registerBlockItem(String name, DeferredBlock<T> block) {
return NMLItemRegistry.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties()));
}

public static void register(IEventBus eventBus) {
BLOCKS.register(eventBus);
NoMansLand.LOGGER.info("Registering NoMansLandBlocks for" + NoMansLand.MODID);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.farcr.nomansland.core.registry;

import com.farcr.nomansland.core.NoMansLand;
import net.neoforged.neoforge.registries.DeferredRegister;

public class NMLItemRegistry {
public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(NoMansLand.MODID);
}
Loading

0 comments on commit 04f762c

Please sign in to comment.