Skip to content

Commit

Permalink
merge changes for mud recipes, #2427, block model visuals of transfer…
Browse files Browse the repository at this point in the history
… nodes, mattock fix, waxed copper block recipes
  • Loading branch information
Lothrazar committed Oct 19, 2024
2 parents 7233d16 + 460d6e8 commit 2c6c4d8
Show file tree
Hide file tree
Showing 17 changed files with 189 additions and 266 deletions.
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ org.gradle.daemon=false
# as needed run/server.properties : online-mode=false

curse_id=239286
mod_version=1.8.4
mod_version=1.8.5


mc_version=1.19.2
forge_version=43.2.14
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/lothrazar/cyclic/event/EventRender.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void onRenderWorldLast(RenderLevelLastEvent event) {
}
Level world = player.level;
double range = 6F;
float alpha = 0.125F * 2;
final float alpha = 0.125F * 2;
Map<BlockPos, Color> renderCubes = new HashMap<>();
///////////////////// BuilderItem
ItemStack stack = BuilderItem.getIfHeld(player);
Expand All @@ -114,11 +114,11 @@ public void onRenderWorldLast(RenderLevelLastEvent event) {
if (buildStyle.isOffset() && lookingAt.getDirection() != null) {
pos = pos.relative(lookingAt.getDirection());
}
alpha = 0.4F;
//now the item has a build area
List<BlockPos> coordinates = PacketSwapBlock.getSelectedBlocks(world, pos, BuilderItem.getActionType(stack), lookingAt.getDirection(), buildStyle);
for (BlockPos coordinate : coordinates) {
renderCubes.put(coordinate, ClientConfigCyclic.getColor(stack));
RenderUtils.createBox(event.getPoseStack(), coordinate);
// renderCubes.put(coordinate, ClientConfigCyclic.getColor(stack));
}
}
}
Expand Down
30 changes: 6 additions & 24 deletions src/main/java/com/lothrazar/cyclic/item/equipment/MattockItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;
Expand Down Expand Up @@ -70,32 +69,20 @@ else if (sideHit == Direction.EAST || sideHit == Direction.WEST) {
&& player.mayUseItemAt(posCurrent, sideHit, stack)
&& ForgeEventFactory.doPlayerHarvestCheck(player, bsCurrent, true)
&& this.getDestroySpeed(stack, bsCurrent) > 1
&& (bsCurrent.canHarvestBlock(world, pos, player)
|| bsCurrent.is(this.getTier().getTag())
//this.getTier().getTag().contains(bsCurrent.getBlock())
)
&& (bsCurrent.canHarvestBlock(world, pos, player) || bsCurrent.is(this.getTier().getTag()))
//end of OR
) {
stack.mineBlock(world, bsCurrent, posCurrent, player);
Block blockCurrent = bsCurrent.getBlock();
if (world.isClientSide) {
world.levelEvent(2001, posCurrent, Block.getId(bsCurrent));
//removedByPlayer
if (blockCurrent.onDestroyedByPlayer(bsCurrent, world, posCurrent, player, true, bsCurrent.getFluidState())) {
blockCurrent.destroy(world, posCurrent, bsCurrent);
}
// stack.onBlockDestroyed(world, bsCurrent, posCurrent, player);//update tool damage
}
else if (player instanceof ServerPlayer) { //Server side, so this works
ServerPlayer mp = (ServerPlayer) player;
int xpGivenOnDrop = ForgeHooks.onBlockBreakEvent(world, ((ServerPlayer) player).gameMode.getGameModeForPlayer(), (ServerPlayer) player, posCurrent);
else if (player instanceof ServerPlayer mp) { //Server side, so this works
int xpGivenOnDrop = ForgeHooks.onBlockBreakEvent(world, mp.gameMode.getGameModeForPlayer(), mp, posCurrent);
if (xpGivenOnDrop >= 0) {
if (blockCurrent.onDestroyedByPlayer(bsCurrent, world, posCurrent, player, true, bsCurrent.getFluidState())
&& world instanceof ServerLevel) {
BlockEntity tile = world.getBlockEntity(posCurrent);
blockCurrent.destroy(world, posCurrent, bsCurrent);
blockCurrent.playerDestroy(world, player, posCurrent, bsCurrent, tile, stack);
blockCurrent.popExperience((ServerLevel) world, posCurrent, xpGivenOnDrop);
blockCurrent.playerDestroy(world, player, posCurrent, bsCurrent, world.getBlockEntity(posCurrent), stack);
if (blockCurrent.onDestroyedByPlayer(bsCurrent, world, posCurrent, player, true, bsCurrent.getFluidState()) && world instanceof ServerLevel sl) {
blockCurrent.popExperience(sl, posCurrent, xpGivenOnDrop);
}
mp.connection.send(new ClientboundBlockUpdatePacket(world, posCurrent));
}
Expand All @@ -105,11 +92,6 @@ else if (player instanceof ServerPlayer) { //Server side, so this works
}
return super.onBlockStartBreak(stack, pos, player);
}
// @Override
// public int getHarvestLevel(ItemStack stack, net.minecraftforge.common.ToolType tool, Player player, BlockState blockState) {
// return Math.max(Items.DIAMOND_PICKAXE.getHarvestLevel(stack, tool, player, blockState),
// Items.DIAMOND_SHOVEL.getHarvestLevel(stack, tool, player, blockState));
// }

@Override
public float getDestroySpeed(ItemStack stack, BlockState state) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public class ItemRegistry {
public static final RegistryObject<Item> WIRELESS_FLUID = ITEMS.register("wireless_fluid", () -> new BlockItem(BlockRegistry.WIRELESS_FLUID.get(), new Item.Properties().tab(MaterialRegistry.BLOCK_GROUP)));
public static final RegistryObject<Item> BUILD_SCEPTER = ITEMS.register("build_scepter", () -> new BuilderItem(new Item.Properties().tab(MaterialRegistry.ITEM_GROUP), BuildStyle.NORMAL));
public static final RegistryObject<Item> REPLACE_SCEPTER = ITEMS.register("replace_scepter", () -> new BuilderItem(new Item.Properties().tab(MaterialRegistry.ITEM_GROUP), BuildStyle.REPLACE));
public static final RegistryObject<Item> OFFSET_SCEPTER = ITEMS.register("offset_scepter", () -> new BuilderItem(new Item.Properties().tab(MaterialRegistry.ITEM_GROUP), BuildStyle.REPLACE));
public static final RegistryObject<Item> OFFSET_SCEPTER = ITEMS.register("offset_scepter", () -> new BuilderItem(new Item.Properties().tab(MaterialRegistry.ITEM_GROUP), BuildStyle.OFFSET));
public static final RegistryObject<Item> RANDOMIZE_SCEPTER = ITEMS.register("randomize_scepter", () -> new RandomizerItem(new Item.Properties().tab(MaterialRegistry.ITEM_GROUP)));
public static final RegistryObject<Item> SPAWNINSPECTOR = ITEMS.register("spawn_inspector", () -> new SpawnInspectorTool(new Item.Properties().durability(256).tab(MaterialRegistry.ITEM_GROUP)));
public static final RegistryObject<Item> CHARM_WING = ITEMS.register("charm_wing", () -> new CharmWing(new Item.Properties().durability(64).tab(MaterialRegistry.ITEM_GROUP)));
Expand Down
210 changes: 1 addition & 209 deletions src/main/resources/assets/cyclic/models/parent/node_lit.json
Original file line number Diff line number Diff line change
@@ -1,110 +1,7 @@
{
"credit": "Made with Blockbench, a free, modern block model editor by JannisX11",
"elements": [
{
"name": "CR",
"from": [0, 0, 0],
"to": [2, 2, 2],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CR",
"from": [14, 0, 0],
"to": [16, 2, 2],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CR",
"from": [0, 14, 0],
"to": [2, 16, 2],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CR",
"from": [0, 0, 14],
"to": [2, 2, 16],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CR",
"from": [0, 14, 14],
"to": [2, 16, 16],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CR",
"from": [14, 0, 14],
"to": [16, 2, 16],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CR",
"from": [14, 14, 0],
"to": [16, 16, 2],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CR",
"from": [14, 14, 14],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},

{
"name": "Core",
"from": [4, 4, 4],
Expand Down Expand Up @@ -195,111 +92,6 @@
"up": {"uv": [4, 4, 12, 12], "texture": "#plate_back"},
"down": {"uv": [4, 4, 12, 12], "texture": "#plate_front"}
}
},

{
"name": "CI",
"from": [2, 2, 2],
"to": [4, 4, 4],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CI",
"from": [12, 2, 2],
"to": [14, 4, 4],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CI",
"from": [2, 12, 2],
"to": [4, 14, 4],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CI",
"from": [2, 2, 12],
"to": [4, 4, 14],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CI",
"from": [2, 12, 12],
"to": [4, 14, 14],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CI",
"from": [12, 2, 12],
"to": [14, 4, 14],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CI",
"from": [12, 12, 2],
"to": [14, 14, 4],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
},
{
"name": "CI",
"from": [12, 12, 12],
"to": [14, 14, 14],
"faces": {
"north": {"uv": [5, 5, 6, 6], "texture": "#main"},
"east": {"uv": [5, 5, 6,6], "texture": "#main"},
"south": {"uv": [5, 5, 6,6], "texture": "#main"},
"west": {"uv": [5, 5, 6,6], "texture": "#main"},
"up": {"uv": [5, 5, 6,6], "texture": "#main"},
"down": {"uv": [5, 5, 6,6], "texture": "#main"}
}
}
],
"display": {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/data/cyclic/recipes/melter/wax.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"item": "minecraft:honeycomb_block"
}],
"energy": {
"rfpertick": 40,
"rfpertick": 50,
"ticks": 120
},
"result": {
Expand Down
14 changes: 14 additions & 0 deletions src/main/resources/data/cyclic/recipes/melter/wax_comb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"type": "cyclic:melter",
"ingredients":[ {
"item": "minecraft:honeycomb"
}],
"energy": {
"rfpertick": 50,
"ticks": 40
},
"result": {
"fluid": "cyclic:wax",
"count": 250
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"item": "minecraft:redstone_block"
},
{
"item": "minecraft:honeycomb_block"
"item": "minecraft:honeycomb"
}
],
"result": {
Expand Down
22 changes: 22 additions & 0 deletions src/main/resources/data/cyclic/recipes/solidifier/clay.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"type": "cyclic:solidifier",
"ingredients":[{
"item": "minecraft:mud"
},{
"tag": "forge:sand"
},{
"tag": "forge:gravel"
}],
"mix": {
"fluid": "minecraft:water",
"count": 1000
},
"energy": {
"rfpertick": 500,
"ticks": 100
},
"result": {
"item": "minecraft:clay",
"count": 3
}
}
Loading

0 comments on commit 2c6c4d8

Please sign in to comment.