Skip to content
This repository has been archived by the owner on Dec 19, 2020. It is now read-only.

Commit

Permalink
add new blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
squid233 committed Apr 26, 2020
1 parent c1e08b9 commit 07da838
Show file tree
Hide file tree
Showing 41 changed files with 332 additions and 2 deletions.
Binary file removed build/libs/SquidCraft-1.15.2-0.0.1-dev.jar
Binary file not shown.
Binary file removed build/libs/SquidCraft-1.15.2-0.0.1-sources.jar
Binary file not shown.
Binary file removed build/libs/SquidCraft-1.15.2-0.1.0-dev.jar
Binary file not shown.
Binary file removed build/libs/SquidCraft-1.15.2-0.1.0-sources.jar
Binary file not shown.
Binary file removed build/libs/SquidCraft-1.15.2-0.2.0-dev.jar
Binary file not shown.
Binary file removed build/libs/SquidCraft-1.15.2-0.2.0-sources.jar
Binary file not shown.
Binary file removed build/libs/SquidCraft-1.15.2-0.3.0-dev.jar
Binary file not shown.
Binary file removed build/libs/SquidCraft-1.15.2-0.3.0-sources.jar
Binary file not shown.
Binary file removed build/libs/SquidCraft-1.15.2-0.3.1-dev.jar
Binary file not shown.
Binary file removed build/libs/SquidCraft-1.15.2-0.3.1-sources.jar
Binary file not shown.
Binary file removed build/libs/SquidCraft-1.15.2-0.4.0-sources.jar
Binary file not shown.
Binary file not shown.
Binary file added build/libs/SquidCraft-1.15.2-0.4.1.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.8.2+build.194

# Mod Properties
mod_version = 1.15.2-0.5.0
mod_version = 1.15.2-0.4.1
maven_group = io.github.squidcraft
archives_base_name = SquidCraft

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pluginManagement {
jcenter()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net'
url = 'https://maven.modmuss50.me'
}
// maven {
// name = 'Minecraft'
Expand Down
48 changes: 48 additions & 0 deletions src/main/java/io/github/squidcraft/block/MultiSquidBlock.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package io.github.squidcraft.block;

import net.fabricmc.fabric.api.block.FabricBlockSettings;
import net.minecraft.block.Block;
import net.minecraft.block.Material;

public class MultiSquidBlock {
public One one() {
return new One();
}

public Two two() {
return new Two();
}

public Four four() {
return new Four();
}

public Eight eight() {
return new Eight();
}

}

class One extends Block {
public One() {
super(FabricBlockSettings.of(Material.EARTH).strength(1.5f, 0.6f).build());
}
}

class Two extends Block {
public Two() {
super(FabricBlockSettings.of(Material.EARTH).strength(2.0f, 0.65f).build());
}
}

class Four extends Block {
public Four() {
super(FabricBlockSettings.of(Material.EARTH).strength(2.5f, 0.7f).build());
}
}

class Eight extends Block {
public Eight() {
super(FabricBlockSettings.of(Material.EARTH).strength(3.0f, 0.75f).build());
}
}
5 changes: 5 additions & 0 deletions src/main/java/io/github/squidcraft/item/ItemGroups.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public class ItemGroups {
stacks.add(new ItemStack(SUPER_SQUID_BLOCK)); /*/*/stacks.add(new ItemStack(SUPER_COMPRESS_SQUID_BLOCK));
stacks.add(new ItemStack(ULTIMATE_SQUID_BLOCK));/*/*/stacks.add(new ItemStack(ULTIMATE_COMPRESS_SQUID_BLOCK));

stacks.add(new ItemStack(ONE_SQUID_BLOCK));
stacks.add(new ItemStack(TWO_SQUID_BLOCK));
stacks.add(new ItemStack(FOUR_SQUID_BLOCK));
stacks.add(new ItemStack(EIGHT_SQUID_BLOCK));

stacks.add(new ItemStack(BIGGER_CHEST_BLOCK));

})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ public class BlockRegister {
public static final Block ULTIMATE_COMPRESS_SQUID_BLOCK = new SquidBlock().ultimateCompress();
// Squid blocks end

// Multi squid blocks begin
public static final Block ONE_SQUID_BLOCK = new MultiSquidBlock().one();
public static final Block TWO_SQUID_BLOCK = new MultiSquidBlock().two();
public static final Block FOUR_SQUID_BLOCK = new MultiSquidBlock().four();
public static final Block EIGHT_SQUID_BLOCK = new MultiSquidBlock().eight();
// Multi squid blocks end

public static final Block ANCIENT_DEBRIS = new AncientDebris();
public static final Block NETHERITE_BLOCK = new NetheriteBlock();

Expand All @@ -62,6 +69,13 @@ public BlockRegister() {
registerBlock("ultimate_compress_block", ULTIMATE_COMPRESS_SQUID_BLOCK, new Item.Settings().group(ItemGroups.SQUID_CRAFT).food(new FoodComponent.Builder().hunger(10616832).saturationModifier(10228.200823045267489711934156379f).meat().alwaysEdible().build()));
// Register squid blocks end

// Register multi squid blocks begin
registerBlock("one_squid_block", ONE_SQUID_BLOCK, new Item.Settings().group(ItemGroups.SQUID_CRAFT).food(new FoodComponent.Builder().hunger(14155776).saturationModifier(13637.601097393689986282578875172f).meat().alwaysEdible().build()));
registerBlock("two_squid_block", TWO_SQUID_BLOCK, new Item.Settings().group(ItemGroups.SQUID_CRAFT).food(new FoodComponent.Builder().hunger(18874368).saturationModifier(18183.468129858253315043438500229f).meat().alwaysEdible().build()));
registerBlock("four_squid_block", FOUR_SQUID_BLOCK, new Item.Settings().group(ItemGroups.SQUID_CRAFT).food(new FoodComponent.Builder().hunger(25165824).saturationModifier(24244.624173144337753391251333639f).meat().alwaysEdible().build()));
registerBlock("eight_squid_block", EIGHT_SQUID_BLOCK, new Item.Settings().group(ItemGroups.SQUID_CRAFT).food(new FoodComponent.Builder().hunger(33554432).saturationModifier(32326.165564192450337855001778185f).meat().alwaysEdible().build()));
// Register multi squid blocks end

registerBlock("ancient_debris", ANCIENT_DEBRIS, new Item.Settings().group(ItemGroups.NETHERITE_MOD));
registerBlock("netherite_block", NETHERITE_BLOCK, new Item.Settings().group(ItemGroups.NETHERITE_MOD));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "squidcraft:block/squid_block" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "squidcraft:block/squid_block" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "squidcraft:block/squid_block" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "squidcraft:block/squid_block" }
}
}
5 changes: 5 additions & 0 deletions src/main/resources/assets/squidcraft/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
"block.squidcraft.ultimate_squid_block": "Ultimate Block of Squid",
"block.squidcraft.ultimate_compress_squid_block": "Ultimate Compress Block of Squid",

"block.squidcraft.one_squid_block": "One Block of Squid",
"block.squidcraft.two_squid_block": "Two Block of Squid",
"block.squidcraft.four_squid_block": "Four Block of Squid",
"block.squidcraft.eight_squid_block": "Eight Block of Squid",

"block.squidcraft.ancient_debris": "Ancient Debris",
"block.squidcraft.netherite_block": "Block of Netherite",
"block.squidcraft.bigger_chest_block": "Bigger Chest",
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/assets/squidcraft/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
"block.squidcraft.ultimate_squid_block": "终极鱿鱼块",
"block.squidcraft.ultimate_compress_squid_block": "终极压缩鱿鱼块",

"block.squidcraft.one_squid_block": "一个鱿鱼块",
"block.squidcraft.two_squid_block": "两个鱿鱼块",
"block.squidcraft.four_squid_block": "四个鱿鱼块",
"block.squidcraft.eight_squid_block": "八个鱿鱼块",

"block.squidcraft.ancient_debris": "远古残骸",
"block.squidcraft.netherite_block": "下界合金块",
"block.squidcraft.bigger_chest_block": "大箱子",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "squidcraft:block/squid_block"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "squidcraft:block/squid_block"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "squidcraft:block/squid_block"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "squidcraft:block/squid_block"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "squidcraft:eight_squid_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "squidcraft:four_squid_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "squidcraft:one_squid_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "squidcraft:two_squid_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}
19 changes: 19 additions & 0 deletions src/main/resources/data/squidcraft/recipes/book_shelf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"XXX",
"WWW",
"XXX"
],
"key": {
"W": {
"item": "squidcraft:compress_squid_block"
},
"X": {
"tag": "minecraft:planks"
}
},
"result": {
"item": "minecraft:bookshelf"
}
}
14 changes: 14 additions & 0 deletions src/main/resources/data/squidcraft/recipes/eight_squid_block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "squidcraft:four_squid_block"
},
{
"item": "squidcraft:four_squid_block"
}
],
"result": {
"item": "squidcraft:eight_squid_block"
}
}
14 changes: 14 additions & 0 deletions src/main/resources/data/squidcraft/recipes/four_squid_block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "squidcraft:two_squid_block"
},
{
"item": "squidcraft:two_squid_block"
}
],
"result": {
"item": "squidcraft:four_squid_block"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"W ",
" ",
" "
],
"key": {
"W": {
"item": "squidcraft:eight_squid_block"
}
},
"result": {
"item": "squidcraft:four_squid_block",
"count": 2
}
}
16 changes: 16 additions & 0 deletions src/main/resources/data/squidcraft/recipes/one_squid_block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"WWW",
"WWW",
"WWW"
],
"key": {
"W": {
"item": "squidcraft:super_compress_squid_block"
}
},
"result": {
"item": "squidcraft:one_squid_block"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"W ",
" ",
" "
],
"key": {
"W": {
"item": "squidcraft:two_squid_block"
}
},
"result": {
"item": "squidcraft:one_squid_block",
"count": 2
}
}
14 changes: 14 additions & 0 deletions src/main/resources/data/squidcraft/recipes/two_squid_block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "squidcraft:one_squid_block"
},
{
"item": "squidcraft:one_squid_block"
}
],
"result": {
"item": "squidcraft:two_squid_block"
}
}
Loading

0 comments on commit 07da838

Please sign in to comment.