Skip to content

Commit bbec71c

Browse files
committed
cool logo, and some survival changes
1 parent 548e4b9 commit bbec71c

File tree

9 files changed

+97
-9
lines changed

9 files changed

+97
-9
lines changed

src/main/java/ace/actually/pirates/Pirates.java

+15-8
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import net.minecraft.entity.EntityType;
2525
import net.minecraft.entity.SpawnGroup;
2626
import net.minecraft.entity.projectile.ProjectileEntity;
27+
import net.minecraft.item.BlockItem;
2728
import net.minecraft.item.Item;
2829
import net.minecraft.item.ItemGroup;
2930
import net.minecraft.item.ItemStack;
@@ -53,8 +54,8 @@ public class Pirates implements ModInitializer {
5354
public void onInitialize() {
5455
registerEntityThings();
5556
//entity types do it themselves
56-
registerItems();
5757
registerBlocks();
58+
registerItems();
5859
//block entities do it themselves
5960
registerDispenserThings();
6061
PatternProcessor.setupBasicPatterns();
@@ -72,6 +73,17 @@ private void registerEntityThings()
7273
FabricDefaultAttributeRegistry.register(PIRATE_ENTITY_TYPE, PirateEntity.attributes());
7374
}
7475

76+
77+
public static final MotionInvokingBlock MOTION_INVOKING_BLOCK = new MotionInvokingBlock(AbstractBlock.Settings.of(Material.AGGREGATE));
78+
public static final CannonPrimingBlock CANNON_PRIMING_BLOCK = new CannonPrimingBlock(AbstractBlock.Settings.of(Material.AGGREGATE));
79+
private void registerBlocks()
80+
{
81+
Registry.register(Registry.BLOCK,new Identifier("pirates","cannon_priming_block"),CANNON_PRIMING_BLOCK);
82+
Registry.register(Registry.BLOCK,new Identifier("pirates","motion_invoking_block"),MOTION_INVOKING_BLOCK);
83+
84+
}
85+
86+
7587
public static final TestingStickItem TESTING_STICK_ITEM = new TestingStickItem(new Item.Settings());
7688
public static final RaycastingItem RAYCASTING_ITEM = new RaycastingItem(new Item.Settings());
7789
public static final Item CANNONBALL = new Item(new Item.Settings().fireproof().group(ItemGroup.COMBAT));
@@ -80,16 +92,11 @@ private void registerItems()
8092
Registry.register(Registry.ITEM,new Identifier("pirates","testing_stick"),TESTING_STICK_ITEM);
8193
Registry.register(Registry.ITEM,new Identifier("pirates","raycaster"),RAYCASTING_ITEM);
8294
Registry.register(Registry.ITEM,new Identifier("pirates","cannonball"),CANNONBALL);
95+
96+
Registry.register(Registry.ITEM,new Identifier("pirates","cannon_priming_block"),new BlockItem(CANNON_PRIMING_BLOCK,new Item.Settings()));
8397
}
8498

85-
public static final MotionInvokingBlock MOTION_INVOKING_BLOCK = new MotionInvokingBlock(AbstractBlock.Settings.of(Material.AGGREGATE));
86-
public static final CannonPrimingBlock CANNON_PRIMING_BLOCK = new CannonPrimingBlock(AbstractBlock.Settings.of(Material.AGGREGATE));
87-
private void registerBlocks()
88-
{
89-
Registry.register(Registry.BLOCK,new Identifier("pirates","cannon_priming_block"),CANNON_PRIMING_BLOCK);
90-
Registry.register(Registry.BLOCK,new Identifier("pirates","motion_invoking_block"),MOTION_INVOKING_BLOCK);
9199

92-
}
93100
private void registerDispenserThings()
94101
{
95102
DispenserBlock.registerBehavior(Pirates.CANNONBALL, new DispenserBehavior() {

src/main/java/ace/actually/pirates/blocks/CannonPrimingBlock.java

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos po
3838
return Block.createCuboidShape(0,0,0,2,2,2);
3939
}
4040

41+
@Override
42+
public BlockRenderType getRenderType(BlockState state) {
43+
return BlockRenderType.MODEL;
44+
}
45+
4146
@Override
4247
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
4348
builder.add(RedstoneLampBlock.LIT);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"variants": {
3+
"": {
4+
"model": "pirates:block/cannon_priming_block"
5+
}
6+
}
7+
}
13.8 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"item.pirates.cannonball": "Dispenser Cannonball",
3+
"block.pirates.cannon_priming_block": "Dispenser Auto-fire Mechanism"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"credit": "Made with Blockbench",
3+
"textures": {
4+
"0": "block/oak_planks",
5+
"particle": "block/oak_planks"
6+
},
7+
"elements": [
8+
{
9+
"from": [0, 0, 0],
10+
"to": [2, 2, 2],
11+
"faces": {
12+
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
13+
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
14+
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
15+
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
16+
"up": {"uv": [0, 0, 2, 2], "texture": "#0"},
17+
"down": {"uv": [0, 0, 2, 2], "texture": "#0"}
18+
}
19+
}
20+
],
21+
"display": {
22+
"thirdperson_righthand": {
23+
"translation": [5.75, 6.5, 7.25]
24+
},
25+
"thirdperson_lefthand": {
26+
"translation": [-7.75, 7, 8]
27+
},
28+
"firstperson_righthand": {
29+
"translation": [15, 3.25, 0]
30+
},
31+
"firstperson_lefthand": {
32+
"translation": [3.5, 3.5, 0]
33+
},
34+
"ground": {
35+
"translation": [0, 6.75, 0]
36+
},
37+
"gui": {
38+
"rotation": [35, 67, 0],
39+
"translation": [9, 7.25, 0]
40+
},
41+
"head": {
42+
"translation": [7, 15.75, 7.25]
43+
},
44+
"fixed": {
45+
"translation": [0, 0, 8]
46+
}
47+
}
48+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"parent": "pirates:block/cannon_priming_block"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"type": "minecraft:crafting_shapeless",
3+
"group": "cannonball",
4+
"ingredients": [
5+
6+
{"item": "minecraft:blaze_powder"},
7+
{"item": "minecraft:gunpowder"},
8+
{"item": "minecraft:iron_ingot"}
9+
10+
],
11+
"result": {
12+
"item": "pirates:cannonball"
13+
}
14+
}

src/main/resources/fabric.mod.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"id": "pirates",
44
"version": "${version}",
55
"name": "Valkyrien Pirates",
6-
"description": "Pirate ships, but they move, like you'd expect them to",
6+
"description": "Pirate ships, but they move, like you'd expect them to, oh, and cannons",
77
"authors": [
88
"Acrogenous"
99
],

0 commit comments

Comments
 (0)