Version 3.0.0
This commit is contained in:
parent
222b129cc1
commit
67b663659a
@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx6G
|
||||
loader_version=0.12.12
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 2.1.0
|
||||
mod_version = 3.0.0
|
||||
maven_group = com.test.mod
|
||||
archives_base_name = test-mod
|
||||
|
||||
|
32
src/main/java/net/test/mod/Hausbommer.java
Normal file
32
src/main/java/net/test/mod/Hausbommer.java
Normal file
@ -0,0 +1,32 @@
|
||||
package net.test.mod;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.TypedActionResult;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Hausbommer extends Item{
|
||||
public Hausbommer(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
@Override
|
||||
public TypedActionResult<ItemStack> use(World world, PlayerEntity playerentity, Hand hand) {
|
||||
double x = playerentity.getX();
|
||||
double y = playerentity.getY();
|
||||
double z = playerentity.getZ();
|
||||
double xRound = Math.round(x);
|
||||
double yRound = Math.round(y);
|
||||
double zRound = Math.round(z);
|
||||
String Xmessage = String.valueOf(xRound);
|
||||
String Ymessage = String.valueOf(yRound);
|
||||
String Zmessage = String.valueOf(zRound);
|
||||
String fullMessage = "X: " + Xmessage + " Y: " + Ymessage + " Z: " + Zmessage;
|
||||
playerentity.sendSystemMessage(new LiteralText(fullMessage), Util.NIL_UUID);
|
||||
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, playerentity.getStackInHand(hand));
|
||||
}
|
||||
}
|
@ -17,12 +17,15 @@ public class TestMod implements ModInitializer {
|
||||
public static final Item FABRIC_ITEM = new FabricItem(new Item.Settings().group(ItemGroup.MISC));
|
||||
|
||||
public static final Block FABRIC_BLOCK = new FabricBlock();
|
||||
|
||||
public static final Item HAUSBOMMER_ITEM = new Hausbommer(new Item.Settings().group(ItemGroup.MISC));
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
Registry.register(Registry.ITEM, new Identifier("testmod", "fabric_item"), FABRIC_ITEM);
|
||||
Registry.register(Registry.BLOCK, new Identifier("testmod", "fabric_block"), FABRIC_BLOCK);
|
||||
Registry.register(Registry.ITEM, new Identifier("testmod", "fabric_block"), new BlockItem(FABRIC_BLOCK, new FabricItemSettings().group(ItemGroup.MISC)));
|
||||
Registry.register(Registry.ITEM, new Identifier("testmod", "hausbommer"), HAUSBOMMER_ITEM);
|
||||
CustomPortalBuilder.beginPortal()
|
||||
.frameBlock(Blocks.DIAMOND_BLOCK)
|
||||
.lightWithItem(Items.ENDER_EYE)
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"item.testmod.fabric_item": "Penis",
|
||||
"block.testmod.fabric_block": "Gay Block"
|
||||
"block.testmod.fabric_block": "Gay Block",
|
||||
"item.testmod.hausbommer": "Hausbommer"
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "testmod:item/hausbommer"
|
||||
}
|
||||
}
|
BIN
src/main/resources/assets/testmod/textures/item/hausbommer.png
Normal file
BIN
src/main/resources/assets/testmod/textures/item/hausbommer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
26
src/main/resources/data/testmod/recipes/hausbommer.json
Normal file
26
src/main/resources/data/testmod/recipes/hausbommer.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" X ",
|
||||
"WZW",
|
||||
"WRW"
|
||||
],
|
||||
"key": {
|
||||
"X": {
|
||||
"item": "testmod:fabric_item"
|
||||
},
|
||||
"R": {
|
||||
"item": "testmod:fabric_block"
|
||||
},
|
||||
"W": {
|
||||
"item": "minecraft:iron_block"
|
||||
},
|
||||
"Z": {
|
||||
"item": "minecraft:redstone_block"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "testmod:hausbommer",
|
||||
"count": 1
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user