Ready to go!

This commit is contained in:
oitsjustjose 2022-10-25 19:53:21 -05:00
commit 7b6e540654
5 changed files with 38 additions and 114 deletions

BIN
CE Logo.psd Normal file

Binary file not shown.

View file

@ -101,19 +101,20 @@ artifacts {
archives sourcesJar
}
// curseforge {
// apiKey = project.hasProperty("CURSEFORGE_API_KEY") ? project.CURSEFORGE_API_KEY : ""
// project {
// id = '238048'
// changelogType = 'markdown'
// changelog = file("./changelog.md")
// releaseType = 'release'
// addGameVersion "1.18.2"
// mainArtifact(jar) {
// displayName = "V-Tweaks ${game_version} ${mod_version}"
// }
// }
// }
curseforge {
apiKey = project.hasProperty("CURSEFORGE_API_KEY") ? project.CURSEFORGE_API_KEY : ""
project {
id = '693885'
changelogType = 'markdown'
changelog = file("./changelog.md")
releaseType = 'release'
addGameVersion "1.19"
addGameVersion "1.19.1"
mainArtifact(jar) {
displayName = "Charged Explosives ${game_version} ${mod_version}"
}
}
}
publishing {
publications {

View file

@ -1,93 +1,5 @@
# V-Tweaks Changelog MC 1.19.x
# Charged Explosives Changelog (1.19)
## Should work on 1.19.1 and .2, but this has not been tested.
## 1.0.0
## 3.6.5
### Added
- New `vtweaks:anvil` recipe type -- see below!
### Changed
- Huge internal refactor of code
- Lumbering and Imperishable will not disappear when disabled, but will not function
- Recipes for Enchanted Books now use `vtweaks:anvil` recipes to control inputs and cost
### `vtweaks:anvil`
Inputs AND outputs can have NBT defined for them! This recipe type performs a **_soft_** NBT comparison.
Example: if your item is defined as `{"item": "minecraft:stick", "nbt": { "Damage": 0 }}`, then if you input a stick
with enchantments or other NBT it will **succeed** so long as the NBT matches at the bare minimum the NBT defined in the
recipe (in this case, `{Damage:0}`).
`imperishable.json`:
```json
{
"type": "vtweaks:anvil",
"left": {
"item": "minecraft:enchanted_book",
"nbt": {
"StoredEnchantments": [
{
"id": "minecraft:unbreaking",
"lvl": 3
}
]
}
},
"right": {
"item": "minecraft:enchanted_book",
"nbt": {
"StoredEnchantments": [
{
"id": "minecraft:unbreaking",
"lvl": 3
}
]
}
},
"result": {
"item": "minecraft:enchanted_book",
"nbt": {
"StoredEnchantments": [
{
"id": "vtweaks:imperishable",
"lvl": 1
}
]
}
},
"cost": 24
}
```
`lumbering.json`:
```json
{
"type": "vtweaks:anvil",
"left": {
"item": "minecraft:writable_book"
},
"right": {
"item": "minecraft:golden_axe",
"nbt": {
"Damage": 0
}
},
"result": {
"item": "minecraft:enchanted_book",
"nbt": {
"StoredEnchantments": [
{
"id": "vtweaks:lumbering",
"lvl": 1
}
]
}
},
"cost": 16
}
```
Initial Release

View file

@ -6,6 +6,7 @@ import net.minecraft.core.particles.ParticleTypes;
import net.minecraftforge.fml.LogicalSide;
import net.minecraftforge.network.NetworkEvent;
import java.util.NoSuchElementException;
import java.util.function.Supplier;
public class ClientExplosionParticlePacket {
@ -15,14 +16,17 @@ public class ClientExplosionParticlePacket {
double g = 0.0D;
if (ctx.get().getDirection().getReceptionSide() == LogicalSide.CLIENT) {
ctx.get().enqueueWork(() -> {
if (Minecraft.getInstance().level != null) {
Minecraft.getInstance().level.addParticle(
ParticleTypes.EXPLOSION,
(double) pkt.pos.getX() + 0.5D,
(double) pkt.pos.getY() + 0.5D,
(double) pkt.pos.getZ() + 0.5D,
e,f,g
);
try {
if (Minecraft.getInstance().level != null) {
Minecraft.getInstance().level.addParticle(
ParticleTypes.EXPLOSION,
(double) pkt.pos.getX() + 0.5D,
(double) pkt.pos.getY() + 0.5D,
(double) pkt.pos.getZ() + 0.5D,
e, f, g
);
}
} catch (NoSuchElementException ignored) {
}
});
ctx.get().setPacketHandled(true);

View file

@ -5,6 +5,7 @@ import com.oitsjustjose.charged_explosives.common.network.PreviewExplosionPacket
import net.minecraftforge.fml.LogicalSide;
import net.minecraftforge.network.NetworkEvent;
import java.util.NoSuchElementException;
import java.util.function.Supplier;
public class ClientPreviewExplosionPacket {
@ -12,9 +13,15 @@ public class ClientPreviewExplosionPacket {
if (ctx.get().getDirection().getReceptionSide() == LogicalSide.CLIENT) {
ctx.get().enqueueWork(() -> {
if (pkt.action.equals(PreviewExplosionPacket.ACTION_ADD)) {
ClientProxy.bdRenderer.addExplosion(pkt.corners);
try {
ClientProxy.bdRenderer.addExplosion(pkt.corners);
} catch (NoSuchElementException ignored) {
}
} else if (pkt.action.equals(PreviewExplosionPacket.ACTION_REMOVE)) {
ClientProxy.bdRenderer.removeExplosion(pkt.corners);
try {
ClientProxy.bdRenderer.removeExplosion(pkt.corners);
} catch (NoSuchElementException ignored) {
}
}
});
ctx.get().setPacketHandled(true);