-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,814 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
{ | ||
"_fv": 43, | ||
"_type": "block", | ||
"definition": { | ||
"texture": "bluepurgeair", | ||
"textureTop": "dai", | ||
"textureLeft": "bluepurgeair", | ||
"textureFront": "bluepurgeair", | ||
"textureRight": "bluepurgeair", | ||
"textureBack": "bluepurgeair", | ||
"renderType": 10, | ||
"customModelName": "Normal", | ||
"rotationMode": 0, | ||
"enablePitch": false, | ||
"emissiveRendering": false, | ||
"displayFluidOverlay": false, | ||
"itemTexture": "", | ||
"particleTexture": "", | ||
"tintType": "No tint", | ||
"isItemTinted": false, | ||
"hasTransparency": false, | ||
"connectedSides": false, | ||
"transparencyType": "SOLID", | ||
"disableOffset": false, | ||
"boundingBoxes": [ | ||
{ | ||
"mx": 0.0, | ||
"my": 0.0, | ||
"mz": 0.0, | ||
"Mx": 16.0, | ||
"My": 16.0, | ||
"Mz": 16.0, | ||
"subtract": false | ||
} | ||
], | ||
"name": "Alchemy Craft Block", | ||
"specialInfo": [], | ||
"hardness": 1.0, | ||
"resistance": 10.0, | ||
"hasGravity": false, | ||
"isWaterloggable": false, | ||
"creativeTab": { | ||
"value": "CUSTOM:MagicBooks" | ||
}, | ||
"destroyTool": "axe", | ||
"customDrop": { | ||
"value": "" | ||
}, | ||
"dropAmount": 1, | ||
"useLootTableForDrops": false, | ||
"requiresCorrectTool": false, | ||
"enchantPowerBonus": 0.0, | ||
"plantsGrowOn": false, | ||
"canRedstoneConnect": false, | ||
"lightOpacity": 15, | ||
"material": { | ||
"value": "WOOD" | ||
}, | ||
"tickRate": 0, | ||
"tickRandomly": false, | ||
"isReplaceable": false, | ||
"canProvidePower": false, | ||
"emittedRedstonePower": { | ||
"fixedValue": 15.0 | ||
}, | ||
"colorOnMap": "DEFAULT", | ||
"creativePickItem": { | ||
"value": "" | ||
}, | ||
"offsetType": "NONE", | ||
"aiPathNodeType": "DEFAULT", | ||
"flammability": 0, | ||
"fireSpreadSpeed": 0, | ||
"isLadder": false, | ||
"slipperiness": 0.6, | ||
"speedFactor": 1.0, | ||
"jumpFactor": 1.0, | ||
"reactionToPushing": "NORMAL", | ||
"isNotColidable": false, | ||
"isCustomSoundType": false, | ||
"soundOnStep": { | ||
"value": "WOOD" | ||
}, | ||
"breakSound": { | ||
"value": "" | ||
}, | ||
"fallSound": { | ||
"value": "" | ||
}, | ||
"hitSound": { | ||
"value": "" | ||
}, | ||
"placeSound": { | ||
"value": "" | ||
}, | ||
"stepSound": { | ||
"value": "" | ||
}, | ||
"luminance": 0, | ||
"unbreakable": false, | ||
"breakHarvestLevel": 1, | ||
"isBonemealable": false, | ||
"hasInventory": false, | ||
"guiBoundTo": "<NONE>", | ||
"openGUIOnRightClick": false, | ||
"inventorySize": 9, | ||
"inventoryStackSize": 64, | ||
"inventoryDropWhenDestroyed": true, | ||
"inventoryComparatorPower": true, | ||
"inventoryOutSlotIDs": [], | ||
"inventoryInSlotIDs": [], | ||
"hasEnergyStorage": false, | ||
"energyInitial": 0, | ||
"energyCapacity": 400000, | ||
"energyMaxReceive": 200, | ||
"energyMaxExtract": 200, | ||
"isFluidTank": false, | ||
"fluidCapacity": 8000, | ||
"fluidRestrictions": [], | ||
"onBlockAdded": { | ||
"name": "AlchemyCraftBlockBlockAdded" | ||
}, | ||
"spawnWorldTypes": [], | ||
"restrictionBiomes": [], | ||
"blocksToReplace": [], | ||
"generationShape": "UNIFORM", | ||
"frequencyPerChunks": 10, | ||
"frequencyOnChunk": 16, | ||
"minGenerateHeight": 0, | ||
"maxGenerateHeight": 64 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"_fv": 43, | ||
"_type": "procedure", | ||
"definition": { | ||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"execute_command\"><value name=\"command\"><block type=\"text\"><field name=\"TEXT\">/summon minecraft:armor_stand ~ ~-0.5 ~ {Invisible:true,Invulnerable:true,PersistenceRequired:true,NoBasePlate:true,NoGravity:true,Small:true,DisabledSlots:4144959,Tags:[\"minecraft_armor_weapon_alchemy_craft_block_mahouzinn\"]}</field></block></value><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value></block></next></block></xml>" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/java/minecraftarmorweapon/block/AlchemyCraftBlockBlock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
package minecraftarmorweapon.block; | ||
|
||
import net.minecraft.world.level.storage.loot.LootContext; | ||
import net.minecraft.world.level.material.Material; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import net.minecraft.world.level.block.state.BlockBehaviour; | ||
import net.minecraft.world.level.block.SoundType; | ||
import net.minecraft.world.level.block.Block; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.level.BlockGetter; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.core.BlockPos; | ||
|
||
import minecraftarmorweapon.procedures.AlchemyCraftBlockBlockAddedProcedure; | ||
|
||
import java.util.List; | ||
import java.util.Collections; | ||
|
||
public class AlchemyCraftBlockBlock extends Block { | ||
public AlchemyCraftBlockBlock() { | ||
super(BlockBehaviour.Properties.of(Material.WOOD).sound(SoundType.WOOD).strength(1f, 10f)); | ||
} | ||
|
||
@Override | ||
public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) { | ||
return 15; | ||
} | ||
|
||
@Override | ||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) { | ||
List<ItemStack> dropsOriginal = super.getDrops(state, builder); | ||
if (!dropsOriginal.isEmpty()) | ||
return dropsOriginal; | ||
return Collections.singletonList(new ItemStack(this, 1)); | ||
} | ||
|
||
@Override | ||
public void onPlace(BlockState blockstate, Level world, BlockPos pos, BlockState oldState, boolean moving) { | ||
super.onPlace(blockstate, world, pos, oldState, moving); | ||
AlchemyCraftBlockBlockAddedProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/minecraftarmorweapon/procedures/AlchemyCraftBlockBlockAddedProcedure.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package minecraftarmorweapon.procedures; | ||
|
||
import net.minecraft.world.phys.Vec3; | ||
import net.minecraft.world.phys.Vec2; | ||
import net.minecraft.world.level.LevelAccessor; | ||
import net.minecraft.server.level.ServerLevel; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.commands.CommandSourceStack; | ||
import net.minecraft.commands.CommandSource; | ||
|
||
public class AlchemyCraftBlockBlockAddedProcedure { | ||
public static void execute(LevelAccessor world, double x, double y, double z) { | ||
if (world instanceof ServerLevel _level) | ||
_level.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, new Vec3(x, y, z), Vec2.ZERO, _level, 4, "", Component.literal(""), _level.getServer(), null).withSuppressedOutput(), | ||
"/summon minecraft:armor_stand ~ ~-0.5 ~ {Invisible:true,Invulnerable:true,PersistenceRequired:true,NoBasePlate:true,NoGravity:true,Small:true,DisabledSlots:4144959,Tags:[\"minecraft_armor_weapon_alchemy_craft_block_mahouzinn\"]}"); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/assets/minecraft_armor_weapon/blockstates/alchemy_craft_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"variants": { | ||
"": { | ||
"model": "minecraft_armor_weapon:block/alchemy_craft_block" | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/resources/assets/minecraft_armor_weapon/models/block/alchemy_craft_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"parent": "block/cube", | ||
"textures": { | ||
"down": "minecraft_armor_weapon:blocks/bluepurgeair", | ||
"up": "minecraft_armor_weapon:blocks/dai", | ||
"north": "minecraft_armor_weapon:blocks/bluepurgeair", | ||
"east": "minecraft_armor_weapon:blocks/bluepurgeair", | ||
"south": "minecraft_armor_weapon:blocks/bluepurgeair", | ||
"west": "minecraft_armor_weapon:blocks/bluepurgeair", | ||
"particle": "minecraft_armor_weapon:blocks/bluepurgeair" | ||
}, | ||
"render_type": "solid" | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/resources/assets/minecraft_armor_weapon/models/item/alchemy_craft_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"parent": "minecraft_armor_weapon:block/alchemy_craft_block", | ||
"display": { | ||
"thirdperson": { | ||
"rotation": [ | ||
10, | ||
-45, | ||
170 | ||
], | ||
"translation": [ | ||
0, | ||
1.5, | ||
-2.75 | ||
], | ||
"scale": [ | ||
0.375, | ||
0.375, | ||
0.375 | ||
] | ||
} | ||
} | ||
} |
Binary file added
BIN
+193 Bytes
src/main/resources/assets/minecraft_armor_weapon/textures/blocks/dai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/minecraft/tags/blocks/mineable/axe.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"minecraft_armor_weapon:alchemy_craft_block" | ||
] | ||
} |
Oops, something went wrong.