V0.3
This commit is contained in:
parent
ec57c147fc
commit
81fca6fb14
|
@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
|
|||
apply plugin: 'eclipse'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
version = '1.12.2-0.2.2'
|
||||
version = '1.12.2-0.3'
|
||||
group = 'io.mertoalex.bwcmp_tweaks' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = 'bwcmp_tweaks'
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ import io.mertoalex.bwcmp_tweaks.proxy.CommonProxy;
|
|||
import io.mertoalex.bwcmp_tweaks.event.ForgeEvents;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
@ -24,7 +22,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|||
public class bwcmpTweaks {
|
||||
public static final String MODID = "bwcmp_tweaks";
|
||||
public static final String NAME = "Bwcmp Tweaks";
|
||||
public static final String VERSION = "0.2.2";
|
||||
public static final String VERSION = "0.3";
|
||||
|
||||
public static final Logger Logger = LogManager.getLogger(bwcmpTweaks.MODID);
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@ public class ForgeEvents {
|
|||
|
||||
@SubscribeEvent
|
||||
public static void onHarverstBlock(BlockEvent.HarvestDropsEvent event) {
|
||||
if(event.getState().getBlock().toString().toLowerCase().contains("tallgrass")) {
|
||||
String blockname = event.getState().getBlock().toString().toLowerCase();
|
||||
if(blockname.contains("tallgrass") || blockname.contains("leave")) {
|
||||
event.getDrops().add(new ItemStack(ModItems.grassFiber));
|
||||
event.setDropChance(0f);
|
||||
try {
|
||||
|
|
|
@ -2,6 +2,7 @@ package io.mertoalex.bwcmp_tweaks.item;
|
|||
|
||||
import io.mertoalex.bwcmp_tweaks.bwcmpTweaks;
|
||||
import io.mertoalex.bwcmp_tweaks.item.tool.ItemAxe;
|
||||
import io.mertoalex.bwcmp_tweaks.item.tool.ItemPickaxe;
|
||||
import io.mertoalex.bwcmp_tweaks.item.tool.ItemSword;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Items;
|
||||
|
@ -13,20 +14,22 @@ public class ModItems {
|
|||
public static ItemBase grassFiber = new ItemBase("grass_fiber").setCreativeTab(CreativeTabs.MATERIALS);
|
||||
public static ItemSword grassCutter = new ItemSword(bwcmpTweaks.rockTM , "grass_cutter");
|
||||
public static ItemAxe primitiveAxe = new ItemAxe(bwcmpTweaks.rockTM , "primitive_axe");
|
||||
public static ItemPickaxe primitivePickaxe = new ItemPickaxe(bwcmpTweaks.rockTM , "primitive_pickaxe");
|
||||
|
||||
public static void register(IForgeRegistry<Item> registry) {
|
||||
registry.registerAll(
|
||||
grassFiber,
|
||||
grassCutter,
|
||||
primitiveAxe
|
||||
primitiveAxe,
|
||||
primitivePickaxe
|
||||
);
|
||||
//OreDictionary.registerOre("stickWood", Items.STICK);
|
||||
OreDictionary.registerOre("rock", Items.FLINT);
|
||||
}
|
||||
|
||||
public static void registerModels (){
|
||||
grassFiber.registerItemModel ();
|
||||
grassCutter.registerItemModel ();
|
||||
primitiveAxe.registerItemModel ();
|
||||
public static void registerModels(){
|
||||
grassFiber.registerItemModel();
|
||||
grassCutter.registerItemModel();
|
||||
primitiveAxe.registerItemModel();
|
||||
primitivePickaxe.registerItemModel();
|
||||
}
|
||||
}
|
|
@ -1,10 +1,8 @@
|
|||
package io.mertoalex.bwcmp_tweaks.item.tool;
|
||||
|
||||
import io.mertoalex.bwcmp_tweaks.bwcmpTweaks;
|
||||
//import net.minecraft.item.Item;
|
||||
|
||||
public class ItemAxe extends net.minecraft.item.ItemAxe {
|
||||
|
||||
private String name;
|
||||
|
||||
public ItemAxe(ToolMaterial material, String name) {
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
package io.mertoalex.bwcmp_tweaks.item.tool;
|
||||
|
||||
import io.mertoalex.bwcmp_tweaks.bwcmpTweaks;
|
||||
|
||||
public class ItemPickaxe extends net.minecraft.item.ItemPickaxe {
|
||||
private String name;
|
||||
|
||||
public ItemPickaxe(ToolMaterial material, String name) {
|
||||
super(material);
|
||||
setRegistryName(name);
|
||||
setUnlocalizedName(name);
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void registerItemModel(/*Item item*/) {
|
||||
bwcmpTweaks.proxy.registerItemRenderer(this, 0, name);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
package io.mertoalex.bwcmp_tweaks.item.tool;
|
||||
|
||||
import io.mertoalex.bwcmp_tweaks.bwcmpTweaks;
|
||||
//import net.minecraft.item.Item;
|
||||
|
||||
public class ItemSword extends net.minecraft.item.ItemSword {
|
||||
private String name;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
item.grass_fiber.name=Grass fiber
|
||||
item.grass_cutter.name=Grass cutter
|
||||
item.primitive_axe.name=Primitive axe
|
||||
item.primitive_axe.name=Primitive axe
|
||||
item.primitive_pickaxe.name=Primitive pickaxe
|
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
"type": "item",
|
||||
"name": "minecraft:tallgrass",
|
||||
"conditions": [{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"item": "bwcmp_tweaks:grass_cutter"
|
||||
}
|
||||
}
|
||||
}],
|
||||
"functions": [{
|
||||
"function": "mymod:myfunction",
|
||||
"foobar": 3 // can require custom parameters in deserializer
|
||||
}
|
||||
]
|
||||
}
|
||||
/*{
|
||||
"type": "minecraft:block",
|
||||
"pools": [{
|
||||
"rolls": 1,
|
||||
"entries": [{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [{
|
||||
"condition": "minecraft:alternative",
|
||||
"terms": [{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"item": "bwcmp_tweaks:grass_cutter"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "bwcmp_tweaks:grass_fiber"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}*/
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "bwcmp_tweaks:items/primitive_pickaxe"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"RFR",
|
||||
" S "
|
||||
],
|
||||
"key": {
|
||||
"F": {
|
||||
"item": "bwcmp_tweaks:grass_fiber"
|
||||
},
|
||||
"R": {
|
||||
"type": "forge:ore_dict",
|
||||
"ore": "rock"
|
||||
},
|
||||
"S": {
|
||||
"type": "forge:ore_dict",
|
||||
"ore": "stickWood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "bwcmp_tweaks:primitive_pickaxe"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 519 B |
Loading…
Reference in New Issue