Skip to content

Commit

Permalink
Finished porting fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
Killarexe committed Jun 10, 2024
1 parent b4e7286 commit 540fe01
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ public static <T extends Item> void rustEntityStack(
ItemEntity entity, GameRules.Key<GameRules.IntegerValue> oxidationGameRule, RandomSource random)
{
int count = stack.getCount();
if(level.random.nextFloat() < level.getGameRules().getInt(oxidationGameRule) * BASE_CHANCE / count) {
if(random.nextFloat() < level.getGameRules().getInt(oxidationGameRule) * BASE_CHANCE / count) {
Vec3 pos = entity.position();
ItemEntity newItemEntity = new ItemEntity(level, pos.x, pos.y, pos.z, new ItemStack(nextItem, count));
newItemEntity.copyPosition(entity);
level.addFreshEntity(newItemEntity);
entity.kill();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"###"
],
"result": {
"item": "minecraft:exposed_copper"
},
"show_notification": true
"id": "minecraft:exposed_copper"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"###"
],
"result": {
"item": "minecraft:oxidized_copper"
},
"show_notification": true
"id": "minecraft:oxidized_copper"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"###"
],
"result": {
"item": "minecraft:waxed_copper_block"
},
"show_notification": true
"id": "minecraft:waxed_copper_block"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
}
],
"result": {
"item": "copper_extension:waxed_copper_ingot"
"id": "copper_extension:waxed_copper_ingot"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"###"
],
"result": {
"item": "minecraft:waxed_exposed_copper"
},
"show_notification": true
"id": "minecraft:waxed_exposed_copper"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
}
],
"result": {
"item": "copper_extension:waxed_exposed_copper_ingot"
"id": "copper_extension:waxed_exposed_copper_ingot"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"###"
],
"result": {
"item": "minecraft:waxed_oxidized_copper"
},
"show_notification": true
"id": "minecraft:waxed_oxidized_copper"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
}
],
"result": {
"item": "copper_extension:waxed_oxidized_copper_ingot"
"id": "copper_extension:waxed_oxidized_copper_ingot"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"###"
],
"result": {
"item": "minecraft:waxed_weathered_copper"
},
"show_notification": true
"id": "minecraft:waxed_weathered_copper"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
}
],
"result": {
"item": "copper_extension:waxed_weathered_copper_ingot"
"id": "copper_extension:waxed_weathered_copper_ingot"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"###"
],
"result": {
"item": "minecraft:weathered_copper"
},
"show_notification": true
"id": "minecraft:weathered_copper"
}
}
15 changes: 15 additions & 0 deletions fabric/src/main/resources/copper_extension.mixins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"required": true,
"minVersion": "0.8",
"package": "github.killarexe.copper_extension.fabric.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [],
"client": [
"ItemEntityMixin",
"ItemMixin"
],
"server": [],
"injectors": {
"defaultRequire": 1
}
}
5 changes: 4 additions & 1 deletion fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@
"depends": {
"fabric": "*",
"minecraft": ">=${minecraft_version}"
}
},
"mixins": [
"copper_extension.mixins.json"
]
}
20 changes: 4 additions & 16 deletions neoforge/update.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
{
"homepage": "https://github.com/Killarexe/Copper-Extension",
"1.20.1": {
"1.0.0": "Added rusted coppers, crafts and beehive feature..."
},
"1.20.2": {
"1.1.0": "Add scrapping for copper ingots, Patch bugs.",
"1.2.0": "The Axe can now break from scrapping action"
},
"1.20.4": {
"1.2.1": "Update to 1.20.4, Patch oxidation in inventory, Add copperOxidationChance GameRule",
"1.3.0": "Switched the project to architectury and added a new item"
"1.20.6": {
"1.3.0": "Added rusted coppers, crafts and beehive feature..."
},
"promos": {
"1.20.1-lastest": "1.0.0",
"1.20.1-recommended": "1.0.0",
"1.20.2-lastest": "1.2.0",
"1.20.2-recommended": "1.2.0",
"1.20.4-lastest": "1.3.0",
"1.20.4-recommended": "1.3.0"
"1.20.6-lastest": "1.3.0",
"1.20.6-recommended": "1.3.0"
}
}

0 comments on commit 540fe01

Please sign in to comment.