Compare commits
57
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80458093d5
|
||
|
|
1417563435
|
||
|
|
ddb1515134
|
||
|
|
d3f9181cfa
|
||
|
|
89a7ea18db
|
||
|
|
5c5ab8c3dc
|
||
|
|
57eb7e5442
|
||
|
|
4959e3e0fa
|
||
|
|
257553d374
|
||
|
|
b74e6ef7f0
|
||
|
|
70377f53f7
|
||
|
|
1a86b04d71
|
||
|
|
5535f8f56d
|
||
|
|
4daf42c09c
|
||
|
|
871c1f9888
|
||
|
|
b8240c61c2
|
||
|
|
8db7889b22
|
||
|
|
73acc066f2
|
||
|
|
1a05c6034a
|
||
|
|
7ec5a57cec
|
||
|
|
9f2fb2158f
|
||
|
|
c4c0403100
|
||
|
|
55ee7fc999
|
||
|
|
23942c9972
|
||
|
|
339c466c88
|
||
|
|
cc21d6b935
|
||
|
|
66c79bf74e
|
||
|
|
793b77cfb6
|
||
|
|
2aaecd9668
|
||
|
|
f7bf084070
|
||
|
|
6be0064866
|
||
|
|
69a58f1ba9
|
||
|
|
f8130fb1eb
|
||
|
|
5e314c2256
|
||
|
|
0961e9654d
|
||
|
|
129c27ba47
|
||
|
|
31306bb116
|
||
|
|
27e2c56cb9
|
||
|
|
3587ccbc8a
|
||
|
|
94133e167a
|
||
|
|
ab77a7246a
|
||
|
|
992e1ca255
|
||
|
|
db66c68d4c
|
||
|
|
d812e54058
|
||
|
|
c9fbf66fd5
|
||
|
|
9ab8c6495f
|
||
|
|
79c268bc5b
|
||
|
|
8ed0394fdd
|
||
|
|
347edb43f5
|
||
|
|
3ae85cb1c1
|
||
|
|
e02551f4fb
|
||
|
|
509895e32c
|
||
|
|
bd8024e2a6
|
||
|
|
8af4f751d8
|
||
|
|
bf562f23e0
|
||
|
|
db9309d9d8
|
||
|
|
8b5c7b53a5
|
No files matched your search
@@ -0,0 +1,13 @@
|
||||
# For info on the mod go to either
|
||||
* [modrinth](https://modrinth.com/mod/enhanced-explosives)
|
||||
* [curseforge](https://www.curseforge.com/minecraft/mc-mods/enhanced-explosives)
|
||||
* in-game wiki (guidebook & patchouli)
|
||||
|
||||
# How to run / build the mod in an IDE
|
||||
* git clone the project
|
||||
* run the _runData_ gradle task, it generates the item & block models
|
||||
* the data generation only works in versions =>1.20.1, as I didn't backport it. If you want to build the
|
||||
mod for versions before that, you can run the _runData_ gradle task in the 1.20.1 branch and switch back to the
|
||||
branch for your desired version
|
||||
* run _runClient_ to start a minecraft session, or run _jar_ to generate a .jar file of the mod (located at _.
|
||||
/build/reobfJar/output.jar_)
|
||||
+19
-30
@@ -32,7 +32,7 @@ minecraft {
|
||||
// Use non-default mappings at your own risk. They may not always work.
|
||||
// Simply re-run your setup task after changing the mappings to update your workspace.
|
||||
minecraft {
|
||||
mappings channel: 'parchment', version: '2023.09.03-1.20.1'
|
||||
mappings channel: mapping_channel, version: mapping_version
|
||||
}
|
||||
|
||||
// When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game.
|
||||
@@ -88,11 +88,17 @@ minecraft {
|
||||
client {
|
||||
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
|
||||
property 'forge.enabledGameTestNamespaces', mod_id
|
||||
// fixes patchouli mixin error
|
||||
property 'mixin.env.remapRefMap', 'true'
|
||||
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
|
||||
}
|
||||
|
||||
server {
|
||||
property 'forge.enabledGameTestNamespaces', mod_id
|
||||
args '--nogui'
|
||||
// fixes patchouli mixin error
|
||||
property 'mixin.env.remapRefMap', 'true'
|
||||
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
|
||||
}
|
||||
|
||||
// This run config launches GameTestServer and runs all registered gametests, then exits.
|
||||
@@ -108,6 +114,10 @@ minecraft {
|
||||
|
||||
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
|
||||
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
||||
|
||||
// fixes patchouli mixin error
|
||||
property 'mixin.env.remapRefMap', 'true'
|
||||
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,39 +126,18 @@ minecraft {
|
||||
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
||||
|
||||
repositories {
|
||||
// Put repositories for dependencies here
|
||||
// ForgeGradle automatically adds the Forge maven and Maven Central for you
|
||||
|
||||
// If you have mod jar dependencies in ./libs, you can declare them as a repository like so.
|
||||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver
|
||||
// flatDir {
|
||||
// dir 'libs'
|
||||
// }
|
||||
maven {
|
||||
url "https://cursemaven.com"
|
||||
content {
|
||||
includeGroup "curse.maven"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Specify the version of Minecraft to use.
|
||||
// Any artifact can be supplied so long as it has a "userdev" classifier artifact and is a compatible patcher artifact.
|
||||
// The "userdev" classifier will be requested and setup by ForgeGradle.
|
||||
// If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"],
|
||||
// then special handling is done to allow a setup of a vanilla dependency without the use of an external repository.
|
||||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||
|
||||
// Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings
|
||||
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
|
||||
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}")
|
||||
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}")
|
||||
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}")
|
||||
|
||||
// Example mod dependency using a mod jar from ./libs with a flat dir repository
|
||||
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
|
||||
// The group id is ignored when searching -- in this case, it is "blank"
|
||||
// implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
|
||||
|
||||
// For more info:
|
||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
||||
|
||||
implementation fg.deobf("curse.maven:guidebook-253874:3904597")
|
||||
implementation fg.deobf("curse.maven:patchouli-306770:3936481")
|
||||
}
|
||||
|
||||
// This block of code expands all declared replace properties in the specified resource targets.
|
||||
|
||||
+14
-45
@@ -1,49 +1,18 @@
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
# CreateCoredumpOnCrash only works on jdk9+
|
||||
org.gradle.jvmargs=-Xmx3G -XX:-CreateCoredumpOnCrash
|
||||
org.gradle.daemon=false
|
||||
# The Minecraft version must agree with the Forge version to get a valid artifact
|
||||
minecraft_version=1.20.1
|
||||
# The Minecraft version range can use any release version of Minecraft as bounds.
|
||||
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
|
||||
# as they do not follow standard versioning conventions.
|
||||
minecraft_version_range=[1.20.1]
|
||||
# The Forge version must agree with the Minecraft version to get a valid artifact
|
||||
forge_version=47.3.22
|
||||
# The Forge version range can use any version of Forge as bounds or match the loader version range
|
||||
forge_version_range=[47,)
|
||||
# The loader version range can only use the major version of Forge/FML as bounds
|
||||
loader_version_range=[47,)
|
||||
# The mapping channel to use for mappings.
|
||||
# The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"].
|
||||
# Additional mapping channels can be registered through the "channelProviders" extension in a Gradle plugin.
|
||||
#
|
||||
# | Channel | Version | |
|
||||
# |-----------|----------------------|--------------------------------------------------------------------------------|
|
||||
# | official | MCVersion | Official field/method names from Mojang mapping files |
|
||||
# | parchment | YYYY.MM.DD-MCVersion | Open community-sourced parameter names and javadocs layered on top of official |
|
||||
#
|
||||
# You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
|
||||
# See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
|
||||
#
|
||||
# Parchment is an unofficial project maintained by ParchmentMC, separate from Minecraft Forge.
|
||||
# Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started
|
||||
minecraft_version=1.19.2
|
||||
minecraft_version_range=[1.19.2]
|
||||
forge_version=43.5.0
|
||||
forge_version_range=[43,)
|
||||
loader_version_range=[43,)
|
||||
mapping_channel=parchment
|
||||
# The mapping version to query from the mapping channel.
|
||||
# This must match the format required by the mapping channel.
|
||||
mapping_version=1.20.1
|
||||
# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
|
||||
# Must match the String constant located in the main mod class annotated with @Mod.
|
||||
mod_id=compressedtnt
|
||||
# The human-readable display name for the mod.
|
||||
mod_name=Compressed TNT
|
||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||
mapping_version=2022.11.27-1.19.2
|
||||
|
||||
mod_id=enhancedexplosives
|
||||
mod_name=Enhanced Explosives
|
||||
mod_license=All Rights Reserved
|
||||
# The mod version. See https://semver.org/
|
||||
mod_version=0.2.0
|
||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||
# This should match the base package used for the mod sources.
|
||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
mod_version=0.15.0
|
||||
mod_group_id=com.jenny
|
||||
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
|
||||
mod_authors=
|
||||
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
|
||||
mod_description=
|
||||
mod_authors=xJenny69
|
||||
mod_description=strong & throwable explosives
|
||||
+1
-1
@@ -13,4 +13,4 @@ plugins {
|
||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
|
||||
}
|
||||
|
||||
rootProject.name = 'compressedtnt'
|
||||
rootProject.name = 'enhancedexplosives'
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.jenny.compressedtnt.blocks;
|
||||
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.material.MapColor;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
import static com.jenny.compressedtnt.Compressedtnt.MODID;
|
||||
|
||||
public class blocks {
|
||||
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
|
||||
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
|
||||
|
||||
public static final RegistryObject<strongerTNTBlock> TNT_8 = BLOCKS.register("tnt_8", () -> new strongerTNTBlock(BlockBehaviour.Properties.of().mapColor(MapColor.STONE), 8.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_8_ITEM = ITEMS.register("tnt_8", () -> new BlockItem(TNT_8.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> TNT_16 = BLOCKS.register("tnt_16", () -> new strongerTNTBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED), 16.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_16_ITEM = ITEMS.register("tnt_16", () -> new BlockItem(TNT_16.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> TNT_32 = BLOCKS.register("tnt_32", () -> new strongerTNTBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED), 32.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_32_ITEM = ITEMS.register("tnt_32", () -> new BlockItem(TNT_32.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> TNT_64 = BLOCKS.register("tnt_64", () -> new strongerTNTBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED), 64.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_64_ITEM = ITEMS.register("tnt_64", () -> new BlockItem(TNT_64.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> TNT_128 = BLOCKS.register("tnt_128", () -> new strongerTNTBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED), 128.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_128_ITEM = ITEMS.register("tnt_128", () -> new BlockItem(TNT_128.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> TNT_CLUSTER_2 = BLOCKS.register("tnt_cluster_2", () -> new ClusterTNTBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED), 4.0f, 80, 2, 10));
|
||||
public static final RegistryObject<Item> TNT_CLUSTER__2ITEM = ITEMS.register("tnt_cluster_2", () -> new BlockItem(TNT_CLUSTER_2.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> TNT_CLUSTER_4 = BLOCKS.register("tnt_cluster_4", () -> new ClusterTNTBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED), 4.0f, 80, 4, 10));
|
||||
public static final RegistryObject<Item> TNT_CLUSTER_4_ITEM = ITEMS.register("tnt_cluster_4", () -> new BlockItem(TNT_CLUSTER_4.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> TNT_CLUSTER_8 = BLOCKS.register("tnt_cluster_8", () -> new ClusterTNTBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED), 4.0f, 80, 8, 10));
|
||||
public static final RegistryObject<Item> TNT_CLUSTER_8_ITEM = ITEMS.register("tnt_cluster_8", () -> new BlockItem(TNT_CLUSTER_8.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> TNT_HOMING= BLOCKS.register("tnt_homing", () -> new homingTNTBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED), 4.0f, 80, 1));
|
||||
public static final RegistryObject<Item> TNT_HOMING_ITEM = ITEMS.register("tnt_homing", () -> new BlockItem(TNT_HOMING.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> TNT_BLACK_HOLE= BLOCKS.register("tnt_black_hole", () -> new blackHoleTNTBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED), 4.0f, 80, 1));
|
||||
public static final RegistryObject<Item> TNT_BLACK_HOLE_ITEM = ITEMS.register("tnt_black_hole", () -> new BlockItem(TNT_BLACK_HOLE.get(), new Item.Properties()));
|
||||
|
||||
|
||||
public static void register(IEventBus bus) {
|
||||
BLOCKS.register(bus);
|
||||
ITEMS.register(bus);
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package com.jenny.compressedtnt;
|
||||
|
||||
import com.jenny.compressedtnt.blocks.blocks;
|
||||
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.CreativeModeTabs;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
import static com.jenny.compressedtnt.Compressedtnt.MODID;
|
||||
|
||||
public class creativeTab {
|
||||
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MODID);
|
||||
public static final RegistryObject<CreativeModeTab> CREATIVE_TAB = CREATIVE_MODE_TABS.register("compressedtnt", () -> CreativeModeTab.builder().withTabsBefore(CreativeModeTabs.COMBAT).icon(() -> blocks.TNT_8_ITEM.get().getDefaultInstance()).displayItems((parameters, output) -> {
|
||||
output.accept(blocks.TNT_8.get());
|
||||
output.accept(blocks.TNT_16.get());
|
||||
output.accept(blocks.TNT_32.get());
|
||||
output.accept(blocks.TNT_64.get());
|
||||
output.accept(blocks.TNT_128.get());
|
||||
output.accept(blocks.TNT_CLUSTER_2.get());
|
||||
output.accept(blocks.TNT_CLUSTER_4.get());
|
||||
output.accept(blocks.TNT_CLUSTER_8.get());
|
||||
output.accept(blocks.TNT_HOMING.get());
|
||||
output.accept(blocks.TNT_BLACK_HOLE.get());
|
||||
}).title(Component.literal("Compressed TNT")).build());
|
||||
|
||||
public static void register(IEventBus bus) {
|
||||
CREATIVE_MODE_TABS.register(bus);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.jenny.compressedtnt.datagen;
|
||||
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.data.event.GatherDataEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import static com.jenny.compressedtnt.Compressedtnt.MODID;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class DataGenerators {
|
||||
@SubscribeEvent
|
||||
public static void gatherData(@NotNull GatherDataEvent event) {
|
||||
DataGenerator generator = event.getGenerator();
|
||||
PackOutput packOutput = generator.getPackOutput();
|
||||
ExistingFileHelper existingFileHelper = event.getExistingFileHelper();
|
||||
CompletableFuture<HolderLookup.Provider> lookupProvider = event.getLookupProvider();
|
||||
|
||||
generator.addProvider(event.includeClient(), new ModBlockStateProvider(packOutput, existingFileHelper));
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
package com.jenny.compressedtnt.datagen;
|
||||
|
||||
import com.jenny.compressedtnt.Compressedtnt;
|
||||
import com.jenny.compressedtnt.blocks.blocks;
|
||||
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.*;
|
||||
import net.minecraftforge.client.model.generators.BlockStateProvider;
|
||||
import net.minecraftforge.client.model.generators.ConfiguredModel;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
import net.minecraftforge.client.model.generators.ModelFile;
|
||||
|
||||
import static com.jenny.compressedtnt.Compressedtnt.MODID;
|
||||
|
||||
public class ModBlockStateProvider extends BlockStateProvider {
|
||||
public ModBlockStateProvider(PackOutput output, ExistingFileHelper exFileHelper) {
|
||||
super(output, MODID, exFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerStatesAndModels() {
|
||||
sideTopBottom(blocks.TNT_8.get());
|
||||
sideTopBottom(blocks.TNT_16.get());
|
||||
sideTopBottom(blocks.TNT_32.get());
|
||||
sideTopBottom(blocks.TNT_64.get());
|
||||
sideTopBottom(blocks.TNT_128.get());
|
||||
}
|
||||
|
||||
private void blockWithItem(RegistryObject<Block> blockRegistryObject) {
|
||||
simpleBlockWithItem(blockRegistryObject.get(), cubeAll(blockRegistryObject.get()));
|
||||
}
|
||||
|
||||
private void SideTop(RegistryObject<Block> blockRegistryObject) {
|
||||
simpleBlockWithItem(blockRegistryObject.get(), topSide(blockRegistryObject.get()));
|
||||
}
|
||||
|
||||
private void blockItem(RegistryObject<Block> blockRegistryObject) {
|
||||
simpleBlockItem(blockRegistryObject.get(), new ModelFile.UncheckedModelFile(MODID +
|
||||
":block/" + ForgeRegistries.BLOCKS.getKey(blockRegistryObject.get()).getPath()));
|
||||
}
|
||||
|
||||
private void topBottom2Sides(RegistryObject<Block> blockRegistryObject) {
|
||||
simpleBlockWithItem(blockRegistryObject.get(), northEastTopBottom(blockRegistryObject.get()));
|
||||
}
|
||||
|
||||
private ResourceLocation key(Block block) {
|
||||
return ForgeRegistries.BLOCKS.getKey(block);
|
||||
}
|
||||
|
||||
private String name(Block block) {
|
||||
return key(block).getPath();
|
||||
}
|
||||
|
||||
private ResourceLocation extend(ResourceLocation rl, String suffix) {
|
||||
return new ResourceLocation(rl.getNamespace(), rl.getPath() + suffix);
|
||||
}
|
||||
|
||||
public void sideTopBottom(Block block) {
|
||||
ModelFile model = models().cubeBottomTop(name(block), extend(blockTexture(block), "_side"), extend(blockTexture(block), "_bottom"), extend(blockTexture(block), "_top"));
|
||||
this.getVariantBuilder(block).forAllStates(blockState -> ConfiguredModel.builder().modelFile(model).build());
|
||||
simpleBlockItem(block, model);
|
||||
}
|
||||
|
||||
public ModelFile northEastTopBottom(Block block) {
|
||||
return models().cube(name(block), extend(blockTexture(block), "_bottom"), extend(blockTexture(block), "_top"), extend(blockTexture(block), "_nw"), extend(blockTexture(block), "_se"), extend(blockTexture(block), "_se"), extend(blockTexture(block), "_nw")).texture("particle", extend(blockTexture(block), "_se"));
|
||||
}
|
||||
|
||||
public ModelFile cube(Block block) {
|
||||
return models().cube(name(block), extend(blockTexture(block), "_bottom"), extend(blockTexture(block), "_top"), extend(blockTexture(block), "_north"), extend(blockTexture(block), "_south"), extend(blockTexture(block), "_east"), extend(blockTexture(block), "_west")).texture("particle", extend(blockTexture(block), "_north"));
|
||||
}
|
||||
|
||||
public ModelFile topSide(Block block) {
|
||||
return models().cubeColumn(name(block), extend(blockTexture(block), ""), extend(blockTexture(block), "_top"));
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.jenny.compressedtnt.entities;
|
||||
|
||||
import com.jenny.compressedtnt.entities.client.BaseTNTRenderer;
|
||||
import com.jenny.compressedtnt.entities.client.clusterTNTRenderer;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderers;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.MobCategory;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
import static com.jenny.compressedtnt.Compressedtnt.MODID;
|
||||
|
||||
public class entities {
|
||||
public static final DeferredRegister<EntityType<?>> ENTITY_TYPES =
|
||||
DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, MODID);
|
||||
|
||||
public static final RegistryObject<EntityType<homingPrimedTNT>> TNT_HOMING =
|
||||
ENTITY_TYPES.register("tnt_homing", () -> EntityType.Builder.<homingPrimedTNT>of(homingPrimedTNT::new, MobCategory.MISC)
|
||||
.sized(0.98F, 0.7F).fireImmune().clientTrackingRange(8).build("tnt_homing"));
|
||||
|
||||
public static final RegistryObject<EntityType<StrongerPrimedTNT>> TNT_STRONGER =
|
||||
ENTITY_TYPES.register("tnt_stronger", () -> EntityType.Builder.<StrongerPrimedTNT>of(StrongerPrimedTNT::new, MobCategory.MISC)
|
||||
.sized(0.98F, 0.7F).fireImmune().clientTrackingRange(8).build("tnt_stronger"));
|
||||
|
||||
public static final RegistryObject<EntityType<ClusterPrimedTNT>> TNT_CLUSTER =
|
||||
ENTITY_TYPES.register("tnt_cluster", () -> EntityType.Builder.<ClusterPrimedTNT>of(ClusterPrimedTNT::new, MobCategory.MISC)
|
||||
.sized(0.48F, 0.48F).fireImmune().clientTrackingRange(8).build("tnt_cluster"));
|
||||
|
||||
public static final RegistryObject<EntityType<blackHolePrimedTNT>> TNT_BLACK_HOLE =
|
||||
ENTITY_TYPES.register("tnt_chunk", () -> EntityType.Builder.<blackHolePrimedTNT>of(blackHolePrimedTNT::new, MobCategory.MISC)
|
||||
.sized(0.98F, 0.7F).fireImmune().clientTrackingRange(8).build("tnt_chunk"));
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
ENTITY_TYPES.register(eventBus);
|
||||
}
|
||||
|
||||
public static void registerRenderers () {
|
||||
EntityRenderers.register(TNT_STRONGER.get(), BaseTNTRenderer::new);
|
||||
EntityRenderers.register(TNT_HOMING.get(), BaseTNTRenderer::new);
|
||||
EntityRenderers.register(TNT_BLACK_HOLE.get(), BaseTNTRenderer::new);
|
||||
EntityRenderers.register(TNT_CLUSTER.get(), clusterTNTRenderer::new);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.jenny.enhancedexplosives;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.particles.ArrowParticle;
|
||||
import com.jenny.enhancedexplosives.particles.particles;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.client.event.RegisterParticleProvidersEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
|
||||
import static com.jenny.enhancedexplosives.EnhancedExplosives.MODID;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
|
||||
public class ClientEvents {
|
||||
@SubscribeEvent
|
||||
public static void registerParticleFactories(final RegisterParticleProvidersEvent event) {
|
||||
Minecraft.getInstance().particleEngine.register(particles.CONCUSSIVE_ARROW_PARTICLE.get(),
|
||||
ArrowParticle.Provider::new);
|
||||
Minecraft.getInstance().particleEngine.register(particles.TNT_ARROW_PARTICLE.get(),
|
||||
ArrowParticle.Provider::new);
|
||||
Minecraft.getInstance().particleEngine.register(particles.CARPET_ARROW_PARTICLE.get(),
|
||||
ArrowParticle.Provider::new);
|
||||
Minecraft.getInstance().particleEngine.register(particles.TUNNEL_ARROW_PARTICLE.get(),
|
||||
ArrowParticle.Provider::new);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onClientSetup(FMLClientSetupEvent event) {
|
||||
entities.registerRenderers();
|
||||
}
|
||||
}
|
||||
+19
-23
@@ -1,43 +1,49 @@
|
||||
package com.jenny.compressedtnt;
|
||||
package com.jenny.enhancedexplosives;
|
||||
|
||||
import com.jenny.compressedtnt.blocks.blocks;
|
||||
import com.jenny.compressedtnt.entities.entities;
|
||||
import com.jenny.enhancedexplosives.blocks.blocks;
|
||||
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 com.mojang.logging.LogUtils;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.server.ServerStartingEvent;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.ModLoadingContext;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.minecraftforge.fml.config.ModConfig;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
// The value here should match an entry in the META-INF/mods.toml file
|
||||
@Mod(Compressedtnt.MODID)
|
||||
public class Compressedtnt {
|
||||
@Mod(EnhancedExplosives.MODID)
|
||||
public class EnhancedExplosives {
|
||||
|
||||
// Define mod id in a common place for everything to reference
|
||||
public static final String MODID = "compressedtnt";
|
||||
// Directly reference a slf4j logger
|
||||
public static final String MODID = "enhancedexplosives";
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
|
||||
public Compressedtnt() {
|
||||
@SuppressWarnings("removal")
|
||||
public EnhancedExplosives() {
|
||||
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
|
||||
modEventBus.addListener(this::commonSetup);
|
||||
|
||||
particles.register(modEventBus);
|
||||
blocks.register(modEventBus);
|
||||
creativeTab.register(modEventBus);
|
||||
items.register(modEventBus);
|
||||
entities.register(modEventBus);
|
||||
|
||||
// Register ourselves for server and other game events we are interested in
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, ConfigClient.SPEC, "enhancedexplosives-client.toml");
|
||||
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ConfigServer.SPEC, "enhancedexplosives-server.toml");
|
||||
}
|
||||
|
||||
private void commonSetup(final FMLCommonSetupEvent event) {
|
||||
|
||||
items.registerDispenser();
|
||||
}
|
||||
|
||||
// You can use SubscribeEvent and let the Event Bus discover methods to call
|
||||
@@ -45,14 +51,4 @@ public class Compressedtnt {
|
||||
public void onServerStarting(ServerStartingEvent event) {
|
||||
|
||||
}
|
||||
|
||||
// You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent
|
||||
@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
|
||||
public static class ClientModEvents {
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onClientSetup(FMLClientSetupEvent event) {
|
||||
entities.registerRenderers();
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
package com.jenny.compressedtnt.blocks;
|
||||
package com.jenny.enhancedexplosives.blocks;
|
||||
|
||||
import com.jenny.compressedtnt.entities.ClusterPrimedTNT;
|
||||
import com.jenny.enhancedexplosives.entities.tnt.ClusterPrimedTNT;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
@@ -63,11 +63,11 @@ public class ClusterTNTBlock extends TntBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wasExploded(Level level, BlockPos blockPos, Explosion pExplosion) {
|
||||
public void wasExploded(Level level, @NotNull BlockPos blockPos, @NotNull Explosion pExplosion) {
|
||||
if (!level.isClientSide) {
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
int ft = (short) (level.random.nextInt(fuseTime / 4) + fuseTime / 8);
|
||||
ClusterPrimedTNT primedtnt = new ClusterPrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getIndirectSourceEntity(), pRadius, ft, getMove(level, childRange));
|
||||
ClusterPrimedTNT primedtnt = new ClusterPrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getSourceMob(), pRadius, ft, getMove(level, childRange));
|
||||
level.addFreshEntity(primedtnt);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.jenny.enhancedexplosives.blocks;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.tnt.bedrockPrimedTNT;
|
||||
import com.jenny.enhancedexplosives.entities.tnt.selectivePrimedTNT;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.TntBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class bedrockTNTBlock extends TntBlock {
|
||||
public final float pRadius;
|
||||
public final int fuseTime;
|
||||
|
||||
public bedrockTNTBlock(Properties p_57422_, float pRadius, int fuseTime) {
|
||||
super(p_57422_);
|
||||
this.pRadius = pRadius;
|
||||
this.fuseTime = fuseTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCaughtFire(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @Nullable Direction face, @Nullable LivingEntity igniter) {
|
||||
explode(world, pos, igniter, this.pRadius, this.fuseTime);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void explode(Level p_57434_, BlockPos p_57435_, float pRadius, int fuseTime) {
|
||||
explode(p_57434_, p_57435_, (LivingEntity)null, pRadius, fuseTime);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private static void explode(Level p_57437_, BlockPos p_57438_, @Nullable LivingEntity p_57439_, float pRadius, int fuseTime) {
|
||||
if (!p_57437_.isClientSide) {
|
||||
bedrockPrimedTNT primedtnt = new bedrockPrimedTNT(p_57437_, (double)p_57438_.getX() + (double)0.5F, (double)p_57438_.getY(), (double)p_57438_.getZ() + (double)0.5F, p_57439_, pRadius, fuseTime);
|
||||
p_57437_.addFreshEntity(primedtnt);
|
||||
p_57437_.playSound((Player)null, primedtnt.getX(), primedtnt.getY(), primedtnt.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
p_57437_.gameEvent(p_57439_, GameEvent.PRIME_FUSE, p_57438_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wasExploded(Level level, @NotNull BlockPos blockPos, @NotNull Explosion pExplosion) {
|
||||
if (!level.isClientSide) {
|
||||
int ft = (short) (level.random.nextInt(fuseTime / 4) + fuseTime / 8);
|
||||
bedrockPrimedTNT primedtnt = new bedrockPrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getSourceMob(), pRadius, ft);
|
||||
level.addFreshEntity(primedtnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
package com.jenny.compressedtnt.blocks;
|
||||
package com.jenny.enhancedexplosives.blocks;
|
||||
|
||||
import com.jenny.compressedtnt.entities.blackHolePrimedTNT;
|
||||
import com.jenny.enhancedexplosives.entities.tnt.blackHolePrimedTNT;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
@@ -48,9 +48,9 @@ public class blackHoleTNTBlock extends TntBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wasExploded(Level level, BlockPos blockPos, Explosion pExplosion) {
|
||||
public void wasExploded(Level level, @NotNull BlockPos blockPos, @NotNull Explosion pExplosion) {
|
||||
if (!level.isClientSide) {
|
||||
blackHolePrimedTNT primedtnt = new blackHolePrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getIndirectSourceEntity(), pRadius, fuseTime, speed);
|
||||
blackHolePrimedTNT primedtnt = new blackHolePrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getSourceMob(), pRadius, fuseTime, speed);
|
||||
int i = primedtnt.getFuse();
|
||||
primedtnt.setFuse((short) (level.random.nextInt(i / 4) + i / 8));
|
||||
level.addFreshEntity(primedtnt);
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.jenny.enhancedexplosives.blocks;
|
||||
|
||||
import com.jenny.enhancedexplosives.items.BlockItemTooltip;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
import static com.jenny.enhancedexplosives.EnhancedExplosives.MODID;
|
||||
import static com.jenny.enhancedexplosives.creativeTab.CREATIVE_MODE_TAB;
|
||||
|
||||
public class blocks {
|
||||
private static final BlockBehaviour.Properties DEFAULT_PROPS = BlockBehaviour.Properties.of(Material.EXPLOSIVE).instabreak().sound(SoundType.GRASS);
|
||||
|
||||
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
|
||||
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
|
||||
|
||||
public static final RegistryObject<Block> TNT_8 = BLOCKS.register("tnt_8", () -> new strongerTNTBlock(DEFAULT_PROPS, 8.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_8_ITEM = ITEMS.register("tnt_8", () -> new BlockItemTooltip(TNT_8.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_16 = BLOCKS.register("tnt_16", () -> new strongerTNTBlock(DEFAULT_PROPS, 16.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_16_ITEM = ITEMS.register("tnt_16", () -> new BlockItemTooltip(TNT_16.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_32 = BLOCKS.register("tnt_32", () -> new strongerTNTBlock(DEFAULT_PROPS, 32.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_32_ITEM = ITEMS.register("tnt_32", () -> new BlockItemTooltip(TNT_32.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_64 = BLOCKS.register("tnt_64", () -> new strongerTNTBlock(DEFAULT_PROPS, 64.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_64_ITEM = ITEMS.register("tnt_64", () -> new BlockItemTooltip(TNT_64.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_128 = BLOCKS.register("tnt_128", () -> new strongerTNTBlock(DEFAULT_PROPS, 128.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_128_ITEM = ITEMS.register("tnt_128", () -> new BlockItemTooltip(TNT_128.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_CLUSTER_2 = BLOCKS.register("tnt_cluster_2", () -> new ClusterTNTBlock(DEFAULT_PROPS, 4.0f, 80, 2, 10));
|
||||
public static final RegistryObject<Item> TNT_CLUSTER_2_ITEM = ITEMS.register("tnt_cluster_2", () -> new BlockItemTooltip(TNT_CLUSTER_2.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_CLUSTER_4 = BLOCKS.register("tnt_cluster_4", () -> new ClusterTNTBlock(DEFAULT_PROPS, 4.0f, 80, 4, 10));
|
||||
public static final RegistryObject<Item> TNT_CLUSTER_4_ITEM = ITEMS.register("tnt_cluster_4", () -> new BlockItemTooltip(TNT_CLUSTER_4.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_CLUSTER_8 = BLOCKS.register("tnt_cluster_8", () -> new ClusterTNTBlock(DEFAULT_PROPS, 4.0f, 80, 8, 10));
|
||||
public static final RegistryObject<Item> TNT_CLUSTER_8_ITEM = ITEMS.register("tnt_cluster_8", () -> new BlockItemTooltip(TNT_CLUSTER_8.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_HOMING = BLOCKS.register("tnt_homing", () -> new homingTNTBlock(DEFAULT_PROPS, 4.0f, 80, 1));
|
||||
public static final RegistryObject<Item> TNT_HOMING_ITEM = ITEMS.register("tnt_homing", () -> new BlockItemTooltip(TNT_HOMING.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_BLACK_HOLE = BLOCKS.register("tnt_black_hole", () -> new blackHoleTNTBlock(DEFAULT_PROPS, 4.0f, 80, 1));
|
||||
public static final RegistryObject<Item> TNT_BLACK_HOLE_ITEM = ITEMS.register("tnt_black_hole", () -> new BlockItemTooltip(TNT_BLACK_HOLE.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_CLAYMORE = BLOCKS.register("tnt_claymore", () -> new claymoreTNTBlock(DEFAULT_PROPS, 2.0f, 20, 256));
|
||||
public static final RegistryObject<Item> TNT_CLAYMORE_ITEM = ITEMS.register("tnt_claymore", () -> new BlockItemTooltip(TNT_CLAYMORE.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_SELECTIVE = BLOCKS.register("tnt_selective", () -> new selectiveTNTBlock(DEFAULT_PROPS, 32.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_SELECTIVE_ITEM = ITEMS.register("tnt_selective", () -> new BlockItemTooltip(TNT_SELECTIVE.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_ENDER = BLOCKS.register("tnt_ender", () -> new enderTNTBlock(DEFAULT_PROPS, 4.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_ENDER_ITEM = ITEMS.register("tnt_ender", () -> new BlockItemTooltip(TNT_ENDER.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_REPULSIVE = BLOCKS.register("tnt_repulsive", () -> new repulsiveTNTBlock(DEFAULT_PROPS, 4.0f, 80, 1));
|
||||
public static final RegistryObject<Item> TNT_REPULSIVE_ITEM = ITEMS.register("tnt_repulsive", () -> new BlockItemTooltip(TNT_REPULSIVE.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_BEDROCK = BLOCKS.register("tnt_bedrock", () -> new bedrockTNTBlock(DEFAULT_PROPS, 4.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_BEDROCK_ITEM = ITEMS.register("tnt_bedrock", () -> new BlockItemTooltip(TNT_BEDROCK.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static final RegistryObject<Block> TNT_ENTITY = BLOCKS.register("tnt_entity", () -> new entityTNTBlock(DEFAULT_PROPS, 4.0f, 80));
|
||||
public static final RegistryObject<Item> TNT_ENTITY_ITEM = ITEMS.register("tnt_entity", () -> new BlockItemTooltip(TNT_ENTITY.get(), new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
|
||||
public static void register(IEventBus bus) {
|
||||
BLOCKS.register(bus);
|
||||
ITEMS.register(bus);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.jenny.enhancedexplosives.blocks;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.tnt.claymorePrimedTNT;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.TntBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class claymoreTNTBlock extends TntBlock {
|
||||
public final float pRadius;
|
||||
public final int fuseTime;
|
||||
public final int projectileCount;
|
||||
|
||||
public claymoreTNTBlock(Properties p_57422_, float pRadius, int fuseTime, int projectileCount) {
|
||||
super(p_57422_);
|
||||
this.pRadius = pRadius;
|
||||
this.fuseTime = fuseTime;
|
||||
this.projectileCount = projectileCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCaughtFire(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @Nullable Direction face, @Nullable LivingEntity igniter) {
|
||||
explode(world, pos, igniter, this.pRadius, this.fuseTime, this.projectileCount);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void explode(Level p_57434_, BlockPos p_57435_, float pRadius, int fuseTime, int projectileCount) {
|
||||
explode(p_57434_, p_57435_, (LivingEntity)null, pRadius, fuseTime, projectileCount);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private static void explode(Level level, BlockPos blockPos, @Nullable LivingEntity entity, float pRadius, int fuseTime, int projectileCount) {
|
||||
if (!level.isClientSide) {
|
||||
claymorePrimedTNT primedtnt = new claymorePrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, entity, pRadius, fuseTime, projectileCount);
|
||||
level.addFreshEntity(primedtnt);
|
||||
level.gameEvent(entity, GameEvent.PRIME_FUSE, blockPos);
|
||||
level.playSound((Player) null, blockPos.getX(), blockPos.getY(), blockPos.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wasExploded(Level level, @NotNull BlockPos blockPos, @NotNull Explosion pExplosion) {
|
||||
if (!level.isClientSide) {
|
||||
int ft = (short) (level.random.nextInt(fuseTime / 4) + fuseTime / 8);
|
||||
claymorePrimedTNT primedtnt = new claymorePrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getSourceMob(), pRadius, ft, projectileCount);
|
||||
level.addFreshEntity(primedtnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.jenny.enhancedexplosives.blocks;
|
||||
|
||||
import com.jenny.enhancedexplosives.config.ConfigClient;
|
||||
import com.jenny.enhancedexplosives.entities.tnt.enderPrimedTNT;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.TntBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.level.levelgen.Heightmap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class enderTNTBlock extends TntBlock {
|
||||
public final float pRadius;
|
||||
public final int fuseTime;
|
||||
|
||||
public enderTNTBlock(Properties p_57422_, float pRadius, int fuseTime) {
|
||||
super(p_57422_);
|
||||
this.pRadius = pRadius;
|
||||
this.fuseTime = fuseTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCaughtFire(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @Nullable Direction face, @Nullable LivingEntity igniter) {
|
||||
explode(world, pos, igniter, this.pRadius, this.fuseTime);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void explode(Level p_57434_, BlockPos p_57435_, float pRadius, int fuseTime) {
|
||||
explode(p_57434_, p_57435_, null, pRadius, fuseTime);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private static void explode(Level level, BlockPos blockPos, @Nullable LivingEntity entity, float pRadius, int fuseTime) {
|
||||
if (!level.isClientSide) {
|
||||
BlockPos pos = getSpawnPos(level, blockPos);
|
||||
if (pos != null) {
|
||||
enderPrimedTNT primedtnt = new enderPrimedTNT(level, pos.getX() + 0.5F, pos.getY(), pos.getZ() + 0.5F, entity, pRadius, fuseTime);
|
||||
level.addFreshEntity(primedtnt);
|
||||
level.playSound(null, primedtnt.getX(), primedtnt.getY(), primedtnt.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
level.gameEvent(entity, GameEvent.PRIME_FUSE, blockPos);
|
||||
}
|
||||
}
|
||||
else {
|
||||
spawnParticles(level, blockPos);
|
||||
}
|
||||
}
|
||||
|
||||
private static BlockPos getSpawnPos(Level level, BlockPos blockPos) {
|
||||
int x = blockPos.getX();
|
||||
int y = blockPos.getY();
|
||||
int z = blockPos.getZ();
|
||||
for (int i = 0; i < 5; i++) {
|
||||
BlockPos pos = new BlockPos(
|
||||
x + level.getRandom().nextInt(-16, 17),
|
||||
y + level.getRandom().nextInt(-16, 17),
|
||||
z + level.getRandom().nextInt(-16, 17));
|
||||
if (level.isEmptyBlock(pos)) {
|
||||
int ymax = level.getHeight(Heightmap.Types.WORLD_SURFACE, pos.getX(), pos.getZ());
|
||||
if (ymax < pos.getY()) {
|
||||
return new BlockPos(pos.getX(), ymax, pos.getZ());
|
||||
}
|
||||
else {
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wasExploded(Level level, @NotNull BlockPos blockPos, @NotNull Explosion pExplosion) {
|
||||
if (!level.isClientSide) {
|
||||
BlockPos pos = getSpawnPos(level, blockPos);
|
||||
if (pos != null) {
|
||||
enderPrimedTNT primedtnt = new enderPrimedTNT(level, pos.getX() + 0.5F, pos.getY(), pos.getZ() + 0.5F, pExplosion.getSourceMob(), pRadius, fuseTime);
|
||||
int i = primedtnt.getFuse();
|
||||
primedtnt.setFuse((short) (level.random.nextInt(i / 4) + i / 8));
|
||||
level.addFreshEntity(primedtnt);
|
||||
}
|
||||
}
|
||||
else {
|
||||
spawnParticles(level, blockPos);
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnParticles(Level level, BlockPos blockPos) {
|
||||
if (ConfigClient.tntParticles.get()) {
|
||||
for (int i = 1; i <= ConfigClient.calcPCount(30); i++) {
|
||||
float x = blockPos.getX() + (float) level.getRandom().nextIntBetweenInclusive(-10, 10) / 10 + 0.5F;
|
||||
float y = blockPos.getY() + (float) level.getRandom().nextIntBetweenInclusive(-10, 10) / 10;
|
||||
float z = blockPos.getZ() + (float) level.getRandom().nextIntBetweenInclusive(-10, 10) / 10 + 0.5F;
|
||||
level.addParticle(ParticleTypes.GLOW, x, y, z, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.jenny.enhancedexplosives.blocks;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.tnt.EntityPrimedTNT;
|
||||
import com.jenny.enhancedexplosives.entities.tnt.bedrockPrimedTNT;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.TntBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class entityTNTBlock extends TntBlock {
|
||||
public final float pRadius;
|
||||
public final int fuseTime;
|
||||
|
||||
public entityTNTBlock(Properties p_57422_, float pRadius, int fuseTime) {
|
||||
super(p_57422_);
|
||||
this.pRadius = pRadius;
|
||||
this.fuseTime = fuseTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCaughtFire(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @Nullable Direction face, @Nullable LivingEntity igniter) {
|
||||
explode(world, pos, igniter, this.pRadius, this.fuseTime);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void explode(Level p_57434_, BlockPos p_57435_, float pRadius, int fuseTime) {
|
||||
explode(p_57434_, p_57435_, (LivingEntity)null, pRadius, fuseTime);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private static void explode(Level p_57437_, BlockPos p_57438_, @Nullable LivingEntity p_57439_, float pRadius, int fuseTime) {
|
||||
if (!p_57437_.isClientSide) {
|
||||
EntityPrimedTNT primedtnt = new EntityPrimedTNT(p_57437_, (double)p_57438_.getX() + (double)0.5F, (double)p_57438_.getY(), (double)p_57438_.getZ() + (double)0.5F, p_57439_, pRadius, fuseTime);
|
||||
p_57437_.addFreshEntity(primedtnt);
|
||||
p_57437_.playSound((Player)null, primedtnt.getX(), primedtnt.getY(), primedtnt.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
p_57437_.gameEvent(p_57439_, GameEvent.PRIME_FUSE, p_57438_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wasExploded(Level level, @NotNull BlockPos blockPos, @NotNull Explosion pExplosion) {
|
||||
if (!level.isClientSide) {
|
||||
int ft = (short) (level.random.nextInt(fuseTime / 4) + fuseTime / 8);
|
||||
EntityPrimedTNT primedtnt = new EntityPrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getSourceMob(), pRadius, ft);
|
||||
level.addFreshEntity(primedtnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
package com.jenny.compressedtnt.blocks;
|
||||
package com.jenny.enhancedexplosives.blocks;
|
||||
|
||||
import com.jenny.compressedtnt.entities.homingPrimedTNT;
|
||||
import com.jenny.enhancedexplosives.entities.tnt.homingPrimedTNT;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
@@ -49,9 +49,9 @@ public class homingTNTBlock extends TntBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wasExploded(Level level, BlockPos blockPos, Explosion pExplosion) {
|
||||
public void wasExploded(Level level, @NotNull BlockPos blockPos, @NotNull Explosion pExplosion) {
|
||||
if (!level.isClientSide) {
|
||||
homingPrimedTNT primedtnt = new homingPrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getIndirectSourceEntity(), pRadius, fuseTime, speed);
|
||||
homingPrimedTNT primedtnt = new homingPrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getSourceMob(), pRadius, fuseTime, speed);
|
||||
int i = primedtnt.getFuse();
|
||||
primedtnt.setFuse((short) (level.random.nextInt(i / 4) + i / 8));
|
||||
level.addFreshEntity(primedtnt);
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.jenny.enhancedexplosives.blocks;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.tnt.repulsivePrimedTNT;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.TntBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class repulsiveTNTBlock extends TntBlock {
|
||||
public final float pRadius, speed;
|
||||
public final int fuseTime;
|
||||
|
||||
public repulsiveTNTBlock(Properties p_57422_, float pRadius, int fuseTime, float speed) {
|
||||
super(p_57422_);
|
||||
this.pRadius = pRadius;
|
||||
this.fuseTime = fuseTime;
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCaughtFire(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @Nullable Direction face, @Nullable LivingEntity igniter) {
|
||||
explode(world, pos, igniter, this.pRadius, this.fuseTime, this.speed);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void explode(Level p_57434_, BlockPos p_57435_, float pRadius, int fuseTime, float speed) {
|
||||
explode(p_57434_, p_57435_, (LivingEntity)null, pRadius, fuseTime, speed);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private static void explode(Level level, BlockPos blockPos, @Nullable LivingEntity entity, float pRadius, int fuseTime, float speed) {
|
||||
if (!level.isClientSide) {
|
||||
repulsivePrimedTNT primedtnt = new repulsivePrimedTNT(level, (double)blockPos.getX() + (double)0.5F, (double)blockPos.getY(), (double)blockPos.getZ() + (double)0.5F, entity, pRadius, fuseTime, speed);
|
||||
level.addFreshEntity(primedtnt);
|
||||
level.playSound((Player)null, primedtnt.getX(), primedtnt.getY(), primedtnt.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
level.gameEvent(entity, GameEvent.PRIME_FUSE, blockPos);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wasExploded(Level level, @NotNull BlockPos blockPos, @NotNull Explosion pExplosion) {
|
||||
if (!level.isClientSide) {
|
||||
repulsivePrimedTNT primedtnt = new repulsivePrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getSourceMob(), pRadius, fuseTime, speed);
|
||||
int i = primedtnt.getFuse();
|
||||
primedtnt.setFuse((short) (level.random.nextInt(i / 4) + i / 8));
|
||||
level.addFreshEntity(primedtnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.jenny.enhancedexplosives.blocks;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.tnt.selectivePrimedTNT;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.TntBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class selectiveTNTBlock extends TntBlock {
|
||||
public final float pRadius;
|
||||
public final int fuseTime;
|
||||
|
||||
public selectiveTNTBlock(Properties p_57422_, float pRadius, int fuseTime) {
|
||||
super(p_57422_);
|
||||
this.pRadius = pRadius;
|
||||
this.fuseTime = fuseTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCaughtFire(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @Nullable Direction face, @Nullable LivingEntity igniter) {
|
||||
explode(world, pos, igniter, this.pRadius, this.fuseTime);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void explode(Level p_57434_, BlockPos p_57435_, float pRadius, int fuseTime) {
|
||||
explode(p_57434_, p_57435_, (LivingEntity)null, pRadius, fuseTime);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private static void explode(Level p_57437_, BlockPos p_57438_, @Nullable LivingEntity p_57439_, float pRadius, int fuseTime) {
|
||||
if (!p_57437_.isClientSide) {
|
||||
selectivePrimedTNT primedtnt = new selectivePrimedTNT(p_57437_, (double)p_57438_.getX() + (double)0.5F, (double)p_57438_.getY(), (double)p_57438_.getZ() + (double)0.5F, p_57439_, pRadius, fuseTime);
|
||||
p_57437_.addFreshEntity(primedtnt);
|
||||
p_57437_.playSound((Player)null, primedtnt.getX(), primedtnt.getY(), primedtnt.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
p_57437_.gameEvent(p_57439_, GameEvent.PRIME_FUSE, p_57438_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wasExploded(Level level, @NotNull BlockPos blockPos, @NotNull Explosion pExplosion) {
|
||||
if (!level.isClientSide) {
|
||||
int ft = (short) (level.random.nextInt(fuseTime / 4) + fuseTime / 8);
|
||||
selectivePrimedTNT primedtnt = new selectivePrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getSourceMob(), pRadius, ft);
|
||||
level.addFreshEntity(primedtnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-5
@@ -1,6 +1,6 @@
|
||||
package com.jenny.compressedtnt.blocks;
|
||||
package com.jenny.enhancedexplosives.blocks;
|
||||
|
||||
import com.jenny.compressedtnt.entities.StrongerPrimedTNT;
|
||||
import com.jenny.enhancedexplosives.entities.tnt.StrongerPrimedTNT;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.world.level.block.TntBlock;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -27,7 +28,7 @@ public class strongerTNTBlock extends TntBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCaughtFire(BlockState state, Level world, BlockPos pos, @Nullable Direction face, @Nullable LivingEntity igniter) {
|
||||
public void onCaughtFire(@NotNull BlockState state, @NotNull Level world, @NotNull BlockPos pos, @Nullable Direction face, @Nullable LivingEntity igniter) {
|
||||
explode(world, pos, igniter, this.pRadius, this.fuseTime);
|
||||
}
|
||||
|
||||
@@ -48,10 +49,10 @@ public class strongerTNTBlock extends TntBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wasExploded(Level level, BlockPos blockPos, Explosion pExplosion) {
|
||||
public void wasExploded(Level level, @NotNull BlockPos blockPos, @NotNull Explosion pExplosion) {
|
||||
if (!level.isClientSide) {
|
||||
int ft = (short) (level.random.nextInt(fuseTime / 4) + fuseTime / 8);
|
||||
StrongerPrimedTNT primedtnt = new StrongerPrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getIndirectSourceEntity(), pRadius, ft);
|
||||
StrongerPrimedTNT primedtnt = new StrongerPrimedTNT(level, (double) blockPos.getX() + (double) 0.5F, (double) blockPos.getY(), (double) blockPos.getZ() + (double) 0.5F, pExplosion.getSourceMob(), pRadius, ft);
|
||||
level.addFreshEntity(primedtnt);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.jenny.enhancedexplosives.config;
|
||||
|
||||
import net.minecraftforge.common.ForgeConfigSpec;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
import static com.jenny.enhancedexplosives.EnhancedExplosives.MODID;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class ConfigClient {
|
||||
private static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder();
|
||||
public static final ForgeConfigSpec SPEC;
|
||||
|
||||
public static final ForgeConfigSpec.ConfigValue<Boolean> arrowParticles;
|
||||
public static final ForgeConfigSpec.ConfigValue<Boolean> tntParticles;
|
||||
public static final ForgeConfigSpec.ConfigValue<Double> particlePercent;
|
||||
|
||||
static {
|
||||
arrowParticles =
|
||||
BUILDER.comment("particles from arrows arrows")
|
||||
.define("arrow_particles", true);
|
||||
tntParticles =
|
||||
BUILDER.comment("particles from tnt")
|
||||
.define("tnt_particles", true);
|
||||
particlePercent =
|
||||
BUILDER.comment("amount of spawned particles (0.0 = None, 1.0 = normal, values higher are valid too)")
|
||||
.define("particle_amount", 1.0D);
|
||||
|
||||
SPEC = BUILDER.build();
|
||||
|
||||
}
|
||||
|
||||
public static int calcPCount(int pCount) {
|
||||
return (int) Math.round(pCount * particlePercent.get());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.jenny.enhancedexplosives.config;
|
||||
|
||||
import net.minecraftforge.common.ForgeConfigSpec;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
import static com.jenny.enhancedexplosives.EnhancedExplosives.MODID;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class ConfigServer {
|
||||
private static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder();
|
||||
public static final ForgeConfigSpec SPEC;
|
||||
|
||||
public static final ForgeConfigSpec.ConfigValue<Boolean> claymoreInstantDespawn;
|
||||
public static final ForgeConfigSpec.ConfigValue<Boolean> homingAtPlayers;
|
||||
public static final ForgeConfigSpec.ConfigValue<Boolean> carpetCompactDetonation;
|
||||
|
||||
static {
|
||||
claymoreInstantDespawn =
|
||||
BUILDER.comment("Claymore arrows despawn instantly upon hitting a surface")
|
||||
.define("claymore_instant_arrow_despawn", false);
|
||||
homingAtPlayers =
|
||||
BUILDER.comment("Homing TNTs are allowed to follow players")
|
||||
.define("homing_tnt_target_players", true);
|
||||
carpetCompactDetonation =
|
||||
BUILDER.comment("Carpet Arrow TNTs explode upon explosion damage; This reduces spread")
|
||||
.define("carpet_arrow_compact_detonation", true);
|
||||
|
||||
SPEC = BUILDER.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.jenny.enhancedexplosives;
|
||||
|
||||
import com.jenny.enhancedexplosives.blocks.blocks;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
public class creativeTab {
|
||||
public static final CreativeModeTab CREATIVE_MODE_TAB = new CreativeModeTab("enhancedexplosives") {
|
||||
@Override
|
||||
public ItemStack makeIcon() {
|
||||
return new ItemStack(blocks.TNT_8_ITEM.get());
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.jenny.enhancedexplosives.entities.arrows;
|
||||
|
||||
import com.jenny.enhancedexplosives.config.ConfigClient;
|
||||
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;
|
||||
|
||||
public class baseArrow extends AbstractArrow {
|
||||
private int tick = 0;
|
||||
|
||||
public baseArrow(EntityType<? extends baseArrow> pEntityType, Level pLevel) {
|
||||
super(pEntityType, pLevel);
|
||||
}
|
||||
|
||||
public baseArrow(Level pLevel, LivingEntity pShooter, EntityType<? extends baseArrow> pEntityType) {
|
||||
super(pEntityType, pShooter, pLevel);
|
||||
}
|
||||
|
||||
public baseArrow(Level pLevel, EntityType<? extends baseArrow> pEntityType) {
|
||||
super(pEntityType, pLevel);
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (this.level().isClientSide) {
|
||||
if (!this.inGround && ConfigClient.arrowParticles.get()) {
|
||||
spawnParticles(0);
|
||||
}
|
||||
this.tick++;
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected ItemStack getPickupItem() {
|
||||
return new ItemStack(Items.ARROW);
|
||||
}
|
||||
|
||||
protected Vec3 particlePos(double dist) {
|
||||
Double speed = getDeltaMovement().length();
|
||||
return new Vec3(
|
||||
level().getRandom().nextIntBetweenInclusive(-100, 100),
|
||||
level().getRandom().nextIntBetweenInclusive(-100, 100),
|
||||
level().getRandom().nextIntBetweenInclusive(-100, 100)
|
||||
).normalize().scale(dist + ((double) level().getRandom().nextIntBetweenInclusive(0, 100) / 100)).add(position());
|
||||
}
|
||||
|
||||
public void spawnParticles(float partialTicks) {
|
||||
}
|
||||
|
||||
public int getTick() {
|
||||
return this.tick;
|
||||
}
|
||||
|
||||
public Level level() {
|
||||
return level;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
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;
|
||||
|
||||
public carpetArrow(EntityType<carpetArrow> pEntityType, Level pLevel) {
|
||||
super(pEntityType, pLevel);
|
||||
}
|
||||
|
||||
public carpetArrow(Level pLevel, LivingEntity pShooter) {
|
||||
super(pLevel, pShooter, entities.ARROW_CARPET.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (getDeltaMovement().y < 0) {
|
||||
spawnChildren(childCount);
|
||||
discard();
|
||||
}
|
||||
}
|
||||
|
||||
protected void spawnChildren(int count) {
|
||||
RandomSource rng = level().getRandom();
|
||||
for (int i = 0; i < count; i++) {
|
||||
carpetArrowPart arrow = new carpetArrowPart(entities.ARROW_CARPET_PART.get(), level());
|
||||
double r = (double) rng.nextIntBetweenInclusive(-100, 100) / 200;
|
||||
Vec3 move = new Vec3(
|
||||
(double) rng.nextIntBetweenInclusive(-100, 100) / 100,
|
||||
0,
|
||||
(double) rng.nextIntBetweenInclusive(-100, 100) / 100).normalize().multiply(r, 0, r);
|
||||
arrow.setPos(position());
|
||||
arrow.setDeltaMovement(move.add(getDeltaMovement()));
|
||||
level().addFreshEntity(arrow);
|
||||
}
|
||||
}
|
||||
|
||||
@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++) {
|
||||
double m = (double) level().getRandom().nextIntBetweenInclusive(-100, 100) / 100;
|
||||
Vec3 DeltaMovement = getDeltaMovement();
|
||||
Vec3 pos = particlePos(0.5);
|
||||
level().addParticle(particles.CARPET_ARROW_PARTICLE.get(), pos.x, pos.y, pos.z, DeltaMovement.x, DeltaMovement.y, DeltaMovement.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
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.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class carpetArrowPart extends baseArrow {
|
||||
public carpetArrowPart(EntityType<carpetArrowPart> pEntityType, Level pLevel) {
|
||||
super(pEntityType, pLevel);
|
||||
}
|
||||
|
||||
public carpetArrowPart(Level pLevel, LivingEntity pShooter) {
|
||||
super(pLevel, entities.ARROW_CARPET_PART.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (this.inGround || (this.hurtMarked && !this.level().isClientSide && ConfigServer.carpetCompactDetonation.get())) {
|
||||
explode();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doPostHurtEffects(@NotNull LivingEntity pTarget) {
|
||||
explode();
|
||||
}
|
||||
|
||||
public void explode() {
|
||||
if (!level().isClientSide) {
|
||||
level().explode(this, getX(), getY(), getZ(), 8.0f, Explosion.BlockInteraction.BREAK);
|
||||
}
|
||||
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(1); i++) {
|
||||
double m = (double) level().getRandom().nextIntBetweenInclusive(- 100, 100) / 100;
|
||||
Vec3 DeltaMovement = getDeltaMovement();
|
||||
Vec3 pos = new Vec3(
|
||||
(double) level().getRandom().nextIntBetweenInclusive(-5, 5) / 10,
|
||||
0,
|
||||
(double) level().getRandom().nextIntBetweenInclusive(-5, 5) / 10
|
||||
).normalize().multiply(m, m, m).add(getPosition(partialTicks));
|
||||
level().addParticle(particles.CONCUSSIVE_ARROW_PARTICLE.get(), pos.x, pos.y, pos.z, DeltaMovement.x, DeltaMovement.y, DeltaMovement.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
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.damagesource.DamageSource;
|
||||
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;
|
||||
|
||||
public class claymoreArrow extends baseArrow{
|
||||
private final int r = level().isClientSide ? 0 : (ConfigServer.claymoreInstantDespawn.get() ? -20 : level().getRandom().nextInt(0, 20));
|
||||
|
||||
public claymoreArrow(EntityType<claymoreArrow> pEntityType, Level pLevel) {
|
||||
super(pEntityType, pLevel);
|
||||
|
||||
}
|
||||
|
||||
public claymoreArrow(@NotNull Level pLevel) {
|
||||
super(entities.ARROW_CLAYMORE.get(), pLevel);
|
||||
}
|
||||
|
||||
public claymoreArrow(@NotNull Level pLevel, @NotNull LivingEntity pShooter) {
|
||||
super(pLevel, pShooter, entities.ARROW_CLAYMORE.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doPostHurtEffects(@NotNull LivingEntity pTarget) {
|
||||
pTarget.hurt(DamageSource.arrow(this, getOwner()), 15);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (!level().isClientSide && this.inGroundTime > 20 + r) {
|
||||
discard();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
protected ItemStack getPickupItem() {
|
||||
return new ItemStack(items.CONCUSSIVE_ARROW.get(), 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
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.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class concussiveArrow extends baseArrow{
|
||||
public concussiveArrow(EntityType<concussiveArrow> pEntityType, Level pLevel) {
|
||||
super(pEntityType, pLevel);
|
||||
}
|
||||
|
||||
public concussiveArrow(Level pLevel, LivingEntity pShooter) {
|
||||
super(pLevel, pShooter, entities.ARROW_CONCUSSIVE.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (this.inGround) {
|
||||
this.level().explode(this, getX(), getY(), getZ(), 8.0f, Explosion.BlockInteraction.NONE);
|
||||
this.discard();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doPostHurtEffects(@NotNull LivingEntity pTarget) {
|
||||
this.level().explode(this, getX(), getY(), getZ(), 8.0f, Explosion.BlockInteraction.NONE);
|
||||
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++) {
|
||||
Vec3 delta = getDeltaMovement();
|
||||
Vec3 pos = particlePos(0.5);
|
||||
level().addParticle(particles.CONCUSSIVE_ARROW_PARTICLE.get(), pos.x, pos.y, pos.z, delta.x, delta.y, delta.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
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.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class tntArrow extends baseArrow {
|
||||
public tntArrow(EntityType<tntArrow> pEntityType, Level pLevel) {
|
||||
super(pEntityType, pLevel);
|
||||
}
|
||||
|
||||
public tntArrow(Level pLevel, LivingEntity pShooter) {
|
||||
super(pLevel, pShooter, entities.ARROW_TNT.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (this.inGround) {
|
||||
this.level().explode(this, this.getX(), this.getY(), this.getZ(), 2, Explosion.BlockInteraction.BREAK);
|
||||
this.discard();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doPostHurtEffects(@NotNull LivingEntity pTarget) {
|
||||
this.level().explode(this, this.getX(), this.getY(), this.getZ(), 2, Explosion.BlockInteraction.BREAK);
|
||||
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++) {
|
||||
Vec3 DeltaMovement = getDeltaMovement();
|
||||
Vec3 pos = particlePos(0.5);
|
||||
level().addParticle(particles.TNT_ARROW_PARTICLE.get(), pos.x, pos.y, pos.z, DeltaMovement.x, DeltaMovement.y, DeltaMovement.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.jenny.enhancedexplosives.entities.arrows;
|
||||
|
||||
import com.jenny.enhancedexplosives.config.ConfigClient;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.particles.particles;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class tunnelArrow extends baseArrow{
|
||||
protected static final int explosionCount = 12;
|
||||
protected static final int spacing = 2;
|
||||
protected static final float power = 8;
|
||||
|
||||
public tunnelArrow(EntityType<tunnelArrow> pEntityType, Level pLevel) {
|
||||
super(pEntityType, pLevel);
|
||||
}
|
||||
|
||||
public tunnelArrow(Level pLevel, LivingEntity pShooter) {
|
||||
super(pLevel, pShooter, entities.ARROW_TUNNEL.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (inGround) {
|
||||
if (!level().isClientSide) {
|
||||
explode();
|
||||
}
|
||||
discard();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doPostHurtEffects(@NotNull LivingEntity pTarget) {
|
||||
if (!level().isClientSide) {
|
||||
explode();
|
||||
}
|
||||
discard();
|
||||
}
|
||||
|
||||
protected void explode() {
|
||||
Vec3 rot = getTargetVec( - getXRot(), - getYRot(), 0);
|
||||
for (int i = 0; i < explosionCount; i++) {
|
||||
Vec3 pos = position().add(rot.multiply(i * spacing, i * spacing, i * spacing));
|
||||
level().explode(this, pos.x, pos.y, pos.z,
|
||||
power, Explosion.BlockInteraction.BREAK);
|
||||
}
|
||||
}
|
||||
|
||||
public static Vec3 getTargetVec(float xRot, float yRot, float zRot) {
|
||||
float f = -Mth.sin((float) (yRot * (Math.PI / 180F))) * Mth.cos(xRot * ((float)Math.PI / 180F));
|
||||
float f1 = -Mth.sin((xRot + zRot) * ((float)Math.PI / 180F));
|
||||
float f2 = Mth.cos(yRot * ((float)Math.PI / 180F)) * Mth.cos(xRot * ((float)Math.PI / 180F));
|
||||
return new Vec3(f, f1, f2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnParticles(float partialTicks) {
|
||||
for (int i = 1; i <= ConfigClient.calcPCount(5); i++) {
|
||||
double m = (double) level().getRandom().nextIntBetweenInclusive(- 100, 100) / 100;
|
||||
Vec3 DeltaMovement = getDeltaMovement();
|
||||
Vec3 pos = particlePos(0.5);
|
||||
level().addParticle(particles.TUNNEL_ARROW_PARTICLE.get(), pos.x, pos.y, pos.z, DeltaMovement.x, DeltaMovement.y, DeltaMovement.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.jenny.enhancedexplosives.entities.client;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.tnt.basePrimedTNT;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.block.BlockRenderDispatcher;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderer;
|
||||
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
||||
import net.minecraft.client.renderer.entity.TntMinecartRenderer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlas;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.Mth;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class BaseTNTRenderer<T extends basePrimedTNT> extends EntityRenderer<T> {
|
||||
private final BlockRenderDispatcher blockRenderer;
|
||||
|
||||
public BaseTNTRenderer(EntityRendererProvider.Context pContext) {
|
||||
super(pContext);
|
||||
this.shadowRadius = 0.5F;
|
||||
this.blockRenderer = pContext.getBlockRenderDispatcher();
|
||||
}
|
||||
|
||||
public void render(T pEntity, float pEntityYaw, float pPartialTicks, PoseStack pPoseStack, @NotNull MultiBufferSource pBuffer, int pPackedLight) {
|
||||
pPoseStack.pushPose();
|
||||
pPoseStack.translate(0.0F, 0.5F, 0.0F);
|
||||
int i = pEntity.getFuse();
|
||||
if ((float)i - pPartialTicks + 1.0F < 10.0F) {
|
||||
float f = 1.0F - ((float)i - pPartialTicks + 1.0F) / 10.0F;
|
||||
f = Mth.clamp(f, 0.0F, 1.0F);
|
||||
f *= f;
|
||||
f *= f;
|
||||
float f1 = 1.0F + f * 0.3F;
|
||||
pPoseStack.scale(f1, f1, f1);
|
||||
}
|
||||
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(-90.0F));
|
||||
pPoseStack.translate(-0.5F, -0.5F, 0.5F);
|
||||
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(90.0F));
|
||||
TntMinecartRenderer.renderWhiteSolidBlock(this.blockRenderer, pEntity.renderBlock().defaultBlockState(), pPoseStack, pBuffer, pPackedLight, i / 5 % 2 == 0);
|
||||
pPoseStack.popPose();
|
||||
super.render(pEntity, pEntityYaw, pPartialTicks, pPoseStack, pBuffer, pPackedLight);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ResourceLocation getTextureLocation(@NotNull T pEntity) {
|
||||
return TextureAtlas.LOCATION_BLOCKS;
|
||||
}
|
||||
}
|
||||
+11
-26
@@ -1,9 +1,8 @@
|
||||
package com.jenny.compressedtnt.entities.client;
|
||||
package com.jenny.enhancedexplosives.entities.client;
|
||||
|
||||
import com.jenny.compressedtnt.blocks.blocks;
|
||||
import com.jenny.compressedtnt.entities.basePrimedTNT;
|
||||
import com.jenny.enhancedexplosives.entities.tnt.selectivePrimedTNT;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Axis;
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.block.BlockRenderDispatcher;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderer;
|
||||
@@ -13,19 +12,18 @@ import net.minecraft.client.renderer.texture.TextureAtlas;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class BaseTNTRenderer extends EntityRenderer<basePrimedTNT> {
|
||||
public class SelectiveTNTRenderer<T extends selectivePrimedTNT> extends EntityRenderer<T> {
|
||||
private final BlockRenderDispatcher blockRenderer;
|
||||
|
||||
public BaseTNTRenderer(EntityRendererProvider.Context pContext) {
|
||||
public SelectiveTNTRenderer(EntityRendererProvider.Context pContext) {
|
||||
super(pContext);
|
||||
this.shadowRadius = 0.5F;
|
||||
this.blockRenderer = pContext.getBlockRenderDispatcher();
|
||||
}
|
||||
|
||||
public void render(basePrimedTNT pEntity, float pEntityYaw, float pPartialTicks, PoseStack pPoseStack, @NotNull MultiBufferSource pBuffer, int pPackedLight) {
|
||||
public void render(T pEntity, float pEntityYaw, float pPartialTicks, PoseStack pPoseStack, @NotNull MultiBufferSource pBuffer, int pPackedLight) {
|
||||
pPoseStack.pushPose();
|
||||
pPoseStack.translate(0.0F, 0.5F, 0.0F);
|
||||
int i = pEntity.getFuse();
|
||||
@@ -37,30 +35,17 @@ public class BaseTNTRenderer extends EntityRenderer<basePrimedTNT> {
|
||||
float f1 = 1.0F + f * 0.3F;
|
||||
pPoseStack.scale(f1, f1, f1);
|
||||
}
|
||||
String renderID = pEntity.getRenderID();
|
||||
if (renderID == null) {
|
||||
renderID = "";
|
||||
}
|
||||
Block block = switch (renderID) {
|
||||
case "stronger_8" -> blocks.TNT_8.get();
|
||||
case "stronger_16" -> blocks.TNT_16.get();
|
||||
case "stronger_32" -> blocks.TNT_32.get();
|
||||
case "stronger_64" -> blocks.TNT_64.get();
|
||||
case "stronger_128" -> blocks.TNT_128.get();
|
||||
case "homing" -> blocks.TNT_HOMING.get();
|
||||
default -> Blocks.NETHER_PORTAL; // placeholder for debugging
|
||||
};
|
||||
|
||||
pPoseStack.mulPose(Axis.YP.rotationDegrees(-90.0F));
|
||||
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(-90.0F));
|
||||
pPoseStack.translate(-0.5F, -0.5F, 0.5F);
|
||||
pPoseStack.mulPose(Axis.YP.rotationDegrees(90.0F));
|
||||
TntMinecartRenderer.renderWhiteSolidBlock(this.blockRenderer, block.defaultBlockState(), pPoseStack, pBuffer, pPackedLight, i / 5 % 2 == 0);
|
||||
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(90.0F));
|
||||
Block block = (i / 5 % 2 == 0) ? pEntity.renderBlockBeneath(): pEntity.renderBlock();
|
||||
TntMinecartRenderer.renderWhiteSolidBlock(this.blockRenderer, block.defaultBlockState(), pPoseStack, pBuffer, pPackedLight, false);
|
||||
pPoseStack.popPose();
|
||||
super.render(pEntity, pEntityYaw, pPartialTicks, pPoseStack, pBuffer, pPackedLight);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ResourceLocation getTextureLocation(@NotNull basePrimedTNT pEntity) {
|
||||
public ResourceLocation getTextureLocation(@NotNull T pEntity) {
|
||||
return TextureAtlas.LOCATION_BLOCKS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.jenny.enhancedexplosives.entities.client;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.arrows.baseArrow;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.block.BlockRenderDispatcher;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderer;
|
||||
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
||||
import net.minecraft.client.renderer.entity.TntMinecartRenderer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlas;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class TNTArrowRenderer extends EntityRenderer<baseArrow> {
|
||||
private final BlockRenderDispatcher blockRenderer;
|
||||
|
||||
public TNTArrowRenderer(EntityRendererProvider.Context pContext) {
|
||||
super(pContext);
|
||||
this.shadowRadius = 0.0F;
|
||||
this.blockRenderer = pContext.getBlockRenderDispatcher();
|
||||
}
|
||||
|
||||
public void render(@NotNull baseArrow pEntity, float pEntityYaw, float pPartialTicks, PoseStack pPoseStack, @NotNull MultiBufferSource pBuffer, int pPackedLight) {
|
||||
|
||||
pPoseStack.pushPose();
|
||||
pPoseStack.translate(0.0F, 0.5F, 0.0F);
|
||||
pPoseStack.scale(0.5f, 0.5f, 0.5f);
|
||||
int i = pEntity.getTick();
|
||||
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(-90.0F));
|
||||
pPoseStack.translate(-0.5F, -0.5F, 0.5F);
|
||||
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(90.0F));
|
||||
TntMinecartRenderer.renderWhiteSolidBlock(this.blockRenderer, Blocks.TNT.defaultBlockState(), pPoseStack, pBuffer, pPackedLight, i / 5 % 2 == 0);
|
||||
pPoseStack.popPose();
|
||||
super.render(pEntity, pEntityYaw, pPartialTicks, pPoseStack, pBuffer, pPackedLight);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ResourceLocation getTextureLocation(@NotNull baseArrow pEntity) {
|
||||
return TextureAtlas.LOCATION_BLOCKS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.jenny.enhancedexplosives.entities.client;
|
||||
|
||||
import net.minecraft.client.renderer.entity.ArrowRenderer;
|
||||
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.projectile.AbstractArrow;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static net.minecraft.client.renderer.entity.TippableArrowRenderer.NORMAL_ARROW_LOCATION;
|
||||
|
||||
public class baseArrowRenderer extends ArrowRenderer<AbstractArrow> {
|
||||
public baseArrowRenderer(EntityRendererProvider.Context pContext) {
|
||||
super(pContext);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ResourceLocation getTextureLocation(@NotNull AbstractArrow pEntity) {
|
||||
return NORMAL_ARROW_LOCATION;
|
||||
}
|
||||
}
|
||||
+10
-11
@@ -1,8 +1,8 @@
|
||||
package com.jenny.compressedtnt.entities.client;
|
||||
package com.jenny.enhancedexplosives.entities.client;
|
||||
|
||||
import com.jenny.compressedtnt.entities.ClusterPrimedTNT;
|
||||
import com.jenny.enhancedexplosives.entities.tnt.basePrimedTNT;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Axis;
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.block.BlockRenderDispatcher;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderer;
|
||||
@@ -11,10 +11,9 @@ import net.minecraft.client.renderer.entity.TntMinecartRenderer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlas;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class clusterTNTRenderer extends EntityRenderer<ClusterPrimedTNT> {
|
||||
public class clusterTNTRenderer extends EntityRenderer<basePrimedTNT> {
|
||||
private final BlockRenderDispatcher blockRenderer;
|
||||
|
||||
public clusterTNTRenderer(EntityRendererProvider.Context pContext) {
|
||||
@@ -23,7 +22,7 @@ public class clusterTNTRenderer extends EntityRenderer<ClusterPrimedTNT> {
|
||||
this.blockRenderer = pContext.getBlockRenderDispatcher();
|
||||
}
|
||||
|
||||
public void render(ClusterPrimedTNT pEntity, float pEntityYaw, float pPartialTicks, PoseStack pPoseStack, @NotNull MultiBufferSource pBuffer, int pPackedLight) {
|
||||
public void render(basePrimedTNT pEntity, float pEntityYaw, float pPartialTicks, PoseStack pPoseStack, @NotNull MultiBufferSource pBuffer, int pPackedLight) {
|
||||
pPoseStack.pushPose();
|
||||
pPoseStack.translate(0.0F, 0.5F, 0.0F);
|
||||
int i = pEntity.getFuse();
|
||||
@@ -39,15 +38,15 @@ public class clusterTNTRenderer extends EntityRenderer<ClusterPrimedTNT> {
|
||||
pPoseStack.scale(0.5f, 0.5f, 0.5f);
|
||||
}
|
||||
|
||||
pPoseStack.mulPose(Axis.YP.rotationDegrees(-90.0F));
|
||||
pPoseStack.translate(-0.5F, -0.5F, 0.5F);
|
||||
pPoseStack.mulPose(Axis.YP.rotationDegrees(90.0F));
|
||||
TntMinecartRenderer.renderWhiteSolidBlock(this.blockRenderer, Blocks.TNT.defaultBlockState(), pPoseStack, pBuffer, pPackedLight, i / 5 % 2 == 0);
|
||||
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(-90.0F));
|
||||
pPoseStack.translate(-0.5F, -1.0F, 0.5F);
|
||||
pPoseStack.mulPose(Vector3f.YP.rotationDegrees(90.0F));
|
||||
TntMinecartRenderer.renderWhiteSolidBlock(this.blockRenderer, pEntity.renderBlock().defaultBlockState(), pPoseStack, pBuffer, pPackedLight, i / 5 % 2 == 0);
|
||||
pPoseStack.popPose();
|
||||
super.render(pEntity, pEntityYaw, pPartialTicks, pPoseStack, pBuffer, pPackedLight);
|
||||
}
|
||||
|
||||
public @NotNull ResourceLocation getTextureLocation(@NotNull ClusterPrimedTNT pEntity) {
|
||||
public @NotNull ResourceLocation getTextureLocation(@NotNull basePrimedTNT pEntity) {
|
||||
return TextureAtlas.LOCATION_BLOCKS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.jenny.enhancedexplosives.entities;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.arrows.*;
|
||||
import com.jenny.enhancedexplosives.entities.client.*;
|
||||
import com.jenny.enhancedexplosives.entities.throwable.dynamite;
|
||||
import com.jenny.enhancedexplosives.entities.tnt.*;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderers;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.MobCategory;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
import static com.jenny.enhancedexplosives.EnhancedExplosives.MODID;
|
||||
|
||||
public class entities {
|
||||
public static final DeferredRegister<EntityType<?>> ENTITY_TYPES =
|
||||
DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, MODID);
|
||||
|
||||
public static final RegistryObject<EntityType<homingPrimedTNT>> TNT_HOMING =
|
||||
ENTITY_TYPES.register("tnt_homing", () -> EntityType.Builder.<homingPrimedTNT>of(homingPrimedTNT::new, MobCategory.MISC)
|
||||
.fireImmune().sized(0.98F, 0.98F).clientTrackingRange(10).updateInterval(10).build("tnt_homing"));
|
||||
|
||||
public static final RegistryObject<EntityType<StrongerPrimedTNT>> TNT_STRONGER =
|
||||
ENTITY_TYPES.register("tnt_stronger", () -> EntityType.Builder.<StrongerPrimedTNT>of(StrongerPrimedTNT::new, MobCategory.MISC)
|
||||
.fireImmune().sized(0.98F, 0.98F).clientTrackingRange(10).updateInterval(10).build("tnt_stronger"));
|
||||
|
||||
public static final RegistryObject<EntityType<ClusterPrimedTNT>> TNT_CLUSTER =
|
||||
ENTITY_TYPES.register("tnt_cluster", () -> EntityType.Builder.<ClusterPrimedTNT>of(ClusterPrimedTNT::new, MobCategory.MISC)
|
||||
.fireImmune().sized(0.48F, 0.48F).clientTrackingRange(10).updateInterval(10).build("tnt_cluster"));
|
||||
|
||||
public static final RegistryObject<EntityType<blackHolePrimedTNT>> TNT_BLACK_HOLE =
|
||||
ENTITY_TYPES.register("tnt_blackhole", () -> EntityType.Builder.<blackHolePrimedTNT>of(blackHolePrimedTNT::new, MobCategory.MISC)
|
||||
.fireImmune().sized(0.98F, 0.98F).clientTrackingRange(10).updateInterval(10).build("tnt_blackhole"));
|
||||
|
||||
public static final RegistryObject<EntityType<selectivePrimedTNT>> TNT_SELECTIVE =
|
||||
ENTITY_TYPES.register("tnt_selective", () -> EntityType.Builder.<selectivePrimedTNT>of(selectivePrimedTNT::new, MobCategory.MISC)
|
||||
.fireImmune().sized(0.98F, 0.98F).clientTrackingRange(10).updateInterval(10).build("tnt_selective"));
|
||||
|
||||
public static final RegistryObject<EntityType<claymorePrimedTNT>> TNT_CLAYMORE =
|
||||
ENTITY_TYPES.register("tnt_claymore", () -> EntityType.Builder.<claymorePrimedTNT>of(claymorePrimedTNT::new, MobCategory.MISC)
|
||||
.fireImmune().sized(0.98F, 0.98F).clientTrackingRange(10).updateInterval(10).build("tnt_claymore"));
|
||||
|
||||
public static final RegistryObject<EntityType<enderPrimedTNT>> TNT_ENDER =
|
||||
ENTITY_TYPES.register("tnt_ender", () -> EntityType.Builder.<enderPrimedTNT>of(enderPrimedTNT::new, MobCategory.MISC)
|
||||
.fireImmune().sized(0.98F, 0.98F).clientTrackingRange(10).updateInterval(10).build("tnt_ender"));
|
||||
|
||||
public static final RegistryObject<EntityType<repulsivePrimedTNT>> TNT_REPULSIVE =
|
||||
ENTITY_TYPES.register("tnt_repulsive", () -> EntityType.Builder.<repulsivePrimedTNT>of(repulsivePrimedTNT::new, MobCategory.MISC)
|
||||
.fireImmune().sized(0.98F, 0.98F).clientTrackingRange(10).updateInterval(10).build("tnt_repulsive"));
|
||||
|
||||
public static final RegistryObject<EntityType<bedrockPrimedTNT>> TNT_BEDROCK =
|
||||
ENTITY_TYPES.register("tnt_bedrock", () -> EntityType.Builder.<bedrockPrimedTNT>of(bedrockPrimedTNT::new, MobCategory.MISC)
|
||||
.sized(0.98F, 0.7F).fireImmune().clientTrackingRange(8).build("tnt_bedrock"));
|
||||
|
||||
public static final RegistryObject<EntityType<EntityPrimedTNT>> TNT_ENTITY =
|
||||
ENTITY_TYPES.register("tnt_entity", () -> EntityType.Builder.<EntityPrimedTNT>of(EntityPrimedTNT::new, MobCategory.MISC)
|
||||
.sized(0.98F, 0.7F).fireImmune().clientTrackingRange(8).build("tnt_entity"));
|
||||
|
||||
|
||||
public static final RegistryObject<EntityType<tntArrow>> ARROW_TNT =
|
||||
ENTITY_TYPES.register("arrow_tnt", () -> EntityType.Builder.<tntArrow>of(tntArrow::new, MobCategory.MISC)
|
||||
.sized(0.48F, 0.48F).clientTrackingRange(64).build("arrow_tnt"));
|
||||
|
||||
public static final RegistryObject<EntityType<concussiveArrow>> ARROW_CONCUSSIVE =
|
||||
ENTITY_TYPES.register("arrow_concussive", () -> EntityType.Builder.<concussiveArrow>of(concussiveArrow::new, MobCategory.MISC)
|
||||
.sized(0.48F, 0.48F).clientTrackingRange(64).build("arrow_concussive"));
|
||||
|
||||
public static final RegistryObject<EntityType<carpetArrow>> ARROW_CARPET =
|
||||
ENTITY_TYPES.register("arrow_carpet", () -> EntityType.Builder.<carpetArrow>of(carpetArrow::new, MobCategory.MISC)
|
||||
.sized(0.48F, 0.48F).clientTrackingRange(64).build("arrow_carpet"));
|
||||
|
||||
public static final RegistryObject<EntityType<claymoreArrow>> ARROW_CLAYMORE =
|
||||
ENTITY_TYPES.register("arrow_claymore", () -> EntityType.Builder.<claymoreArrow>of(claymoreArrow::new, MobCategory.MISC)
|
||||
.sized(0.48F, 0.48F).clientTrackingRange(64).build("arrow_claymore"));
|
||||
|
||||
public static final RegistryObject<EntityType<carpetArrowPart>> ARROW_CARPET_PART =
|
||||
ENTITY_TYPES.register("arrow_carpet_part", () -> EntityType.Builder.<carpetArrowPart>of(carpetArrowPart::new, MobCategory.MISC)
|
||||
.sized(0.48F, 0.48F).clientTrackingRange(64).build("arrow_carpet_part"));
|
||||
|
||||
public static final RegistryObject<EntityType<dynamite>> DYNAMITE =
|
||||
ENTITY_TYPES.register("dynamite", () -> EntityType.Builder.<dynamite>of(dynamite::new, MobCategory.MISC)
|
||||
.sized(0.48F, 0.48F).clientTrackingRange(64).build("dynamite"));
|
||||
|
||||
public static final RegistryObject<EntityType<tunnelArrow>> ARROW_TUNNEL =
|
||||
ENTITY_TYPES.register("arrow_tunnel", () -> EntityType.Builder.<tunnelArrow>of(tunnelArrow::new, MobCategory.MISC)
|
||||
.sized(0.48F, 0.48F).clientTrackingRange(64).build("arrow_tunnel"));
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
ENTITY_TYPES.register(eventBus);
|
||||
}
|
||||
|
||||
public static void registerRenderers () {
|
||||
EntityRenderers.register(TNT_STRONGER.get(), BaseTNTRenderer::new);
|
||||
EntityRenderers.register(TNT_HOMING.get(), BaseTNTRenderer::new);
|
||||
EntityRenderers.register(TNT_BLACK_HOLE.get(), BaseTNTRenderer::new);
|
||||
EntityRenderers.register(TNT_CLAYMORE.get(), BaseTNTRenderer::new);
|
||||
EntityRenderers.register(TNT_ENDER.get(), BaseTNTRenderer::new);
|
||||
EntityRenderers.register(TNT_REPULSIVE.get(), BaseTNTRenderer::new);
|
||||
EntityRenderers.register(TNT_BEDROCK.get(), BaseTNTRenderer::new);
|
||||
EntityRenderers.register(TNT_ENTITY.get(), BaseTNTRenderer::new);
|
||||
|
||||
EntityRenderers.register(TNT_SELECTIVE.get(), SelectiveTNTRenderer::new);
|
||||
|
||||
EntityRenderers.register(TNT_CLUSTER.get(), clusterTNTRenderer::new);
|
||||
EntityRenderers.register(DYNAMITE.get(), clusterTNTRenderer::new);
|
||||
|
||||
EntityRenderers.register(ARROW_TNT.get(), TNTArrowRenderer::new);
|
||||
EntityRenderers.register(ARROW_CONCUSSIVE.get(), TNTArrowRenderer::new);
|
||||
EntityRenderers.register(ARROW_CARPET.get(), TNTArrowRenderer::new);
|
||||
EntityRenderers.register(ARROW_CARPET_PART.get(), TNTArrowRenderer::new);
|
||||
EntityRenderers.register(ARROW_TUNNEL.get(), TNTArrowRenderer::new);
|
||||
|
||||
EntityRenderers.register(ARROW_CLAYMORE.get(), baseArrowRenderer::new);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.jenny.enhancedexplosives.entities.throwable;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.entities.tnt.basePrimedTNT;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.MoverType;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class dynamite extends basePrimedTNT {
|
||||
public dynamite (Level pLevel, double pX, double pY, double pZ, @Nullable LivingEntity pOwner, float power, int fuse) {
|
||||
super(entities.DYNAMITE.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power);
|
||||
}
|
||||
|
||||
public dynamite(EntityType<dynamite> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
if (!this.isNoGravity()) {
|
||||
this.setDeltaMovement(this.getDeltaMovement().add(0.0D, -0.04D, 0.0D));
|
||||
}
|
||||
Vec3 beforeMove = getDeltaMovement();
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
this.setDeltaMovement(this.getDeltaMovement().scale(0.98D));
|
||||
if (this.onGround) {
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.7D, 0, 0.7D).add(0, (-beforeMove.y) * 0.5, 0));
|
||||
}
|
||||
|
||||
int i = this.getFuse() - 1;
|
||||
this.setFuse(i);
|
||||
if (i <= 0) {
|
||||
this.discard();
|
||||
if (!this.level().isClientSide) {
|
||||
this.explode();
|
||||
}
|
||||
} else {
|
||||
this.updateInWaterStateAndDoFluidPushing();
|
||||
if (this.level().isClientSide) {
|
||||
spawnParticles();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void shootFromRotation(Entity pShooter, float pX, float pY, float pZ, float pVelocity) {
|
||||
float f = -Mth.sin(pY * ((float)Math.PI / 180F)) * Mth.cos(pX * ((float)Math.PI / 180F));
|
||||
float f1 = -Mth.sin((pX + pZ) * ((float)Math.PI / 180F));
|
||||
float f2 = Mth.cos(pY * ((float)Math.PI / 180F)) * Mth.cos(pX * ((float)Math.PI / 180F));
|
||||
Vec3 vec = new Vec3(f, f1, f2).multiply(pVelocity, pVelocity, pVelocity);
|
||||
this.setDeltaMovement(vec);
|
||||
Vec3 vec3 = pShooter.getDeltaMovement();
|
||||
this.setDeltaMovement(this.getDeltaMovement().add(vec3.x, pShooter.isOnGround() ? 0.0D : vec3.y, vec3.z));
|
||||
}
|
||||
|
||||
public Block renderBlock() {
|
||||
return Blocks.TNT;
|
||||
}
|
||||
}
|
||||
+13
-5
@@ -1,8 +1,12 @@
|
||||
package com.jenny.compressedtnt.entities;
|
||||
package com.jenny.enhancedexplosives.entities.tnt;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.util;
|
||||
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.level.block.Blocks;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@@ -10,12 +14,16 @@ import javax.annotation.Nullable;
|
||||
public class ClusterPrimedTNT extends basePrimedTNT {
|
||||
|
||||
public ClusterPrimedTNT (Level pLevel, double pX, double pY, double pZ, @Nullable LivingEntity pOwner, float power, int fuse, Vec3 move) {
|
||||
super(entities.TNT_CLUSTER.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power, "cluster");
|
||||
this.addDeltaMovement(move);
|
||||
super(entities.TNT_CLUSTER.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power);
|
||||
util.addDeltaMovement(this, move);
|
||||
}
|
||||
|
||||
public ClusterPrimedTNT(EntityType<ClusterPrimedTNT> entityType, Level level) {
|
||||
super(entityType, level, null);
|
||||
this.setRenderID("cluster");
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block renderBlock() {
|
||||
return Blocks.TNT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.jenny.enhancedexplosives.entities.tnt;
|
||||
|
||||
import com.jenny.enhancedexplosives.blocks.blocks;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.ExplosionDamageCalculator;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Objects;
|
||||
|
||||
public class EntityPrimedTNT extends basePrimedTNT {
|
||||
static class noEntityExplosionCalculator extends ExplosionDamageCalculator {
|
||||
public boolean shouldBlockExplode(@NotNull Explosion pExplosion, @NotNull BlockGetter pReader, @NotNull BlockPos pPos, @NotNull BlockState pState, float pPower) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public EntityPrimedTNT(Level pLevel, double pX, double pY, double pZ, @Nullable LivingEntity pOwner, float power, int fuse) {
|
||||
super(entities.TNT_ENTITY.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power);
|
||||
}
|
||||
|
||||
public EntityPrimedTNT(EntityType<EntityPrimedTNT> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
}
|
||||
@Override
|
||||
protected void explode() {
|
||||
noEntityExplosionCalculator dmgCalc = new noEntityExplosionCalculator();
|
||||
this.level().explode(this, DamageSource.explosion(getOwner()), dmgCalc, getX(), getY(), getZ(), getPower(), false, Explosion.BlockInteraction.BREAK);
|
||||
}
|
||||
|
||||
public BlockPos getBlockBelow() {
|
||||
return new BlockPos((int) Math.floor(getX()), (int) Math.floor(getY()) - 1, (int) Math.floor(getZ()));
|
||||
}
|
||||
|
||||
public String getBlock() {
|
||||
return level().getBlockState(getBlockBelow()).getBlock().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block renderBlock() {
|
||||
return blocks.TNT_ENTITY.get();
|
||||
}
|
||||
}
|
||||
+15
-13
@@ -1,32 +1,34 @@
|
||||
package com.jenny.compressedtnt.entities;
|
||||
package com.jenny.enhancedexplosives.entities.tnt;
|
||||
|
||||
import com.jenny.enhancedexplosives.blocks.blocks;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
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.level.block.Blocks;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class StrongerPrimedTNT extends basePrimedTNT {
|
||||
public StrongerPrimedTNT (Level pLevel, double pX, double pY, double pZ, @Nullable LivingEntity pOwner, float power, int fuse) {
|
||||
super(entities.TNT_STRONGER.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power, "default");
|
||||
this.setRenderID(evalRenderID());
|
||||
super(entities.TNT_STRONGER.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power);
|
||||
}
|
||||
|
||||
public StrongerPrimedTNT(EntityType<StrongerPrimedTNT> entityType, Level level) {
|
||||
super(entityType, level, null);
|
||||
this.setRenderID(evalRenderID());
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
public String evalRenderID() {
|
||||
int a = (int) this.getPower();
|
||||
@Override
|
||||
public Block renderBlock() {
|
||||
return switch ((int) this.getPower()) {
|
||||
case 8 -> "stronger_8";
|
||||
case 16 -> "stronger_16";
|
||||
case 32 -> "stronger_32";
|
||||
case 64 -> "stronger_64";
|
||||
case 128 -> "stronger_128";
|
||||
default -> "default";
|
||||
case 8 -> blocks.TNT_8.get();
|
||||
case 16 -> blocks.TNT_16.get();
|
||||
case 32 -> blocks.TNT_32.get();
|
||||
case 64 -> blocks.TNT_64.get();
|
||||
case 128 -> blocks.TNT_128.get();
|
||||
default -> Blocks.END_GATEWAY;
|
||||
};
|
||||
}
|
||||
}
|
||||
+56
-37
@@ -1,51 +1,51 @@
|
||||
package com.jenny.compressedtnt.entities;
|
||||
package com.jenny.enhancedexplosives.entities.tnt;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import com.jenny.enhancedexplosives.config.ConfigClient;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.game.ClientboundAddEntityPacket;
|
||||
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.level.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public abstract class basePrimedTNT extends Entity implements TraceableEntity {
|
||||
public abstract class basePrimedTNT extends Entity {
|
||||
private static final EntityDataAccessor<Integer> DATA_FUSE_ID = SynchedEntityData.defineId(basePrimedTNT.class, EntityDataSerializers.INT);
|
||||
private static final EntityDataAccessor<Float> DATA_POWER_ID = SynchedEntityData.defineId(basePrimedTNT.class, EntityDataSerializers.FLOAT);
|
||||
private static final EntityDataAccessor<String> DATA_RENDER_ID = SynchedEntityData.defineId(basePrimedTNT.class, EntityDataSerializers.STRING);
|
||||
|
||||
@Nullable
|
||||
private LivingEntity owner;
|
||||
private int fuse = 0;
|
||||
|
||||
private String renderID = "default";
|
||||
|
||||
public basePrimedTNT(EntityType<? extends basePrimedTNT> pEntityType, Level pLevel, @Nullable LivingEntity owner) {
|
||||
public basePrimedTNT(EntityType<? extends basePrimedTNT> pEntityType, @NotNull Level pLevel) {
|
||||
super(pEntityType, pLevel);
|
||||
commonInit(pLevel, owner);
|
||||
this.blocksBuilding = true;
|
||||
}
|
||||
|
||||
private void commonInit(Level pLevel, @Nullable LivingEntity owner) {
|
||||
public basePrimedTNT(EntityType<? extends basePrimedTNT> pEntityType, @NotNull Level pLevel, @Nullable LivingEntity owner, Vec3 pos, int fuse, float power) {
|
||||
this(pEntityType, pLevel);
|
||||
setPos(pos);
|
||||
double d0 = pLevel.random.nextDouble() * (double) ((float) Math.PI * 2F);
|
||||
this.setDeltaMovement(-Math.sin(d0) * 0.02D, (double) 0.2F, -Math.cos(d0) * 0.02D);
|
||||
this.blocksBuilding = true;
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public basePrimedTNT(EntityType<? extends basePrimedTNT> pEntityType, Level pLevel, @Nullable LivingEntity owner, Vec3 pos, int fuse, float power, String renderID) {
|
||||
super(pEntityType, pLevel);
|
||||
commonInit(pLevel, owner);
|
||||
setPos(pos);
|
||||
this.setOwner(owner);
|
||||
this.xo = pos.x;
|
||||
this.yo = pos.y;
|
||||
this.zo = pos.z;
|
||||
setFuse(fuse);
|
||||
setPower(power);
|
||||
setRenderID(renderID);
|
||||
}
|
||||
|
||||
protected void explode() {
|
||||
this.level().explode(this, this.getX(), this.getY(0.0625D), this.getZ(), this.getPower(), Level.ExplosionInteraction.TNT);
|
||||
this.level().explode(this, this.getX(), this.getY(0.0625D), this.getZ(), this.getPower(), Explosion.BlockInteraction.BREAK);
|
||||
}
|
||||
|
||||
public int getFuse() {
|
||||
@@ -65,13 +65,25 @@ public abstract class basePrimedTNT extends Entity implements TraceableEntity {
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
if (!level().isClientSide) {
|
||||
System.out.println("Server: " + tickCount + "|x=" + (getX() - 0.5F) + "|y=" + getY() + "|z=" + (getZ() - 0.5F));
|
||||
} else {
|
||||
System.out.println("Client: " + tickCount + "|x=" + (getX() - 0.5F) + "|y=" + getY() + "|z=" + (getZ() - 0.5F));
|
||||
}
|
||||
|
||||
|
||||
if (level().isClientSide) {
|
||||
if (ConfigClient.tntParticles.get()) {
|
||||
spawnParticles();
|
||||
}
|
||||
}
|
||||
if (!this.isNoGravity()) {
|
||||
this.setDeltaMovement(this.getDeltaMovement().add(0.0D, -0.04D, 0.0D));
|
||||
}
|
||||
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
this.setDeltaMovement(this.getDeltaMovement().scale(0.98D));
|
||||
if (this.onGround()) {
|
||||
if (this.onGround) {
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.7D, -0.5D, 0.7D));
|
||||
}
|
||||
|
||||
@@ -84,9 +96,6 @@ public abstract class basePrimedTNT extends Entity implements TraceableEntity {
|
||||
}
|
||||
} else {
|
||||
this.updateInWaterStateAndDoFluidPushing();
|
||||
if (this.level().isClientSide) {
|
||||
this.level().addParticle(ParticleTypes.SMOKE, this.getX(), this.getY() + 0.5D, this.getZ(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,26 +103,24 @@ public abstract class basePrimedTNT extends Entity implements TraceableEntity {
|
||||
return !this.isRemoved();
|
||||
}
|
||||
|
||||
protected Entity.MovementEmission getMovementEmission() {
|
||||
return Entity.MovementEmission.NONE;
|
||||
@NotNull
|
||||
protected MovementEmission getMovementEmission() {
|
||||
return MovementEmission.NONE;
|
||||
}
|
||||
|
||||
protected void defineSynchedData() {
|
||||
this.entityData.define(DATA_FUSE_ID, 80);
|
||||
this.entityData.define(DATA_POWER_ID, 4.0f);
|
||||
this.entityData.define(DATA_RENDER_ID, "default");
|
||||
}
|
||||
|
||||
protected void addAdditionalSaveData(CompoundTag pCompound) {
|
||||
pCompound.putShort("Fuse", (short)this.getFuse());
|
||||
pCompound.putFloat("Power", (short)this.getPower());
|
||||
pCompound.putString("RenderID", getRenderID());
|
||||
}
|
||||
|
||||
protected void readAdditionalSaveData(CompoundTag pCompound) {
|
||||
this.setFuse(pCompound.getShort("Fuse"));
|
||||
this.setPower(pCompound.getFloat("Power"));
|
||||
this.setRenderID(pCompound.getString("RenderID"));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -121,19 +128,31 @@ public abstract class basePrimedTNT extends Entity implements TraceableEntity {
|
||||
return this.owner;
|
||||
}
|
||||
|
||||
public void setOwner(LivingEntity owner) {
|
||||
public void setOwner(@Nullable LivingEntity owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public void setRenderID(String renderID) {
|
||||
this.entityData.set(DATA_RENDER_ID, renderID);
|
||||
}
|
||||
|
||||
public String getRenderID() {
|
||||
return this.entityData.get(DATA_RENDER_ID);
|
||||
}
|
||||
|
||||
protected float getEyeHeight(@NotNull Pose pPose, @NotNull EntityDimensions pSize) {
|
||||
return 0.15F;
|
||||
}
|
||||
|
||||
public Block renderBlock() {
|
||||
return Blocks.GLASS;
|
||||
}
|
||||
|
||||
public int defaultFuse() {
|
||||
return this.fuse;
|
||||
}
|
||||
|
||||
public void spawnParticles() {
|
||||
level().addParticle(ParticleTypes.SMOKE, getX(), getY(), getZ(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public Level level() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public Packet<?> getAddEntityPacket() {
|
||||
return new ClientboundAddEntityPacket(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.jenny.enhancedexplosives.entities.tnt;
|
||||
|
||||
import com.jenny.enhancedexplosives.blocks.blocks;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.ExplosionDamageCalculator;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Objects;
|
||||
|
||||
public class bedrockPrimedTNT extends basePrimedTNT {
|
||||
static class noExplosionCalculator extends ExplosionDamageCalculator {
|
||||
public boolean shouldBlockExplode(@NotNull Explosion pExplosion, @NotNull BlockGetter pReader, @NotNull BlockPos pPos, @NotNull BlockState pState, float pPower) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bedrockPrimedTNT(Level pLevel, double pX, double pY, double pZ, @Nullable LivingEntity pOwner, float power, int fuse) {
|
||||
super(entities.TNT_BEDROCK.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power);
|
||||
}
|
||||
|
||||
public bedrockPrimedTNT(EntityType<bedrockPrimedTNT> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
}
|
||||
@Override
|
||||
protected void explode() {
|
||||
noExplosionCalculator dmgCalc = new noExplosionCalculator();
|
||||
this.level().explode(this, DamageSource.explosion(getOwner()), dmgCalc, getX(), getY(), getZ(), getPower(), false, Explosion.BlockInteraction.BREAK);
|
||||
explodeBelow();
|
||||
}
|
||||
|
||||
public BlockPos getBlockBelow() {
|
||||
return new BlockPos((int) Math.floor(getX()), (int) Math.floor(getY()) - 1, (int) Math.floor(getZ()));
|
||||
}
|
||||
|
||||
public String getBlock() {
|
||||
return level().getBlockState(getBlockBelow()).getBlock().toString();
|
||||
}
|
||||
|
||||
private void explodeBelow()
|
||||
{
|
||||
if (Objects.equals(getBlock(), Blocks.BEDROCK.toString())) {
|
||||
level().destroyBlock(getBlockBelow(), false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block renderBlock() {
|
||||
return blocks.TNT_BEDROCK.get();
|
||||
}
|
||||
}
|
||||
+16
-6
@@ -1,11 +1,17 @@
|
||||
package com.jenny.compressedtnt.entities;
|
||||
package com.jenny.enhancedexplosives.entities.tnt;
|
||||
|
||||
import com.jenny.enhancedexplosives.blocks.blocks;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.util;
|
||||
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;
|
||||
|
||||
@@ -16,13 +22,12 @@ public class blackHolePrimedTNT extends basePrimedTNT {
|
||||
private static final EntityDataAccessor<Float> DATA_SPEED_ID = SynchedEntityData.defineId(blackHolePrimedTNT.class, EntityDataSerializers.FLOAT);
|
||||
|
||||
public blackHolePrimedTNT(Level pLevel, double pX, double pY, double pZ, @Nullable LivingEntity pOwner, float power, int fuse, float speed) {
|
||||
super(entities.TNT_BLACK_HOLE.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power, "black_hole");
|
||||
super(entities.TNT_BLACK_HOLE.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power);
|
||||
this.setSpeed(speed);
|
||||
}
|
||||
|
||||
public blackHolePrimedTNT(EntityType<blackHolePrimedTNT> entityType, Level level) {
|
||||
super(entityType, level, null);
|
||||
this.setRenderID("black_hole");
|
||||
super(entityType, level);
|
||||
this.setSpeed(this.getSpeed());
|
||||
}
|
||||
|
||||
@@ -55,7 +60,7 @@ public class blackHolePrimedTNT extends basePrimedTNT {
|
||||
@Override
|
||||
public void tick() {
|
||||
for (Entity e : findTargets()) {
|
||||
e.addDeltaMovement(targetVector(e));
|
||||
util.addDeltaMovement(e, targetVector(e));
|
||||
}
|
||||
super.tick();
|
||||
}
|
||||
@@ -85,4 +90,9 @@ public class blackHolePrimedTNT extends basePrimedTNT {
|
||||
this.entityData.define(DATA_SPEED_ID, 4.0f);
|
||||
super.defineSynchedData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block renderBlock() {
|
||||
return blocks.TNT_BLACK_HOLE.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.jenny.enhancedexplosives.entities.tnt;
|
||||
|
||||
import com.jenny.enhancedexplosives.blocks.blocks;
|
||||
import com.jenny.enhancedexplosives.entities.arrows.claymoreArrow;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
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.util.RandomSource;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
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 javax.annotation.Nullable;
|
||||
|
||||
public class claymorePrimedTNT extends basePrimedTNT {
|
||||
private static final EntityDataAccessor<Integer> DATA_PCOUNT_ID = SynchedEntityData.defineId(claymorePrimedTNT.class, EntityDataSerializers.INT);
|
||||
|
||||
public claymorePrimedTNT(Level pLevel, double pX, double pY, double pZ, @Nullable LivingEntity pOwner, float power, int fuse, int projectileCount) {
|
||||
super(entities.TNT_CLAYMORE.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power);
|
||||
setPCount(projectileCount);
|
||||
}
|
||||
|
||||
public claymorePrimedTNT(EntityType<claymorePrimedTNT> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
public Vec3 targetVector(RandomSource rng) {
|
||||
return new Vec3(
|
||||
getX() + rng.nextIntBetweenInclusive(-15, 15),
|
||||
getY() + (float) rng.nextIntBetweenInclusive(-10, 10) / 10,
|
||||
getZ() + rng.nextIntBetweenInclusive(-15, 15)
|
||||
).subtract(position().add(0, 0.5, 0)).normalize().multiply(1.3, 1.3, 1.3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
RandomSource rng = level().getRandom();
|
||||
for (int i = 0; i < getPCount(); i++) {
|
||||
Vec3 target = targetVector(rng);
|
||||
Projectile e = new claymoreArrow(level());
|
||||
e.setPos(position().add(0, 0.5, 0));
|
||||
e.setDeltaMovement(target);
|
||||
if (getOwner() != null) {
|
||||
e.setOwner(getOwner());
|
||||
}
|
||||
level().addFreshEntity(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addAdditionalSaveData(CompoundTag pCompound) {
|
||||
pCompound.putFloat("ProjectileCount", this.getPCount());
|
||||
super.addAdditionalSaveData(pCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readAdditionalSaveData(CompoundTag pCompound) {
|
||||
this.setPCount(pCompound.getInt("ProjectileCount"));
|
||||
super.readAdditionalSaveData(pCompound);
|
||||
}
|
||||
|
||||
public void setPCount(int pCount) {
|
||||
this.entityData.set(DATA_PCOUNT_ID, pCount);
|
||||
}
|
||||
|
||||
public int getPCount() {
|
||||
return this.entityData.get(DATA_PCOUNT_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void defineSynchedData() {
|
||||
this.entityData.define(DATA_PCOUNT_ID, 16);
|
||||
super.defineSynchedData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block renderBlock() {
|
||||
return blocks.TNT_CLAYMORE.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.jenny.enhancedexplosives.entities.tnt;
|
||||
|
||||
import com.jenny.enhancedexplosives.blocks.blocks;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
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.Vec3;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class enderPrimedTNT extends basePrimedTNT {
|
||||
|
||||
public enderPrimedTNT(Level pLevel, double pX, double pY, double pZ, @Nullable LivingEntity pOwner, float power, int fuse) {
|
||||
super(entities.TNT_ENDER.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power);
|
||||
}
|
||||
|
||||
public enderPrimedTNT(EntityType<enderPrimedTNT> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
public Block renderBlock() {
|
||||
return blocks.TNT_ENDER.get();
|
||||
}
|
||||
}
|
||||
+57
-7
@@ -1,29 +1,39 @@
|
||||
package com.jenny.compressedtnt.entities;
|
||||
package com.jenny.enhancedexplosives.entities.tnt;
|
||||
|
||||
import com.jenny.enhancedexplosives.blocks.blocks;
|
||||
import com.jenny.enhancedexplosives.config.ConfigClient;
|
||||
import com.jenny.enhancedexplosives.config.ConfigServer;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.util;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
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.ai.targeting.TargetingConditions;
|
||||
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 javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class homingPrimedTNT extends basePrimedTNT {
|
||||
private static final EntityDataAccessor<Float> DATA_SPEED_ID = SynchedEntityData.defineId(homingPrimedTNT.class, EntityDataSerializers.FLOAT);
|
||||
Entity target;
|
||||
|
||||
public homingPrimedTNT (Level pLevel, double pX, double pY, double pZ, @Nullable LivingEntity pOwner, float power, int fuse, float speed) {
|
||||
super(entities.TNT_HOMING.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power, "homing");
|
||||
super(entities.TNT_HOMING.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power);
|
||||
this.target = null;
|
||||
this.setSpeed(speed);
|
||||
}
|
||||
|
||||
public homingPrimedTNT(EntityType<homingPrimedTNT> entityType, Level level) {
|
||||
super(entityType, level, null);
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
private Vec3 targetVector() {
|
||||
@@ -44,10 +54,34 @@ public class homingPrimedTNT extends basePrimedTNT {
|
||||
}
|
||||
|
||||
public void findTarget() {
|
||||
target = closestEntity(getEntities());
|
||||
}
|
||||
|
||||
private LivingEntity closestEntity(List<LivingEntity> entities) {
|
||||
double dist = Double.MAX_VALUE;
|
||||
LivingEntity target = null;
|
||||
for (LivingEntity e : entities) {
|
||||
double newDist = e.position().distanceTo(position());
|
||||
if (newDist < dist) {
|
||||
target = e;
|
||||
dist = newDist;
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
protected List<LivingEntity> getEntities() {
|
||||
List<LivingEntity> ret_list = new ArrayList<>();
|
||||
Vec3 corner1 = this.position().subtract(15, 15, 15);
|
||||
Vec3 corner2 = this.position().add(15, 15, 15);
|
||||
AABB boundingBox = new AABB(corner1, corner2);
|
||||
target = this.level().getNearestEntity(LivingEntity.class, TargetingConditions.forNonCombat(), null, this.getX(), this.getY(), this.getZ(), boundingBox);
|
||||
|
||||
for (LivingEntity entity : level().getEntitiesOfClass(LivingEntity.class, boundingBox)) {
|
||||
if (level().getPlayerByUUID(entity.getUUID()) == null || ConfigServer.homingAtPlayers.get()) { // prevent aiming at player if config says so
|
||||
ret_list.add(entity);
|
||||
}
|
||||
}
|
||||
return ret_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,7 +90,11 @@ public class homingPrimedTNT extends basePrimedTNT {
|
||||
findTarget();
|
||||
}
|
||||
else {
|
||||
if (getTargetDist() > 15) {target = null;} else {addDeltaMovement(targetVector());}
|
||||
if (getTargetDist() > 15) {
|
||||
target = null;
|
||||
} else {
|
||||
util.addDeltaMovement(this, targetVector());
|
||||
}
|
||||
}
|
||||
|
||||
super.tick();
|
||||
@@ -87,4 +125,16 @@ public class homingPrimedTNT extends basePrimedTNT {
|
||||
this.entityData.define(DATA_SPEED_ID, 4.0f);
|
||||
super.defineSynchedData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnParticles() {
|
||||
for (int i = 1; i <= ConfigClient.calcPCount(1); i++) {
|
||||
level().addParticle(ParticleTypes.FLAME, getX(), getY(), getZ(), 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block renderBlock() {
|
||||
return blocks.TNT_HOMING.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.jenny.enhancedexplosives.entities.tnt;
|
||||
|
||||
import com.jenny.enhancedexplosives.blocks.blocks;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.util;
|
||||
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.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 javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class repulsivePrimedTNT extends basePrimedTNT {
|
||||
private static final EntityDataAccessor<Float> DATA_SPEED_ID = SynchedEntityData.defineId(repulsivePrimedTNT.class, EntityDataSerializers.FLOAT);
|
||||
|
||||
public repulsivePrimedTNT(Level pLevel, double pX, double pY, double pZ, @Nullable LivingEntity pOwner, float power, int fuse, float speed) {
|
||||
super(entities.TNT_REPULSIVE.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power);
|
||||
this.setSpeed(speed);
|
||||
}
|
||||
|
||||
public repulsivePrimedTNT(EntityType<repulsivePrimedTNT> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
this.setSpeed(this.getSpeed());
|
||||
}
|
||||
|
||||
private Vec3 targetVector(Entity target) {
|
||||
double dist = getTargetDist(target);
|
||||
float speed = getSpeed();
|
||||
Vec3 mult = new Vec3(speed / dist, speed / dist, speed / dist);
|
||||
return target.position().subtract(this.position()).normalize().multiply(mult);
|
||||
}
|
||||
|
||||
public double getTargetDist(Entity target) {
|
||||
return target.position().subtract(this.position()).length();
|
||||
}
|
||||
|
||||
public List<Entity> findTargets() {
|
||||
Vec3 corner1 = this.position().subtract(15, 15, 15);
|
||||
Vec3 corner2 = this.position().add(15, 15, 15);
|
||||
AABB boundingBox = new AABB(corner1, corner2);
|
||||
return this.level().getEntities(this, boundingBox);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
for (Entity e : findTargets()) {
|
||||
util.addDeltaMovement(e, targetVector(e));
|
||||
}
|
||||
super.tick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
for (Entity e : findTargets()) {
|
||||
util.addDeltaMovement(e, targetVector(e).scale(3));
|
||||
}
|
||||
super.explode();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addAdditionalSaveData(CompoundTag pCompound) {
|
||||
pCompound.putFloat("Speed", this.getSpeed());
|
||||
super.addAdditionalSaveData(pCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readAdditionalSaveData(CompoundTag pCompound) {
|
||||
this.setSpeed(pCompound.getFloat("Speed"));
|
||||
super.readAdditionalSaveData(pCompound);
|
||||
}
|
||||
|
||||
public void setSpeed(float speed) {
|
||||
this.entityData.set(DATA_SPEED_ID, speed);
|
||||
}
|
||||
|
||||
public float getSpeed() {
|
||||
return this.entityData.get(DATA_SPEED_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void defineSynchedData() {
|
||||
this.entityData.define(DATA_SPEED_ID, 4.0f);
|
||||
super.defineSynchedData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block renderBlock() {
|
||||
return blocks.TNT_REPULSIVE.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.jenny.enhancedexplosives.entities.tnt;
|
||||
|
||||
import com.jenny.enhancedexplosives.blocks.blocks;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.ExplosionDamageCalculator;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class selectivePrimedTNT extends basePrimedTNT {
|
||||
static class SelectiveExplosionCalculator extends ExplosionDamageCalculator {
|
||||
private final String block;
|
||||
|
||||
public SelectiveExplosionCalculator(String block) {
|
||||
this.block = block;
|
||||
}
|
||||
|
||||
public boolean shouldBlockExplode(@NotNull Explosion pExplosion, @NotNull BlockGetter pReader, @NotNull BlockPos pPos, BlockState pState, float pPower) {
|
||||
return pState.getBlock().toString().equals(block);
|
||||
}
|
||||
}
|
||||
|
||||
public selectivePrimedTNT(Level pLevel, double pX, double pY, double pZ, @Nullable LivingEntity pOwner, float power, int fuse) {
|
||||
super(entities.TNT_SELECTIVE.get(), pLevel, pOwner, new Vec3(pX, pY, pZ), fuse, power);
|
||||
}
|
||||
|
||||
public selectivePrimedTNT(EntityType<selectivePrimedTNT> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
}
|
||||
@Override
|
||||
protected void explode() {
|
||||
SelectiveExplosionCalculator dmgCalc = new SelectiveExplosionCalculator(getBlock());
|
||||
this.level().explode(this, DamageSource.explosion(getOwner()), dmgCalc, getX(), getY(), getZ(), getPower(), false, Explosion.BlockInteraction.BREAK);
|
||||
}
|
||||
|
||||
public String getBlock() {
|
||||
return renderBlockBeneath().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block renderBlock() {
|
||||
return blocks.TNT_SELECTIVE.get();
|
||||
}
|
||||
|
||||
public Block renderBlockBeneath() {
|
||||
return level().getBlockState(new BlockPos((int) Math.floor(getX()), (int) Math.floor(getY()) - 1, (int) Math.floor(getZ()))).getBlock();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.jenny.enhancedexplosives.items;
|
||||
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.projectile.AbstractArrow;
|
||||
import net.minecraft.world.item.ArrowItem;
|
||||
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 org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.jenny.enhancedexplosives.EnhancedExplosives.MODID;
|
||||
|
||||
public abstract class ArrowAbstract extends ArrowItem {
|
||||
public ArrowAbstract(Item.Properties properties){
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(@NotNull ItemStack pStack, @Nullable Level pLevel, @NotNull List<Component> pTooltipComponents, @NotNull TooltipFlag pIsAdvanced) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public abstract AbstractArrow createArrow(@NotNull Level pLevel, @NotNull ItemStack pStack, @NotNull LivingEntity pShooter);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.jenny.enhancedexplosives.items;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.arrows.carpetArrow;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.projectile.AbstractArrow;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ArrowCarpet extends ArrowAbstract {
|
||||
public ArrowCarpet(Properties properties){
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public AbstractArrow createArrow(@NotNull Level pLevel, @NotNull ItemStack pStack, @NotNull LivingEntity pShooter) {
|
||||
return new carpetArrow(pLevel, pShooter);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.jenny.enhancedexplosives.items;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.arrows.concussiveArrow;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.projectile.AbstractArrow;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ArrowConcussive extends ArrowAbstract {
|
||||
public ArrowConcussive(Item.Properties properties){
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public AbstractArrow createArrow(@NotNull Level pLevel, @NotNull ItemStack pStack, @NotNull LivingEntity pShooter) {
|
||||
return new concussiveArrow(pLevel, pShooter);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.jenny.enhancedexplosives.items;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.arrows.tntArrow;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.projectile.AbstractArrow;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ArrowTNT extends ArrowAbstract {
|
||||
public ArrowTNT(Item.Properties properties){
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public AbstractArrow createArrow(@NotNull Level pLevel, @NotNull ItemStack pStack, @NotNull LivingEntity pShooter) {
|
||||
return new tntArrow(pLevel, pShooter);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.jenny.enhancedexplosives.items;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.arrows.tunnelArrow;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.projectile.AbstractArrow;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ArrowTunnel extends ArrowAbstract {
|
||||
public ArrowTunnel(Properties properties){
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public AbstractArrow createArrow(@NotNull Level pLevel, @NotNull ItemStack pStack, @NotNull LivingEntity pShooter) {
|
||||
return new tunnelArrow(pLevel, pShooter);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.jenny.enhancedexplosives.items;
|
||||
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
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;
|
||||
|
||||
import static com.jenny.enhancedexplosives.EnhancedExplosives.MODID;
|
||||
|
||||
public class BlockItemTooltip extends BlockItem {
|
||||
public BlockItemTooltip(Block pBlock, Item.Properties pProperties){
|
||||
super(pBlock, pProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(@NotNull ItemStack pStack, @Nullable Level pLevel, @NotNull List<Component> pTooltipComponents, @NotNull TooltipFlag pIsAdvanced) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.jenny.enhancedexplosives.items;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.throwable.dynamite;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.stats.Stats;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResultHolder;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
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 org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.jenny.enhancedexplosives.EnhancedExplosives.MODID;
|
||||
|
||||
public class Dynamite extends Item {
|
||||
public Dynamite(Item.Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public InteractionResultHolder<ItemStack> use(Level pLevel, Player pPlayer, @NotNull InteractionHand pHand) {
|
||||
ItemStack itemstack = pPlayer.getItemInHand(pHand);
|
||||
if (!pLevel.isClientSide) {
|
||||
dynamite d = new dynamite(pLevel, pPlayer.getX(), pPlayer.getY(), pPlayer.getZ(), pPlayer, 4, 80);
|
||||
d.shootFromRotation(pPlayer, pPlayer.getXRot(), pPlayer.getYRot(), -20.0F, 0.5F);
|
||||
pLevel.addFreshEntity(d);
|
||||
}
|
||||
|
||||
pPlayer.awardStat(Stats.ITEM_USED.get(this));
|
||||
if (!pPlayer.getAbilities().instabuild) {
|
||||
itemstack.shrink(1);
|
||||
}
|
||||
|
||||
return InteractionResultHolder.sidedSuccess(itemstack, pLevel.isClientSide());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(@NotNull ItemStack pStack, @Nullable Level pLevel, @NotNull List<Component> pTooltipComponents, @NotNull TooltipFlag pIsAdvanced) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.jenny.enhancedexplosives.items;
|
||||
|
||||
import com.jenny.enhancedexplosives.entities.arrows.baseArrow;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import net.minecraft.core.Position;
|
||||
import net.minecraft.core.dispenser.AbstractProjectileDispenseBehavior;
|
||||
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.level.Level;
|
||||
import net.minecraft.world.level.block.DispenserBlock;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static com.jenny.enhancedexplosives.EnhancedExplosives.MODID;
|
||||
import static com.jenny.enhancedexplosives.creativeTab.CREATIVE_MODE_TAB;
|
||||
|
||||
public class items {
|
||||
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
|
||||
|
||||
public static final RegistryObject<Item> TNT_ARROW = ITEMS.register("arrow_tnt", () -> new ArrowTNT(new Item.Properties()));
|
||||
public static final RegistryObject<Item> CONCUSSIVE_ARROW = ITEMS.register("arrow_concussive", () -> new ArrowConcussive(new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
public static final RegistryObject<Item> CARPET_ARROW = ITEMS.register("arrow_carpet", () -> new ArrowCarpet(new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
public static final RegistryObject<Item> TUNNEL_ARROW = ITEMS.register("arrow_tunnel", () -> new ArrowTunnel(new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
public static final RegistryObject<Item> DYNAMITE = ITEMS.register("dynamite", () -> new Dynamite(new Item.Properties().tab(CREATIVE_MODE_TAB)));
|
||||
|
||||
public static void register(IEventBus bus) {
|
||||
ITEMS.register(bus);
|
||||
}
|
||||
|
||||
public static void registerDispenser() {
|
||||
class ArrowDispenseBehaviour extends AbstractProjectileDispenseBehavior {
|
||||
private final EntityType<? extends baseArrow> arrowType;
|
||||
|
||||
public ArrowDispenseBehaviour(EntityType<? extends baseArrow> arrow) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.jenny.enhancedexplosives.particles;
|
||||
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.particle.*;
|
||||
import net.minecraft.core.particles.SimpleParticleType;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ArrowParticle extends TextureSheetParticle {
|
||||
private final float quadSizeStart;
|
||||
|
||||
protected ArrowParticle(ClientLevel level, double xCoord, double yCoord, double zCoord,
|
||||
SpriteSet spriteSet, double xd, double yd, double zd) {
|
||||
super(level, xCoord, yCoord, zCoord, xd, yd, zd);
|
||||
|
||||
this.friction = 0.8F;
|
||||
this.xd = xd;
|
||||
this.yd = yd;
|
||||
this.zd = zd;
|
||||
this.quadSizeStart = this.quadSize;
|
||||
this.lifetime = 20;
|
||||
this.setSpriteFromAge(spriteSet);
|
||||
|
||||
this.rCol = 1f;
|
||||
this.gCol = 1f;
|
||||
this.bCol = 1f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
fadeOut();
|
||||
}
|
||||
|
||||
private void fadeOut() {
|
||||
this.alpha = (-(1/(float)lifetime) * age + 1);
|
||||
this.quadSize = this.quadSizeStart * ((float) age / lifetime);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public ParticleRenderType getRenderType() {
|
||||
return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class Provider implements ParticleProvider<SimpleParticleType> {
|
||||
private final SpriteSet sprites;
|
||||
|
||||
public Provider(SpriteSet spriteSet) {
|
||||
this.sprites = spriteSet;
|
||||
}
|
||||
|
||||
public Particle createParticle(@NotNull SimpleParticleType particleType, @NotNull ClientLevel level,
|
||||
double x, double y, double z,
|
||||
double dx, double dy, double dz) {
|
||||
return new ArrowParticle(level, x, y, z, this.sprites, dx, dy, dz);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.jenny.enhancedexplosives.particles;
|
||||
|
||||
import net.minecraft.core.particles.ParticleType;
|
||||
import net.minecraft.core.particles.SimpleParticleType;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
import static com.jenny.enhancedexplosives.EnhancedExplosives.MODID;
|
||||
|
||||
public class particles {
|
||||
public static final DeferredRegister<ParticleType<?>> PARTICLES = DeferredRegister.create(ForgeRegistries.PARTICLE_TYPES, MODID);
|
||||
|
||||
public static final RegistryObject<SimpleParticleType> CONCUSSIVE_ARROW_PARTICLE =
|
||||
PARTICLES.register("particle_concussive_arrow", () -> new SimpleParticleType(true));
|
||||
public static final RegistryObject<SimpleParticleType> TNT_ARROW_PARTICLE =
|
||||
PARTICLES.register("particle_tnt_arrow", () -> new SimpleParticleType(true));
|
||||
public static final RegistryObject<SimpleParticleType> CARPET_ARROW_PARTICLE =
|
||||
PARTICLES.register("particle_carpet_arrow", () -> new SimpleParticleType(true));
|
||||
public static final RegistryObject<SimpleParticleType> TUNNEL_ARROW_PARTICLE =
|
||||
PARTICLES.register("particle_tunnel_arrow", () -> new SimpleParticleType(true));
|
||||
|
||||
public static void register(IEventBus bus) {
|
||||
PARTICLES.register(bus);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.jenny.enhancedexplosives;
|
||||
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
public class util {
|
||||
public static void addDeltaMovement(Entity entity, Vec3 movement) {
|
||||
entity.setDeltaMovement(movement.add(entity.getDeltaMovement()));
|
||||
}
|
||||
}
|
||||
@@ -1,63 +1,36 @@
|
||||
# This is an example mods.toml file. It contains the data relating to the loading mods.
|
||||
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
|
||||
# The overall format is standard TOML format, v0.5.0.
|
||||
# Note that there are a couple of TOML lists in this file.
|
||||
# Find more information on toml format here: https://github.com/toml-lang/toml
|
||||
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
||||
modLoader = "javafml" #mandatory
|
||||
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
||||
loaderVersion = "${loader_version_range}" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
|
||||
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
|
||||
modLoader = "javafml"
|
||||
logoFile = "logo.png"
|
||||
loaderVersion = "${loader_version_range}"
|
||||
license = "${mod_license}"
|
||||
# A URL to refer people to when problems occur with this mod
|
||||
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
|
||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||
[[mods]] #mandatory
|
||||
# The modid of the mod
|
||||
modId = "${mod_id}" #mandatory
|
||||
# The version number of the mod
|
||||
version = "${mod_version}" #mandatory
|
||||
# A display name for the mod
|
||||
displayName = "${mod_name}" #mandatory
|
||||
# A URL to query for updates for this mod. See the JSON update specification https://docs.minecraftforge.net/en/latest/misc/updatechecker/
|
||||
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
|
||||
# A URL for the "homepage" for this mod, displayed in the mod UI
|
||||
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional
|
||||
# A file name (in the root of the mod JAR) containing a logo for display
|
||||
#logoFile="compressedtnt.png" #optional
|
||||
# A text field displayed in the mod UI
|
||||
#credits="Thanks for this example mod goes to Java" #optional
|
||||
# A text field displayed in the mod UI
|
||||
authors = "${mod_authors}" #optional
|
||||
# Display Test controls the display for your mod in the server connection screen
|
||||
# MATCH_VERSION means that your mod will cause a red X if the versions on client and server differ. This is the default behaviour and should be what you choose if you have server and client elements to your mod.
|
||||
# IGNORE_SERVER_VERSION means that your mod will not cause a red X if it's present on the server but not on the client. This is what you should use if you're a server only mod.
|
||||
# IGNORE_ALL_VERSION means that your mod will not cause a red X if it's present on the client or the server. This is a special case and should only be used if your mod has no server component.
|
||||
# NONE means that no display test is set on your mod. You need to do this yourself, see IExtensionPoint.DisplayTest for more information. You can define any scheme you wish with this value.
|
||||
# IMPORTANT NOTE: this is NOT an instruction as to which environments (CLIENT or DEDICATED SERVER) your mod loads on. Your mod should load (and maybe do nothing!) whereever it finds itself.
|
||||
#displayTest="MATCH_VERSION" # MATCH_VERSION is the default if nothing is specified (#optional)
|
||||
|
||||
# The description text for the mod (multi line!) (#mandatory)
|
||||
[[mods]]
|
||||
modId = "${mod_id}"
|
||||
version = "${mod_version}"
|
||||
displayName = "${mod_name}"
|
||||
authors = "${mod_authors}"
|
||||
displayTest = "MATCH_VERSION"
|
||||
displayURL = "https://git.smthng.de/Jenny/Enhanced-Explosives"
|
||||
description = '''${mod_description}'''
|
||||
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
|
||||
[[dependencies."${mod_id}"]] #optional
|
||||
# the modid of the dependency
|
||||
modId = "forge" #mandatory
|
||||
# Does this dependency have to exist - if not, ordering below must be specified
|
||||
mandatory = true #mandatory
|
||||
# The version range of the dependency
|
||||
versionRange = "${forge_version_range}" #mandatory
|
||||
# An ordering relationship for the dependency - BEFORE or AFTER required if the dependency is not mandatory
|
||||
# BEFORE - This mod is loaded BEFORE the dependency
|
||||
# AFTER - This mod is loaded AFTER the dependency
|
||||
modId = "forge"
|
||||
mandatory = true
|
||||
versionRange = "${forge_version_range}"
|
||||
ordering = "NONE"
|
||||
# Side this dependency is applied on - BOTH, CLIENT, or SERVER
|
||||
side = "BOTH"# Here's another dependency
|
||||
side = "BOTH"
|
||||
[[dependencies."${mod_id}"]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
# This version range declares a minimum of the current minecraft version up to but not including the next major version
|
||||
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"
|
||||
@@ -0,0 +1,3 @@
|
||||
[
|
||||
"enhancedexplosives:books/guide_enhanced_explosives.xml"
|
||||
]
|
||||
@@ -0,0 +1,160 @@
|
||||
<book title="Enhanced Explosives">
|
||||
|
||||
<!--> Template files are bugged till gbook 3.7.2 <-->
|
||||
<template id="page_title" height="43" mode="flow">
|
||||
<p align="center"><image src="gbook:gui/book" w="120" h="7" tx="50" ty="10"/></p>
|
||||
<space height="4"/>
|
||||
<element index="0" align="center" scale="1.5"/> <!-- Intended use with one-line paragraph -->
|
||||
<p align="center"><image src="gbook:gui/book" w="120" h="7" tx="50" ty="10"/></p>
|
||||
</template>
|
||||
|
||||
<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>
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"itemGroup.enhancedexplosives": "Enhanced Explosives",
|
||||
|
||||
"block.enhancedexplosives.tnt_8": "Compressed TNT",
|
||||
"block.enhancedexplosives.tnt_16": "Double Compressed TNT",
|
||||
"block.enhancedexplosives.tnt_32": "Triple Compressed TNT",
|
||||
"block.enhancedexplosives.tnt_64": "Quadruple Compressed TNT",
|
||||
"block.enhancedexplosives.tnt_128": "Quintuple Compressed TNT",
|
||||
"block.enhancedexplosives.tnt_cluster_2": "2× TNT Cluster",
|
||||
"block.enhancedexplosives.tnt_cluster_4": "4× TNT Cluster",
|
||||
"block.enhancedexplosives.tnt_cluster_8": "8× TNT Cluster",
|
||||
"block.enhancedexplosives.tnt_homing": "Homing TNT",
|
||||
"block.enhancedexplosives.tnt_black_hole": "Black Hole TNT",
|
||||
"block.enhancedexplosives.tnt_claymore": "Claymore TNT",
|
||||
"block.enhancedexplosives.tnt_selective": "Selective TNT",
|
||||
"block.enhancedexplosives.tnt_ender": "Ender TNT",
|
||||
"block.enhancedexplosives.tnt_repulsive": "Repulsive TNT",
|
||||
"block.enhancedexplosives.tnt_bedrock": "Bedrock TNT",
|
||||
"block.enhancedexplosives.tnt_entity": "Entity TNT",
|
||||
|
||||
"tooltip.enhancedexplosives.tnt_cluster_2": "splits into 2 small TNTs",
|
||||
"tooltip.enhancedexplosives.tnt_cluster_4": "splits into 4 small TNTs",
|
||||
"tooltip.enhancedexplosives.tnt_cluster_8": "splits into 8 small TNTs",
|
||||
"tooltip.enhancedexplosives.tnt_homing": "follows the closest entity",
|
||||
"tooltip.enhancedexplosives.tnt_black_hole": "pulls all entities towards itself",
|
||||
"tooltip.enhancedexplosives.tnt_claymore": "throws arrows into all direcctions upon explosion",
|
||||
"tooltip.enhancedexplosives.tnt_selective": "only destroys the type of block it explodes on",
|
||||
"tooltip.enhancedexplosives.tnt_ender": "teleports in a 16 block radius upon priming",
|
||||
"tooltip.enhancedexplosives.tnt_repulsive": "repels all close entities",
|
||||
|
||||
"item.enhancedexplosives.arrow_tnt": "TNT Arrow",
|
||||
"item.enhancedexplosives.arrow_concussive": "Concussive Arrow",
|
||||
"item.enhancedexplosives.arrow_carpet": "Carpet Bombing Arrow",
|
||||
"item.enhancedexplosives.arrow_tunnel": "Tunnel Arrow",
|
||||
"item.enhancedexplosives.dynamite": "Dynamite",
|
||||
|
||||
"tooltip.enhancedexplosives.arrow_tnt": "explodes on impact",
|
||||
"tooltip.enhancedexplosives.arrow_concussive": "explodes on impact without block damage",
|
||||
"tooltip.enhancedexplosives.arrow_carpet": "splits into multiple concussive arrows when it starts falling",
|
||||
"tooltip.enhancedexplosives.arrow_tunnel": "explodes along the direction it is looking at",
|
||||
"tooltip.enhancedexplosives.dynamite": "TNT, but throwable"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"loader": "forge:separate_transforms",
|
||||
"base": {
|
||||
"parent": "enhancedexplosives:item/dynamite_3d"
|
||||
},
|
||||
"perspectives": {
|
||||
"gui": {
|
||||
"parent": "enhancedexplosives:item/dynamite_3d"
|
||||
},
|
||||
"ground": {
|
||||
"parent": "enhancedexplosives:item/dynamite_3d"
|
||||
},
|
||||
"fixed": {
|
||||
"parent": "enhancedexplosives:item/dynamite_3d"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,829 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"texture_size": [48, 48],
|
||||
"textures": {
|
||||
"0": "enhancedexplosives:item/dynamite",
|
||||
"particle": "enhancedexplosives:item/dynamite"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [6.048, -0.129, 8.976],
|
||||
"to": [7.024, 10.119, 9.952],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.048, 3.775, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1.33333, 14], "texture": "#0"},
|
||||
"east": {"uv": [1.33333, 0, 2.66667, 14], "texture": "#0"},
|
||||
"south": {"uv": [2.66667, 0, 4, 14], "texture": "#0"},
|
||||
"west": {"uv": [4, 0, 5.33333, 14], "texture": "#0"},
|
||||
"up": {"uv": [5.33333, 0, 6.66667, 1.33333], "texture": "#0"},
|
||||
"down": {"uv": [5.33333, 1.33333, 6.66667, 2.66667], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.048, -0.129, 7.512],
|
||||
"to": [7.024, 10.119, 8.488],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.048, 3.775, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1.33333, 14], "texture": "#0"},
|
||||
"east": {"uv": [1.33333, 0, 2.66667, 14], "texture": "#0"},
|
||||
"south": {"uv": [2.66667, 0, 4, 14], "texture": "#0"},
|
||||
"west": {"uv": [4, 0, 5.33333, 14], "texture": "#0"},
|
||||
"up": {"uv": [5.33333, 0, 6.66667, 1.33333], "texture": "#0"},
|
||||
"down": {"uv": [5.33333, 1.33333, 6.66667, 2.66667], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.048, -0.129, 6.048],
|
||||
"to": [7.024, 10.119, 7.024],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.048, 3.775, 6.048]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1.33333, 16], "texture": "#0"},
|
||||
"east": {"uv": [1.33333, 0, 2.66667, 16], "texture": "#0"},
|
||||
"south": {"uv": [2.66667, 0, 4, 16], "texture": "#0"},
|
||||
"west": {"uv": [4, 0, 5.33333, 16], "texture": "#0"},
|
||||
"up": {"uv": [5.33333, 0, 6.66667, 1.33333], "texture": "#0"},
|
||||
"down": {"uv": [5.33333, 1.33333, 6.66667, 2.66667], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.512, -0.129, 6.048],
|
||||
"to": [8.488, 10.119, 7.024],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.512, 3.775, 6.048]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1.33333, 14], "texture": "#0"},
|
||||
"east": {"uv": [1.33333, 0, 2.66667, 14], "texture": "#0"},
|
||||
"south": {"uv": [2.66667, 0, 4, 14], "texture": "#0"},
|
||||
"west": {"uv": [4, 0, 5.33333, 14], "texture": "#0"},
|
||||
"up": {"uv": [5.33333, 0, 6.66667, 1.33333], "texture": "#0"},
|
||||
"down": {"uv": [5.33333, 1.33333, 6.66667, 2.66667], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.976, -0.129, 6.048],
|
||||
"to": [9.952, 10.119, 7.024],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.976, 3.775, 6.048]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1.33333, 14], "texture": "#0"},
|
||||
"east": {"uv": [1.33333, 0, 2.66667, 14], "texture": "#0"},
|
||||
"south": {"uv": [2.66667, 0, 4, 14], "texture": "#0"},
|
||||
"west": {"uv": [4, 0, 5.33333, 14], "texture": "#0"},
|
||||
"up": {"uv": [5.33333, 0, 6.66667, 1.33333], "texture": "#0"},
|
||||
"down": {"uv": [5.33333, 1.33333, 6.66667, 2.66667], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.488, 0.115, 6.536],
|
||||
"to": [8.976, 9.875, 6.78],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.488, 4.019, 6.536]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, 0.115, 6.536],
|
||||
"to": [7.512, 9.875, 6.78],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 4.019, 6.536]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, 0.115, 9.22],
|
||||
"to": [7.512, 9.875, 9.464],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 4.019, 9.22]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.488, 0.115, 9.22],
|
||||
"to": [8.976, 9.875, 9.464],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.488, 4.019, 9.22]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [9.22, 0.115, 8.488],
|
||||
"to": [9.464, 9.875, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [9.22, 4.019, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.33333], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.33333], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [9.22, 0.115, 7.024],
|
||||
"to": [9.464, 9.875, 7.512],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [9.22, 4.019, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.33333], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.33333], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.976, 9.875, 7.024],
|
||||
"to": [9.464, 10.119, 7.512],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.976, 13.779, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [3.33333, 0, 4, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.976, -0.129, 8.488],
|
||||
"to": [9.464, 0.115, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.976, 3.775, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [2.66667, 15, 3.33333, 15.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [2.66667, 15.33333, 3.33333, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.488, -0.129, 8.976],
|
||||
"to": [8.976, 0.115, 9.464],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.488, 3.775, 9.464]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [2, 15, 2.66667, 15.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [2, 15.33333, 2.66667, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, -0.129, 8.976],
|
||||
"to": [7.512, 0.115, 9.464],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 3.775, 9.464]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [1.33333, 15, 2, 15.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [1.33333, 15.33333, 2, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.536, -0.129, 8.488],
|
||||
"to": [7.024, 0.115, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.536, 3.775, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0.66667, 15, 1.33333, 15.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0.66667, 15.33333, 1.33333, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.536, -0.129, 7.024],
|
||||
"to": [7.024, 0.115, 7.512],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.536, 3.775, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 15, 0.66667, 15.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 15.33333, 0.66667, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, -0.129, 6.536],
|
||||
"to": [7.512, 0.115, 7.024],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 3.775, 7.024]},
|
||||
"faces": {
|
||||
"north": {"uv": [4.66667, 15, 5.33333, 15.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [4.66667, 15.33333, 5.33333, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.488, -0.129, 6.536],
|
||||
"to": [8.976, 0.115, 7.024],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.488, 3.775, 7.024]},
|
||||
"faces": {
|
||||
"north": {"uv": [4, 15, 4.66667, 15.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [4, 15.33333, 4.66667, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.976, -0.129, 7.024],
|
||||
"to": [9.464, 0.115, 7.512],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.976, 3.775, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [3.33333, 15, 4, 15.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [3.33333, 15.33333, 4, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.488, 9.875, 6.536],
|
||||
"to": [8.976, 10.119, 7.024],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.488, 13.779, 7.024]},
|
||||
"faces": {
|
||||
"north": {"uv": [4, 0.66667, 4.66667, 1], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [4, 0, 4.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, 9.875, 6.536],
|
||||
"to": [7.512, 10.119, 7.024],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 13.779, 7.024]},
|
||||
"faces": {
|
||||
"north": {"uv": [4.66667, 0.66667, 5.33333, 1], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [4.66667, 0, 5.33333, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.536, 9.875, 7.024],
|
||||
"to": [7.024, 10.119, 7.512],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.536, 13.779, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0.66667, 0.66667, 1], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.048, 8.899, 7.024],
|
||||
"to": [6.536, 9.143, 7.512],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.048, 12.803, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.048, 8.899, 8.488],
|
||||
"to": [6.536, 9.143, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.048, 12.803, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [5.804, 8.899, 6.048],
|
||||
"to": [6.048, 9.143, 10.196],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [5.804, 12.803, 6.536]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.048, 8.899, 9.952],
|
||||
"to": [10.196, 9.143, 10.196],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.536, 12.803, 10.196]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"west": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 180, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [9.952, 8.899, 5.804],
|
||||
"to": [10.196, 9.143, 9.952],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [10.196, 12.803, 9.464]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [5.804, 8.899, 5.804],
|
||||
"to": [9.952, 9.143, 6.048],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [9.464, 12.803, 5.804]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [9.952, 0.847, 5.804],
|
||||
"to": [10.196, 1.091, 9.952],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [10.196, 4.751, 9.464]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.048, 0.847, 9.952],
|
||||
"to": [10.196, 1.091, 10.196],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.536, 4.751, 10.196]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"west": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 180, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [5.804, 0.847, 6.048],
|
||||
"to": [6.048, 1.091, 10.196],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [5.804, 4.751, 6.536]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [5.804, 0.847, 5.804],
|
||||
"to": [9.952, 1.091, 6.048],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [9.464, 4.751, 5.804]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, 8.899, 9.464],
|
||||
"to": [7.512, 9.143, 9.952],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 12.803, 9.952]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.488, 8.899, 9.464],
|
||||
"to": [8.976, 9.143, 9.952],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.488, 12.803, 9.952]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [9.464, 8.899, 8.488],
|
||||
"to": [9.952, 9.143, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [9.464, 12.803, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [9.464, 8.899, 7.024],
|
||||
"to": [9.952, 9.143, 7.512],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [9.464, 12.803, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.488, 8.899, 6.048],
|
||||
"to": [8.976, 9.143, 6.536],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.488, 12.803, 6.536]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, 8.899, 6.048],
|
||||
"to": [7.512, 9.143, 6.536],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 12.803, 6.536]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.048, 0.847, 7.024],
|
||||
"to": [6.536, 1.091, 7.512],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.048, 4.751, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.048, 0.847, 8.488],
|
||||
"to": [6.536, 1.091, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.048, 4.751, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, 0.847, 9.464],
|
||||
"to": [7.512, 1.091, 9.952],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 4.751, 9.952]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.488, 0.847, 9.464],
|
||||
"to": [8.976, 1.091, 9.952],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.488, 4.751, 9.952]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [9.464, 0.847, 8.488],
|
||||
"to": [9.952, 1.091, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [9.464, 4.751, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [9.464, 0.847, 7.024],
|
||||
"to": [9.952, 1.091, 7.512],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [9.464, 4.751, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.488, 0.847, 6.048],
|
||||
"to": [8.976, 1.091, 6.536],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.488, 4.751, 6.536]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, 0.847, 6.048],
|
||||
"to": [7.512, 1.091, 6.536],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 4.751, 6.536]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [8, 0, 8.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [8, 0.33333, 8.66667, 0.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 0, 8.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.536, 9.875, 8.488],
|
||||
"to": [7.024, 10.119, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.536, 13.779, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0.66667, 0.66667, 1.33333, 1], "texture": "#0"},
|
||||
"up": {"uv": [0.66667, 0, 1.33333, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, 9.875, 8.976],
|
||||
"to": [7.512, 10.119, 9.464],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 13.779, 9.464]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [1.33333, 0.66667, 2, 1], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [1.33333, 0, 2, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.488, 9.875, 8.976],
|
||||
"to": [8.976, 10.119, 9.464],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.488, 13.779, 9.464]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [2, 0.66667, 2.66667, 1], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [2, 0, 2.66667, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.976, 9.875, 8.488],
|
||||
"to": [9.464, 10.119, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.976, 13.779, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [2.66667, 0.66667, 3.33333, 1], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [2.66667, 0, 3.33333, 0.66667], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.66667], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, 9.875, 7.024],
|
||||
"to": [8.976, 10.119, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 13.779, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 2.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 2.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 2.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 2.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [5.33333, 13.33333, 8, 16], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [5.33333, 10.66667, 8, 13.33333], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.512, 10.058, 7.512],
|
||||
"to": [8.488, 10.302, 8.488],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.512, 13.962, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"east": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"south": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"west": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 13.33333, 10.66667, 16], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 13.33333, 10.66667, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.756, 10.18, 7.756],
|
||||
"to": [8.244, 10.424, 8.244],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.756, 14.084, 8.244]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"east": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"south": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"west": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 13.33333, 10.66667, 16], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 13.33333, 10.66667, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.878, 9.936, 7.878],
|
||||
"to": [8.122, 10.851, 8.122],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.878, 13.84, 8.366]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"east": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"south": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"west": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 13.33333, 10.66667, 16], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 13.33333, 10.66667, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.878, 10.424, 9.342],
|
||||
"to": [8.122, 10.912, 9.586],
|
||||
"rotation": {"angle": 22.5, "axis": "x", "origin": [7.878, 14.328, 9.83]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"east": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"south": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"west": {"uv": [8, 13.33333, 10.66667, 13.66667], "texture": "#0"},
|
||||
"up": {"uv": [8, 13.33333, 10.66667, 16], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [8, 13.33333, 10.66667, 16], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.878, 10.851, 9.525],
|
||||
"to": [8.122, 11.095, 9.769],
|
||||
"rotation": {"angle": 22.5, "axis": "x", "origin": [7.878, 14.755, 10.013]},
|
||||
"faces": {
|
||||
"north": {"uv": [13.33333, 10.66667, 16, 11], "texture": "#0"},
|
||||
"east": {"uv": [13.33333, 10.66667, 16, 11], "texture": "#0"},
|
||||
"south": {"uv": [13.33333, 10.66667, 16, 11], "texture": "#0"},
|
||||
"west": {"uv": [13.33333, 10.66667, 16, 11], "texture": "#0"},
|
||||
"up": {"uv": [13.33333, 10.66667, 16, 13.33333], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [13.33333, 10.66667, 16, 13.33333], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.024, -0.129, 7.024],
|
||||
"to": [8.976, 0.115, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.024, 3.775, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 2.66667, 0.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 2.66667, 0.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 2.66667, 0.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 2.66667, 0.33333], "texture": "#0"},
|
||||
"up": {"uv": [5.33333, 13.33333, 8, 16], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [5.33333, 10.66667, 8, 13.33333], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.536, 0.115, 7.024],
|
||||
"to": [6.78, 9.875, 7.512],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.536, 4.019, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.33333], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.33333], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.536, 0.115, 8.488],
|
||||
"to": [6.78, 9.875, 8.976],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [6.536, 4.019, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 0.33333, 13.33333], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 0.66667, 13.33333], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0.66667, 0.33333], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0.66667, 0.33333], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.976, -0.129, 7.512],
|
||||
"to": [9.952, 10.119, 8.488],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.976, 3.775, 7.512]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1.33333, 14], "texture": "#0"},
|
||||
"east": {"uv": [1.33333, 0, 2.66667, 14], "texture": "#0"},
|
||||
"south": {"uv": [2.66667, 0, 4, 14], "texture": "#0"},
|
||||
"west": {"uv": [4, 0, 5.33333, 14], "texture": "#0"},
|
||||
"up": {"uv": [5.33333, 0, 6.66667, 1.33333], "texture": "#0"},
|
||||
"down": {"uv": [5.33333, 1.33333, 6.66667, 2.66667], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8.976, -0.129, 8.976],
|
||||
"to": [9.952, 10.119, 9.952],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8.976, 3.775, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1.33333, 14], "texture": "#0"},
|
||||
"east": {"uv": [1.33333, 0, 2.66667, 14], "texture": "#0"},
|
||||
"south": {"uv": [2.66667, 0, 4, 14], "texture": "#0"},
|
||||
"west": {"uv": [4, 0, 5.33333, 14], "texture": "#0"},
|
||||
"up": {"uv": [5.33333, 0, 6.66667, 1.33333], "texture": "#0"},
|
||||
"down": {"uv": [5.33333, 1.33333, 6.66667, 2.66667], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.512, -0.129, 8.976],
|
||||
"to": [8.488, 10.119, 9.952],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7.512, 3.775, 8.976]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1.33333, 14], "texture": "#0"},
|
||||
"east": {"uv": [1.33333, 0, 2.66667, 14], "texture": "#0"},
|
||||
"south": {"uv": [2.66667, 0, 4, 14], "texture": "#0"},
|
||||
"west": {"uv": [4, 0, 5.33333, 14], "texture": "#0"},
|
||||
"up": {"uv": [5.33333, 0, 6.66667, 1.33333], "texture": "#0"},
|
||||
"down": {"uv": [5.33333, 1.33333, 6.66667, 2.66667], "texture": "#0"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"textures": [
|
||||
"enhancedexplosives:particle_carpet_arrow"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"textures": [
|
||||
"enhancedexplosives:particle_concussive_arrow"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"textures": [
|
||||
"enhancedexplosives:particle_tnt_arrow"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"textures": [
|
||||
"enhancedexplosives:particle_tunnel_arrow"
|
||||
]
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Arrows",
|
||||
"description": "These are all new arrows",
|
||||
"icon": "minecraft:arrow"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Others",
|
||||
"description": "Some other new stuff",
|
||||
"icon": "minecraft:bedrock"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "TNTs",
|
||||
"description": "These are all new TNTs",
|
||||
"icon": "minecraft:tnt"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 191 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user