Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 86e640ab32 | |||
| 958364907d | |||
| 45937ee33d | |||
| dc81f5e8da |
18
build.gradle
18
build.gradle
@ -14,7 +14,7 @@ base {
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
|
||||
minecraft {
|
||||
@ -77,12 +77,6 @@ minecraft {
|
||||
// You can set various levels here.
|
||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
mods {
|
||||
"${mod_id}" {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
client {
|
||||
@ -136,8 +130,8 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||
implementation fg.deobf("curse.maven:guidebook-253874:4593765")
|
||||
implementation fg.deobf("curse.maven:patchouli-306770:4633797")
|
||||
|
||||
implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } }
|
||||
}
|
||||
|
||||
// This block of code expands all declared replace properties in the specified resource targets.
|
||||
@ -177,3 +171,9 @@ tasks.named('jar', Jar).configure {
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
|
||||
}
|
||||
|
||||
sourceSets.each {
|
||||
def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
|
||||
it.output.resourcesDir = dir
|
||||
it.java.destinationDirectory = dir
|
||||
}
|
||||
@ -1,14 +1,13 @@
|
||||
# CreateCoredumpOnCrash only works on jdk9+
|
||||
org.gradle.jvmargs=-Xmx3G -XX:-CreateCoredumpOnCrash
|
||||
org.gradle.daemon=false
|
||||
|
||||
minecraft_version=1.20.1
|
||||
minecraft_version_range=[1.20.1,1.20.2]
|
||||
forge_version=47.3.22
|
||||
forge_version_range=[47,)
|
||||
loader_version_range=[47,)
|
||||
minecraft_version=1.20.6
|
||||
minecraft_version_range=[1.20.6]
|
||||
forge_version=50.1.0
|
||||
forge_version_range=[50,)
|
||||
loader_version_range=[50,)
|
||||
mapping_channel=parchment
|
||||
mapping_version=2023.09.03-1.20.1
|
||||
mapping_version=2024.06.16-1.20.6
|
||||
|
||||
mod_id=enhancedexplosives
|
||||
mod_name=Enhanced Explosives
|
||||
|
||||
@ -5,7 +5,6 @@ import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.projectile.AbstractArrow;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -14,15 +13,15 @@ public class baseArrow extends AbstractArrow {
|
||||
private int tick = 0;
|
||||
|
||||
public baseArrow(EntityType<? extends baseArrow> pEntityType, Level pLevel) {
|
||||
super(pEntityType, pLevel);
|
||||
super(pEntityType, pLevel, ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
public baseArrow(Level pLevel, LivingEntity pShooter, EntityType<? extends baseArrow> pEntityType) {
|
||||
super(pEntityType, pShooter, pLevel);
|
||||
super(pEntityType, pShooter, pLevel, ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
public baseArrow(Level pLevel, EntityType<? extends baseArrow> pEntityType) {
|
||||
super(pEntityType, pLevel);
|
||||
super(pEntityType, pLevel, ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
@ -37,7 +36,12 @@ public class baseArrow extends AbstractArrow {
|
||||
|
||||
@NotNull
|
||||
protected ItemStack getPickupItem() {
|
||||
return new ItemStack(Items.ARROW);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack getDefaultPickupItem() {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
protected Vec3 particlePos(double dist) {
|
||||
|
||||
@ -2,15 +2,12 @@ package com.jenny.enhancedexplosives.entities.arrows;
|
||||
|
||||
import com.jenny.enhancedexplosives.config.ConfigClient;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.items.items;
|
||||
import com.jenny.enhancedexplosives.particles.particles;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class carpetArrow extends baseArrow {
|
||||
public final int childCount = 32;
|
||||
@ -47,11 +44,6 @@ public class carpetArrow extends baseArrow {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected ItemStack getPickupItem() {
|
||||
return new ItemStack(items.CARPET_ARROW.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnParticles(float partialTicks) {
|
||||
for (int i = 1; i <= ConfigClient.calcPCount(5); i++) {
|
||||
|
||||
@ -3,13 +3,11 @@ package com.jenny.enhancedexplosives.entities.arrows;
|
||||
import com.jenny.enhancedexplosives.config.ConfigClient;
|
||||
import com.jenny.enhancedexplosives.config.ConfigServer;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.items.items;
|
||||
import com.jenny.enhancedexplosives.particles.particles;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.damagesource.DamageTypes;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -48,11 +46,6 @@ public class carpetArrowPart extends baseArrow {
|
||||
return super.hurt(pSource, pAmount) || pSource.is(DamageTypes.EXPLOSION);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected ItemStack getPickupItem() {
|
||||
return new ItemStack(items.CONCUSSIVE_ARROW.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnParticles(float partialTicks) {
|
||||
for (int i = 1; i <= ConfigClient.calcPCount(1); i++) {
|
||||
|
||||
@ -2,10 +2,8 @@ package com.jenny.enhancedexplosives.entities.arrows;
|
||||
|
||||
import com.jenny.enhancedexplosives.config.ConfigServer;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.items.items;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -33,10 +31,4 @@ public class claymoreArrow extends baseArrow{
|
||||
discard();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
protected ItemStack getPickupItem() {
|
||||
return new ItemStack(items.CONCUSSIVE_ARROW.get(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,11 +2,9 @@ package com.jenny.enhancedexplosives.entities.arrows;
|
||||
|
||||
import com.jenny.enhancedexplosives.config.ConfigClient;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.items.items;
|
||||
import com.jenny.enhancedexplosives.particles.particles;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -35,11 +33,6 @@ public class concussiveArrow extends baseArrow{
|
||||
this.discard();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected ItemStack getPickupItem() {
|
||||
return new ItemStack(items.CONCUSSIVE_ARROW.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnParticles(float partialTicks) {
|
||||
for (int i = 1; i <= ConfigClient.calcPCount(5); i++) {
|
||||
|
||||
@ -2,11 +2,9 @@ package com.jenny.enhancedexplosives.entities.arrows;
|
||||
|
||||
import com.jenny.enhancedexplosives.config.ConfigClient;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.items.items;
|
||||
import com.jenny.enhancedexplosives.particles.particles;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -35,11 +33,6 @@ public class tntArrow extends baseArrow {
|
||||
this.discard();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected ItemStack getPickupItem() {
|
||||
return new ItemStack(items.TNT_ARROW.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnParticles(float partialTicks) {
|
||||
for (int i = 1; i <= ConfigClient.calcPCount(5); i++) {
|
||||
|
||||
@ -102,9 +102,10 @@ public abstract class basePrimedTNT extends Entity implements TraceableEntity {
|
||||
return MovementEmission.NONE;
|
||||
}
|
||||
|
||||
protected void defineSynchedData() {
|
||||
this.entityData.define(DATA_FUSE_ID, 80);
|
||||
this.entityData.define(DATA_POWER_ID, 4.0f);
|
||||
@Override
|
||||
protected void defineSynchedData(SynchedEntityData.@NotNull Builder builder) {
|
||||
builder.define(DATA_FUSE_ID, 80);
|
||||
builder.define(DATA_POWER_ID, 4.0f);
|
||||
}
|
||||
|
||||
protected void addAdditionalSaveData(CompoundTag pCompound) {
|
||||
|
||||
@ -6,11 +6,14 @@ import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.network.syncher.EntityDataSerializers;
|
||||
import net.minecraft.network.syncher.SynchedEntityData;
|
||||
import net.minecraft.world.entity.*;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
@ -83,9 +86,9 @@ public class blackHolePrimedTNT extends basePrimedTNT {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void defineSynchedData() {
|
||||
this.entityData.define(DATA_SPEED_ID, 4.0f);
|
||||
super.defineSynchedData();
|
||||
protected void defineSynchedData(SynchedEntityData.@NotNull Builder builder) {
|
||||
builder.define(DATA_SPEED_ID, 4.0f);
|
||||
super.defineSynchedData(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -14,6 +14,7 @@ import net.minecraft.world.entity.projectile.Projectile;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@ -72,9 +73,9 @@ public class claymorePrimedTNT extends basePrimedTNT {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void defineSynchedData() {
|
||||
this.entityData.define(DATA_PCOUNT_ID, 16);
|
||||
super.defineSynchedData();
|
||||
protected void defineSynchedData(SynchedEntityData.@NotNull Builder builder) {
|
||||
builder.define(DATA_PCOUNT_ID, 16);
|
||||
super.defineSynchedData(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -16,6 +16,7 @@ import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
@ -116,9 +117,9 @@ public class homingPrimedTNT extends basePrimedTNT {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void defineSynchedData() {
|
||||
this.entityData.define(DATA_SPEED_ID, 4.0f);
|
||||
super.defineSynchedData();
|
||||
protected void defineSynchedData(SynchedEntityData.@NotNull Builder builder) {
|
||||
builder.define(DATA_SPEED_ID, 4.0f);
|
||||
super.defineSynchedData(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -13,6 +13,7 @@ import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
@ -86,9 +87,9 @@ public class repulsivePrimedTNT extends basePrimedTNT {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void defineSynchedData() {
|
||||
this.entityData.define(DATA_SPEED_ID, 4.0f);
|
||||
super.defineSynchedData();
|
||||
protected void defineSynchedData(SynchedEntityData.@NotNull Builder builder) {
|
||||
builder.define(DATA_SPEED_ID, 4.0f);
|
||||
super.defineSynchedData(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -11,7 +11,6 @@ import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -23,12 +22,12 @@ public abstract class ArrowAbstract extends ArrowItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(@NotNull ItemStack pStack, @Nullable Level pLevel, @NotNull List<Component> pTooltipComponents, @NotNull TooltipFlag pIsAdvanced) {
|
||||
public void appendHoverText(@NotNull ItemStack pStack, @NotNull TooltipContext pContext, @NotNull List<Component> pTooltipComponents, @NotNull TooltipFlag pTooltipFlag) {
|
||||
String key = String.format("tooltip.%s.%s", MODID, this);
|
||||
MutableComponent toolTip = Component.translatable(key);
|
||||
if (!toolTip.getString().equals(key)) {
|
||||
pTooltipComponents.add(toolTip.withStyle(ChatFormatting.DARK_BLUE));
|
||||
super.appendHoverText(pStack, pLevel, pTooltipComponents, pIsAdvanced);
|
||||
super.appendHoverText(pStack, pContext, pTooltipComponents, pTooltipFlag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,10 +7,8 @@ import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -22,12 +20,12 @@ public class BlockItemTooltip extends BlockItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(@NotNull ItemStack pStack, @Nullable Level pLevel, @NotNull List<Component> pTooltipComponents, @NotNull TooltipFlag pIsAdvanced) {
|
||||
public void appendHoverText(@NotNull ItemStack pStack, @NotNull TooltipContext pContext, @NotNull List<Component> pTooltipComponents, @NotNull TooltipFlag pTooltipFlag) {
|
||||
String key = String.format("tooltip.%s.%s", MODID, this);
|
||||
MutableComponent toolTip = Component.translatable(key);
|
||||
if (!toolTip.getString().equals(key)) {
|
||||
pTooltipComponents.add(toolTip.withStyle(ChatFormatting.DARK_BLUE));
|
||||
super.appendHoverText(pStack, pLevel, pTooltipComponents, pIsAdvanced);
|
||||
super.appendHoverText(pStack, pContext, pTooltipComponents, pTooltipFlag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,6 @@ import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -43,12 +42,12 @@ public class Dynamite extends Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(@NotNull ItemStack pStack, @Nullable Level pLevel, @NotNull List<Component> pTooltipComponents, @NotNull TooltipFlag pIsAdvanced) {
|
||||
public void appendHoverText(@NotNull ItemStack pStack, @NotNull TooltipContext pContext, @NotNull List<Component> pTooltipComponents, @NotNull TooltipFlag pTooltipFlag) {
|
||||
String key = String.format("tooltip.%s.%s", MODID, this);
|
||||
MutableComponent toolTip = Component.translatable(key);
|
||||
if (!toolTip.getString().equals(key)) {
|
||||
pTooltipComponents.add(toolTip.withStyle(ChatFormatting.DARK_BLUE));
|
||||
super.appendHoverText(pStack, pLevel, pTooltipComponents, pIsAdvanced);
|
||||
super.appendHoverText(pStack, pContext, pTooltipComponents, pTooltipFlag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,18 @@
|
||||
package com.jenny.enhancedexplosives.items;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.arrows.baseArrow;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Position;
|
||||
import net.minecraft.core.dispenser.AbstractProjectileDispenseBehavior;
|
||||
import net.minecraft.core.dispenser.BlockSource;
|
||||
import net.minecraft.core.dispenser.DefaultDispenseItemBehavior;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.projectile.AbstractArrow;
|
||||
import net.minecraft.world.entity.projectile.Projectile;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.ProjectileItem;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.DispenserBlock;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
@ -33,26 +35,38 @@ public class items {
|
||||
}
|
||||
|
||||
public static void registerDispenser() {
|
||||
class ArrowDispenseBehaviour extends AbstractProjectileDispenseBehavior {
|
||||
private final EntityType<? extends baseArrow> arrowType;
|
||||
class ArrowDispenseBehaviour extends DefaultDispenseItemBehavior {
|
||||
private final ArrowAbstract.DispenseConfig dispenseConfig;
|
||||
private final EntityType<? extends Entity> arrowType;
|
||||
|
||||
public ArrowDispenseBehaviour(EntityType<? extends baseArrow> arrow) {
|
||||
public ArrowDispenseBehaviour(@NotNull ProjectileItem arrowItem, EntityType<? extends Entity> arrow) {
|
||||
this.dispenseConfig = arrowItem.createDispenseConfig();
|
||||
this.arrowType = arrow;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @NotNull Projectile getProjectile(@NotNull Level pLevel, @NotNull Position pPosition, @NotNull ItemStack pStack) {
|
||||
baseArrow arrow = arrowType.create(pLevel);
|
||||
assert arrow != null;
|
||||
arrow.setPos(pPosition.x(), pPosition.y(), pPosition.z());
|
||||
arrow.pickup = AbstractArrow.Pickup.ALLOWED;
|
||||
return arrow;
|
||||
public @NotNull ItemStack execute(@NotNull BlockSource pBlockSource, @NotNull ItemStack pItem) {
|
||||
Level level = pBlockSource.level();
|
||||
Direction dir = pBlockSource.state().getValue(DispenserBlock.FACING);
|
||||
Position pos = this.dispenseConfig.positionFunction().getDispensePosition(pBlockSource, dir);
|
||||
|
||||
Entity arrowEntity = arrowType.create(level);
|
||||
assert arrowEntity != null;
|
||||
arrowEntity.setPos(new Vec3(pos.x(), pos.y(), pos.z()));
|
||||
arrowEntity.setDeltaMovement(dir.getStepX(), dir.getStepY(), dir.getStepZ());
|
||||
level.addFreshEntity(arrowEntity);
|
||||
pItem.shrink(1);
|
||||
return pItem;
|
||||
}
|
||||
}
|
||||
|
||||
DispenserBlock.registerBehavior(TNT_ARROW.get(), new ArrowDispenseBehaviour(entities.ARROW_TNT.get()));
|
||||
DispenserBlock.registerBehavior(CONCUSSIVE_ARROW.get(), new ArrowDispenseBehaviour(entities.ARROW_CONCUSSIVE.get()));
|
||||
DispenserBlock.registerBehavior(CARPET_ARROW.get(), new ArrowDispenseBehaviour(entities.ARROW_CARPET.get()));
|
||||
DispenserBlock.registerBehavior(TUNNEL_ARROW.get(), new ArrowDispenseBehaviour(entities.ARROW_TUNNEL.get()));
|
||||
DispenserBlock.registerBehavior(TNT_ARROW.get(), new ArrowDispenseBehaviour(
|
||||
(ArrowAbstract) TNT_ARROW.get(), entities.ARROW_TNT.get()));
|
||||
DispenserBlock.registerBehavior(CONCUSSIVE_ARROW.get(), new ArrowDispenseBehaviour(
|
||||
(ArrowAbstract) TNT_ARROW.get(), entities.ARROW_CONCUSSIVE.get()));
|
||||
DispenserBlock.registerBehavior(CARPET_ARROW.get(), new ArrowDispenseBehaviour(
|
||||
(ArrowAbstract) CARPET_ARROW.get(), entities.ARROW_CARPET.get()));
|
||||
DispenserBlock.registerBehavior(TUNNEL_ARROW.get(), new ArrowDispenseBehaviour(
|
||||
(ArrowAbstract) TUNNEL_ARROW.get(), entities.ARROW_TUNNEL.get()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,16 +21,4 @@ modId = "minecraft"
|
||||
mandatory = true
|
||||
versionRange = "${minecraft_version_range}"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
[[dependencies."${mod_id}"]]
|
||||
modId = "gbook"
|
||||
mandatory = false
|
||||
versionRange = "[1.7.3,)"
|
||||
ordering = "BEFORE"
|
||||
side = "BOTH"
|
||||
[[dependencies."${mod_id}"]]
|
||||
modId = "patchouli"
|
||||
mandatory = false
|
||||
versionRange = "[1.0.6,)"
|
||||
ordering = "BEFORE"
|
||||
side = "BOTH"
|
||||
@ -1,152 +0,0 @@
|
||||
<book title="Enhanced Explosives">
|
||||
<include ref="gbook:xml/standard.xml"/>
|
||||
<chapter id="ch_landing">
|
||||
<section id="se_landing">
|
||||
<page_title>
|
||||
<title>Content</title>
|
||||
</page_title>
|
||||
<title>TNTs</title>
|
||||
<link ref=":se_compressed_tnt">Compressed TNT</link>
|
||||
<link ref=":se_cluster_tnt">Cluster TNT</link>
|
||||
<link ref=":se_homing_tnt">Homing TNT</link>
|
||||
<link ref=":se_black_hole_tnt">Black Hole TNT</link>
|
||||
<link ref=":se_claymore_tnt">Claymore TNT</link>
|
||||
<link ref=":se_selective_tnt">Selective</link>
|
||||
<link ref=":se_ender_tnt">Ender TNT</link>
|
||||
<link ref=":se_repulsive_tnt">Repulsive TNT</link>
|
||||
<link ref=":se_bedrock_tnt">Bedrock TNT</link>
|
||||
<link ref=":se_entity_tnt">Entity TNT</link>
|
||||
<title>Arrows</title>
|
||||
<link ref=":ch_tnt_arrow">TNT Arrow</link>
|
||||
<link ref=":se_concussive_arrow">Concussive Arrow</link>
|
||||
<link ref=":se_carpet_arrow">Carpet Bombing Arrow</link>
|
||||
<link ref=":se_tunnel_arrow">Tunnel Arrow</link>
|
||||
<title>Other</title>
|
||||
<link ref=":se_dynamite">Dynamite</link>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_compressed_tnt">
|
||||
<section id="se_compressed_tnt">
|
||||
<page_title>
|
||||
<title>Compressed TNT</title>
|
||||
</page_title>
|
||||
<p>These TNTs are stronger than vanilla TNT. They are crafted from 4 TNTs of the previous stage and offer
|
||||
double the explosion strength.
|
||||
</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_cluster_tnt">
|
||||
<section id="se_cluster_tnt">
|
||||
<page_title>
|
||||
<title>Cluster TNT</title>
|
||||
</page_title>
|
||||
<p>These TNTs spawn multiple smaller TNTs when primed. Each spawned TNT is as strong as vanilla TNT.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_homing_tnt">
|
||||
<section id="se_homing_tnt">
|
||||
<page_title>
|
||||
<title>Homing TNT</title>
|
||||
</page_title>
|
||||
<p>This TNT targets the closest mob and moves towards it.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_black_hole_tnt">
|
||||
<section id="se_black_hole_tnt">
|
||||
<page_title>
|
||||
<title>Black Hole TNT</title>
|
||||
</page_title>
|
||||
<p>This TNT attracts close entities towards itself before exploding.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_claymore_tnt">
|
||||
<section id="se_claymore_tnt">
|
||||
<page_title>
|
||||
<title>Claymore TNT</title>
|
||||
</page_title>
|
||||
<p>This TNT shoots many arrows in a circle around the TNT, instead of exploding.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_selective_tnt">
|
||||
<section id="se_selective_tnt">
|
||||
<page_title>
|
||||
<title>Selective TNT</title>
|
||||
</page_title>
|
||||
<p>This TNT will only destroy the type of block it is sitting upon when exploding. It will still honour the
|
||||
blocks blast resistance, e.g. it won't destroy bedrock.
|
||||
</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_ender_tnt">
|
||||
<section id="se_ender_tnt">
|
||||
<page_title>
|
||||
<title>Ender TNT</title>
|
||||
</page_title>
|
||||
<p>This TNT will teleport randomly teleport when primed.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_repulsive_tnt">
|
||||
<section id="se_repulsive_tnt">
|
||||
<page_title>
|
||||
<title>Repulsive TNT</title>
|
||||
</page_title>
|
||||
<p>This TNT will push entities away when primed.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_bedrock_tnt">
|
||||
<section id="se_bedrock_tnt">
|
||||
<page_title>
|
||||
<title>Bedrock TNT</title>
|
||||
</page_title>
|
||||
<p>This TNT will destroy the one bedrock block below it.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_entity_tnt">
|
||||
<section id="se_entity_tnt">
|
||||
<page_title>
|
||||
<title>Entity TNT</title>
|
||||
</page_title>
|
||||
<p>This TNT won't destroy blocks but hurt entities.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_tnt_arrow">
|
||||
<section id="se_tnt_arrow">
|
||||
<page_title>
|
||||
<title>TNT Arrow</title>
|
||||
</page_title>
|
||||
<p>This arrow explodes on impact with half the strength of TNT.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_concussive_arrow">
|
||||
<section id="se_concussive_arrow">
|
||||
<page_title>
|
||||
<title>TNT Arrow</title>
|
||||
</page_title>
|
||||
<p>This arrow explodes on impact without damaging blocks.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_carpet_arrow">
|
||||
<section id="se_carpet_arrow">
|
||||
<page_title>
|
||||
<title>Carpet Bombing Arrow</title>
|
||||
</page_title>
|
||||
<p>This arrow splits into many Concussive Arrows as soon as it starts falling.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_tunnel_arrow">
|
||||
<section id="se_tunnel_arrow">
|
||||
<page_title>
|
||||
<title>Tunnel Arrow</title>
|
||||
</page_title>
|
||||
<p>This arrow spawns multiple explosions in a line equivalent to its direction on hit.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter id="ch_dynamite">
|
||||
<section id="se_dynamite">
|
||||
<page_title>
|
||||
<title>Dynamite</title>
|
||||
</page_title>
|
||||
<p>Dynamite can be thrown like a potion and explodes with the strength of vanilla TNT.</p>
|
||||
</section>
|
||||
</chapter>
|
||||
</book>
|
||||
@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "Arrows",
|
||||
"description": "These are all new arrows",
|
||||
"icon": "minecraft:arrow"
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "Others",
|
||||
"description": "Some other new stuff",
|
||||
"icon": "minecraft:bedrock"
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "TNTs",
|
||||
"description": "These are all new TNTs",
|
||||
"icon": "minecraft:tnt"
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Carpet Bombing Arrow",
|
||||
"icon": "enhancedexplosives:arrow_carpet",
|
||||
"category": "enhancedexplosives:arrows",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This arrow splits into many explosive arrows as soon as it starts falling. Whether the arrows are concussive or TNT Arrows depends on the config.",
|
||||
"recipe": "enhancedexplosives:arrow_carpet"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Concussive Arrow",
|
||||
"icon": "enhancedexplosives:arrow_concussive",
|
||||
"category": "enhancedexplosives:arrows",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This arrow explodes like TNT on impact, but without damaging blocks.",
|
||||
"recipe": "enhancedexplosives:arrow_concussive"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "TNT Arrow",
|
||||
"icon": "enhancedexplosives:arrow_tnt",
|
||||
"category": "enhancedexplosives:arrows",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This arrow explodes like TNT on impact.",
|
||||
"recipe": "enhancedexplosives:arrow_tnt"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Tunnel Arrow",
|
||||
"icon": "enhancedexplosives:arrow_tunnel",
|
||||
"category": "enhancedexplosives:arrows",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This arrow summons multiple explosions in front of it, along it's direction on impact, forming a tunnel in front.",
|
||||
"recipe": "enhancedexplosives:arrow_tunnel"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Dynamite",
|
||||
"icon": "enhancedexplosives:dynamite",
|
||||
"category": "enhancedexplosives:other",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "Can be thrown like a splash potion, but bounces on the ground and explodes like a tnt.",
|
||||
"recipe": "enhancedexplosives:dynamite"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Quintuple Compressed TNT",
|
||||
"icon": "enhancedexplosives:tnt_128",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT behaves like vanilla TNT, but with 32x the explosion strength.",
|
||||
"recipe": "enhancedexplosives:tnt_128"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Double Compressed TNT",
|
||||
"icon": "enhancedexplosives:tnt_16",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT behaves like vanilla TNT, but with 4x the explosion strength.",
|
||||
"recipe": "enhancedexplosives:tnt_16"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Triple Compressed TNT",
|
||||
"icon": "enhancedexplosives:tnt_32",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT behaves like vanilla TNT, but with 8x the explosion strength.",
|
||||
"recipe": "enhancedexplosives:tnt_32"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Quadruple Compressed TNT",
|
||||
"icon": "enhancedexplosives:tnt_64",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT behaves like vanilla TNT, but with 16x the explosion strength.",
|
||||
"recipe": "enhancedexplosives:tnt_64"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Compressed TNT",
|
||||
"icon": "enhancedexplosives:tnt_8",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT behaves like vanilla TNT, but with 2x the explosion strength.",
|
||||
"recipe": "enhancedexplosives:tnt_8"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Bedrock TNT",
|
||||
"icon": "enhancedexplosives:tnt_bedrock",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT removes the block below it if it's bedrock.",
|
||||
"recipe": "enhancedexplosives:tnt_bedrock"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Black Hole TNT",
|
||||
"icon": "enhancedexplosives:tnt_black_hole",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT pulls entities towards itself.",
|
||||
"recipe": "enhancedexplosives:tnt_black_hole"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Claymore TNT",
|
||||
"icon": "enhancedexplosives:tnt_claymore",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT shoots many arrows in a circle around the TNT, instead of exploding.",
|
||||
"recipe": "enhancedexplosives:tnt_claymore"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "2× TNT Cluster",
|
||||
"icon": "enhancedexplosives:tnt_cluster_2",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT splits into 2 smaller TNTs when primed",
|
||||
"recipe": "enhancedexplosives:tnt_cluster_2"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "4× TNT Cluster",
|
||||
"icon": "enhancedexplosives:tnt_cluster_4",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT splits into 4 smaller TNTs when primed",
|
||||
"recipe": "enhancedexplosives:tnt_cluster_4"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "8× TNT Cluster",
|
||||
"icon": "enhancedexplosives:tnt_cluster_8",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT splits into 8 smaller TNTs when primed",
|
||||
"recipe": "enhancedexplosives:tnt_cluster_8"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Ender TNT",
|
||||
"icon": "enhancedexplosives:tnt_ender",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT teleports like an enderman when primed.",
|
||||
"recipe": "enhancedexplosives:tnt_ender"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Entity TNT",
|
||||
"icon": "enhancedexplosives:tnt_entity",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT does not damage blocks.",
|
||||
"recipe": "enhancedexplosives:tnt_entity"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Homing TNT",
|
||||
"icon": "enhancedexplosives:tnt_homing",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT follows the closest mob.",
|
||||
"recipe": "enhancedexplosives:tnt_homing"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Repulsive TNT",
|
||||
"icon": "enhancedexplosives:tnt_repulsive",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT pushes close entities away.",
|
||||
"recipe": "enhancedexplosives:tnt_repulsive"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "Selective TNT",
|
||||
"icon": "enhancedexplosives:tnt_selective",
|
||||
"category": "enhancedexplosives:tnts",
|
||||
"pages": [
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"text": "This TNT will only destroy the type of block it is sitting upon when exploding. It will still honour the blocks blast resistance, e.g. it won't destroy bedrock.",
|
||||
"recipe": "enhancedexplosives:tnt_selective"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "EE Manual",
|
||||
"landing_text": "If you find bugs or have suggestions for improving this mod, please message me on curseforge, my discord, or gitea (link in mod info).",
|
||||
"version": 1,
|
||||
"creative_tab": "enhancedexplosives:enhancedexplosives",
|
||||
"use_resource_pack": true
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user