Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Wimpingego committed Aug 21, 2020
1 parent 0c79122 commit bd6cc9d
Show file tree
Hide file tree
Showing 918 changed files with 12,450 additions and 4,403 deletions.
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ archivesBaseName = modFileName

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
// The mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD Snapshot are built nightly.
Expand Down Expand Up @@ -89,7 +90,7 @@ dependencies {
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's 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:" + modMinecraftVersion + "-" + modForgeVersion
minecraft 'net.minecraftforge:forge:1.16.2-33.0.10'

// You may put jars on which you depend on in ./libs or you may define them like so..
// compile "some.group:artifact:version:classifier"
Expand All @@ -115,12 +116,12 @@ dependencies {
jar {
manifest {
attributes([
"Specification-Title": modId,
"Specification-Vendor": modGroup,
"Specification-Title": "examplemod",
"Specification-Vendor": "examplemodsareus",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :modGroup,
"Implementation-Vendor" :"examplemodsareus",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
org.gradle.jvmargs=-Xmx6G
org.gradle.daemon=false

modVersion = 0.1.5
modMinecraftVersion = 1.15.2
modForgeVersion = 31.1.78
modVersion = 1.0.0
modMinecraftVersion = 1.16.2
modForgeVersion = 33.0.10
mappingsChannel = snapshot
mappingsVersion = 20200521-1.15.1
mappingsVersion = 20200723-1.16.1
modId = nnow
modGroup = com.github.wimpingego.nnow
modFileName = NeverNeededOrWanted
modFileName = NeverNeededOrWanted
55 changes: 41 additions & 14 deletions src/main/java/com/github/wimpingego/nnow/NNOW.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.github.wimpingego.nnow.container.ModContainerTypes;
import com.github.wimpingego.nnow.entities.ModTileEntityTypes;
import com.github.wimpingego.nnow.init.BlockList;
import com.github.wimpingego.nnow.init.ItemList;
import com.github.wimpingego.nnow.init.SoundList;
import com.github.wimpingego.nnow.init.*;
import com.github.wimpingego.nnow.util.ClientRenderer;
import com.github.wimpingego.nnow.util.MetalClientRenderer;
import com.github.wimpingego.nnow.util.Trollnventory;
import com.github.wimpingego.nnow.util.WitherEvents;
import com.github.wimpingego.nnow.util.ModConfigs;
Expand Down Expand Up @@ -44,30 +41,42 @@ public class NNOW

public static final ItemGroup NNOW_TAB = new ItemGroup("NNOWTab") {
public ItemStack createIcon() {
return new ItemStack(ItemList.MAGNET.get());
return new ItemStack(ItemList.ENDER_BAG.get());
}
};

public NNOW()
{

final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();

ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ModConfigs.COMMON_CONFIG);
ModConfigs.load(ModConfigs.COMMON_CONFIG, FMLPaths.CONFIGDIR.get().resolve("nnow-common.toml"));

modEventBus.addListener(this::setup);
modEventBus.addListener(this::clientSetup);

SoundList.SOUNDS.register(modEventBus);
ItemList.ITEMS.register(modEventBus);

if(ModConfigs.METALS_ITEMS_LOADED.get() == true)
{
MetalItemList.ITEMS.register(modEventBus);
}

BlockList.BLOCKS.register(modEventBus);
BlockList.NO_ITEM_BLOCK.register(modEventBus);
ModTileEntityTypes.TILE_ENTITY_TYPES.register(modEventBus);
ModContainerTypes.CONTAINER_TYPES.register(modEventBus);

if(ModConfigs.METALS_ITEMS_LOADED.get() == true)
{
MetalBlockList.BLOCKS.register(modEventBus);
MetalBlockList.NO_ITEM_BLOCK.register(modEventBus);
}

MinecraftForge.EVENT_BUS.register(this);
//MinecraftForge.EVENT_BUS.register(Trollnventory.class);

ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ModConfigs.COMMON_CONFIG);
ModConfigs.load(ModConfigs.COMMON_CONFIG, FMLPaths.CONFIGDIR.get().resolve("nnow-common.toml"));
//ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ModConfigs.COMMON_CONFIG);
///ModConfigs.load(ModConfigs.COMMON_CONFIG, FMLPaths.CONFIGDIR.get().resolve("nnow-common.toml"));

IEventBus forgeEventBus = MinecraftForge.EVENT_BUS;

Expand All @@ -84,7 +93,18 @@ public static void createBlockItems(final RegistryEvent.Register<Item> event) {
final BlockItem blockItem = new BlockItem(block, properties);
blockItem.setRegistryName(block.getRegistryName());
registry.register(blockItem);
});
});

if(ModConfigs.METALS_ITEMS_LOADED.get() == true)
{
MetalBlockList.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach(block -> {
final Item.Properties properties = new Item.Properties().group(NNOW_TAB);
final BlockItem blockItem = new BlockItem(block, properties);
blockItem.setRegistryName(block.getRegistryName());
registry.register(blockItem);
});
}

}

private void setup(final FMLCommonSetupEvent event)
Expand All @@ -100,11 +120,18 @@ private void setup(final FMLCommonSetupEvent event)
VillagerUtil.fixPOITypeBlockStates(PointOfInterestTypes.END_TRADER);
VillagerUtil.fixPOITypeBlockStates(PointOfInterestTypes.SEA_TRADER);
VillagerUtil.fixPOITypeBlockStates(PointOfInterestTypes.SEA_FISHERMAN);
VillagerUtil.fixPOITypeBlockStates(PointOfInterestTypes.NETHER_TRADER);
VillagerUtil.fixPOITypeBlockStates(PointOfInterestTypes.INGOT_TRADER);
}

private void clientSetup(final FMLClientSetupEvent event)
{
ClientRenderer.registerBlocks();

if(ModConfigs.METALS_ITEMS_LOADED.get() == true)
{
MetalClientRenderer.registerBlocks();
}
}

}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit bd6cc9d

Please sign in to comment.