Compare commits

..

No commits in common. "master" and "1.0-SNAPSHOT" have entirely different histories.

64 changed files with 287 additions and 1442 deletions

View File

@ -1 +1 @@
vmodextras
vmodaddon

View File

@ -1,7 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<ScalaCodeStyleSettings>
<option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
</ScalaCodeStyleSettings>
</code_scheme>
</component>

View File

@ -1,5 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@ -5,11 +5,10 @@
<profile name="Gradle Imported" enabled="true">
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="false">
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.github.llamalad7/mixinextras-common/0.4.1/a7f425cc49de7f10d008a9a676f5f023ebac13bb/mixinextras-common-0.4.1.jar" />
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.spongepowered/mixin/0.8.5/6d1c8bf4c28e697f472a83bd6add76ec4951734/mixin-0.8.5-processor.jar" />
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.20/18bcea7d5df4d49227b4a0743a536208ce4825bb/lombok-1.18.20.jar" />
</processorPath>
<module name="vmodextras.main" />
<module name="vmodaddon.main" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel target="17" />

View File

@ -26,20 +26,5 @@
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="Modrinth" />
<option name="name" value="Modrinth" />
<option name="url" value="https://api.modrinth.com/maven" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="https://maven.tterrag.com/releases" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://squiddev.cc/maven/" />
</remote-repository>
</component>
</project>

View File

@ -1,10 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<writeAnnotations>
<writeAnnotation name="org.spongepowered.asm.mixin.Unique" />
</writeAnnotations>
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="ms-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />

View File

@ -2,8 +2,8 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/vmodextras.main.iml" filepath="$PROJECT_DIR$/.idea/modules/vmodextras.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/vmodextras.test.iml" filepath="$PROJECT_DIR$/.idea/modules/vmodextras.test.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/vmodaddon.main.iml" filepath="$PROJECT_DIR$/.idea/modules/vmodaddon.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/vmodaddon.test.iml" filepath="$PROJECT_DIR$/.idea/modules/vmodaddon.test.iml" />
</modules>
</component>
</project>

View File

@ -21,7 +21,7 @@
<option name="mappingFile" value="$MODULE_DIR$/../../build/createMcpToSrg/output.tsrg" />
<option name="mcpVersion" value="official_1.20.1" />
<option name="minecraftVersion" value="1.20.1" />
<option name="platformVersion" value="47.3.5" />
<option name="platformVersion" value="47.4.1" />
<option name="srgType" value="TSRG" />
</component>
</module>

View File

@ -16,7 +16,7 @@
<option name="mappingFile" value="$MODULE_DIR$/../../build/createMcpToSrg/output.tsrg" />
<option name="mcpVersion" value="official_1.20.1" />
<option name="minecraftVersion" value="1.20.1" />
<option name="platformVersion" value="47.3.5" />
<option name="platformVersion" value="47.4.1" />
<option name="srgType" value="TSRG" />
</component>
</module>

View File

@ -140,21 +140,6 @@ repositories {
// flatDir {
// dir 'libs'
// }
flatDir {
dirs("libs")
}
maven {
name = "Modrinth"
url = uri("https://api.modrinth.com/maven")
}
maven {
url = uri("https://maven.tterrag.com/releases")
}
maven { url 'https://squiddev.cc/maven/' }
}
dependencies {
@ -178,27 +163,7 @@ dependencies {
implementation fg.deobf(files("./libs/VMod-Forge-1.20.1-1.2.2.jar"))
implementation fg.deobf(files("./libs/valkyrien-ship-schematics-forge-1.20.1-1.1.jar"))
implementation(fg.deobf(files("./libs/kotlinforforge-4.11.0-all.jar")))
implementation(fg.deobf(files("./libs/trackwork-1.20.1-1.1.1b.jar")))
implementation(fg.deobf("org.valkyrienskies:valkyrienskies-120:2.3.0-beta.7"))
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.14.0'
implementation 'net.minecraftforge:modlauncher:10.1.1'
implementation 'net.minecraftforge:forgespi:7.1.0'
compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.1"))
implementation(jarJar("io.github.llamalad7:mixinextras-forge:0.4.1")) {
jarJar.ranged(it, "[0.4.1,)")
}
implementation fg.deobf(files("./libs/drivebywire-1.20.1-0.0.10.jar"))
implementation(fg.deobf("com.simibubi.create:create-1.20.1:0.5.1.j"))
implementation fg.deobf(files("./libs/api-1.1.0+b19b27c4a4.jar"))
//implementation fg.deobf("maven.modrinth:create-copies-cats:0.0.1-1.20.1")
//implementation fg.deobf(files("./libs/framed/FramedBlocks-9.3.0.jar"))
implementation fg.deobf(files("./libs/kotlinforforge-4.11.0-all.jar"))
// For more info:
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
@ -208,9 +173,6 @@ dependencies {
compileOnly 'org.projectlombok:lombok:1.18.20'
annotationProcessor 'org.projectlombok:lombok:1.18.20'
implementation fg.deobf("org.squiddev:cc-tweaked-1.19.2:1.101.3")
}
@ -223,7 +185,7 @@ tasks.named('processResources', ProcessResources).configure {
forge_version : forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id : mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors : mod_authors, mod_description: mod_description,the_vmod_version:the_vmod_version,valkyrien_ship_schematics_version:valkyrien_ship_schematics_version,]
mod_authors : mod_authors, mod_description: mod_description,]
inputs.properties replaceProperties

View File

@ -1,19 +1,49 @@
org.gradle.jvmargs=-Xmx3G
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,1.21)
forge_version=47.3.5
# The Forge version must agree with the Minecraft version to get a valid artifact
forge_version=47.4.1
# 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
mapping_channel=official
# The mapping version to query from the mapping channel.
# This must match the format required by the mapping channel.
mapping_version=1.20.1
mod_id=vmodextras
mod_name=VModExtras
# 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=vmodaddon
# The human-readable display name for the mod.
mod_name=VModAddon
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=MIT
mod_version=0.0.1b
# The mod version. See https://semver.org/
mod_version=1.0-SNAPSHOT
# 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_group_id=space.eptaproject
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=p2vman
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
mod_description=
the_vmod_version = 1.2.2
valkyrien_ship_schematics_version = 1.0

View File

@ -1,7 +0,0 @@
Copyright 2025 p2vman
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -12,4 +12,4 @@ plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
}
rootProject.name = 'vmodextras'
rootProject.name = 'vmodaddon'

View File

@ -0,0 +1,60 @@
package space.eptaproject.vmodaddon;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.common.ForgeConfigSpec;
import java.util.List;
import java.util.Objects;
public class Config {
public static final ForgeConfigSpec COMMON_CONFIG;
public static final ForgeConfigSpec.ConfigValue<List<? extends String>> RESOURCE_LOCATION_LIST;
public static final ForgeConfigSpec.ConfigValue<String> RESOURCE_LOCATION;
public static List<ResourceLocation> parsedList = new ObjectArrayList<>();
public static ResourceLocation replace = Validator.RB;
static {
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
builder.push("Settings");
RESOURCE_LOCATION_LIST = builder
.comment("List of blocked blocks, format: 'modid:path'")
.defineListAllowEmpty(
"blocked",
List.of("minecraft:stone", "minecraft:diamond_block"),
obj -> obj instanceof String && ResourceLocation.isValidResourceLocation((String) obj)
);
RESOURCE_LOCATION = builder
.comment("replace to, format: 'modid:path'")
.define(
"replace",
Validator.RB.toString()
);
builder.pop();
COMMON_CONFIG = builder.build();
}
public static void bake() {
parsedList = RESOURCE_LOCATION_LIST.get().stream()
.map(s -> {
try {
return ResourceLocation.parse(s);
} catch (Exception e) {
return null;
}
})
.filter(Objects::nonNull)
.toList();
try {
replace = ResourceLocation.parse(RESOURCE_LOCATION.get());
} catch (Exception e) {
replace = Validator.RB;
}
}
}

View File

@ -1,4 +1,4 @@
package space.eptaproject.vmodextras;
package space.eptaproject.vmodaddon;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.Block;

View File

@ -1,19 +1,18 @@
package space.eptaproject.vmodextras;
package space.eptaproject.vmodaddon;
import lombok.ToString;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.registries.ForgeRegistries;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import space.eptaproject.vmodextras.util.ResourceLocationUtil;
import java.util.logging.Logger;
@ToString
public class Validator implements IValidator {
public static final Logger LOGGER = LoggerFactory.getLogger("Validator");
public static ResourceLocation RB = ResourceLocationUtil.fromNamespaceAndPath(VmodExtras.MODID, "example_block");
public static final Logger LOGGER = Logger.getLogger("Validator");
public static ResourceLocation RB = ResourceLocation.fromNamespaceAndPath(Vmodaddon.MODID, "example_block");
public Validator() {
@ -21,7 +20,8 @@ public class Validator implements IValidator {
@Override
public void valid(Block block, ResourceLocation location, CallbackInfoReturnable<BlockState> info) {
if (Config.parsedList.contains(location) && Config.Schematic_Blocked_Blocks_Enable) {
LOGGER.info(location.toString());
if (Config.parsedList.contains(location)) {
Block replacement = ForgeRegistries.BLOCKS.getValue(Config.replace);
if (replacement != null) {
info.setReturnValue(replacement.defaultBlockState());

View File

@ -0,0 +1,57 @@
package space.eptaproject.vmodaddon;
import com.mojang.logging.LogUtils;
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.common.MinecraftForge;
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.config.ModConfig;
import net.minecraftforge.fml.event.config.ModConfigEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import org.slf4j.Logger;
// The value here should match an entry in the META-INF/mods.toml file
@Mod(Vmodaddon.MODID)
public class Vmodaddon {
public static final String MODID = "vmodaddon";
private static final Logger LOGGER = LogUtils.getLogger();
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
public static final RegistryObject<Block> EXAMPLE_BLOCK = BLOCKS.register("example_block", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.STONE)));
public Vmodaddon() {
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
modEventBus.addListener(this::commonSetup);
BLOCKS.register(modEventBus);
MinecraftForge.EVENT_BUS.register(this);
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, Config.COMMON_CONFIG);
}
private void commonSetup(final FMLCommonSetupEvent event) {
}
@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public static class ModConfigHandler {
@SubscribeEvent
public static void onConfigReload(ModConfigEvent event) {
if (event.getConfig().getSpec() == Config.COMMON_CONFIG) {
Config.bake();
}
}
}
}

View File

@ -1,6 +1,5 @@
package space.eptaproject.vmodextras.mixins.trackwork;
package space.eptaproject.vmodaddon.mixin;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.CrudeIncrementalIntIdentityHashBiMap;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
@ -13,33 +12,29 @@ import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import space.eptaproject.vmodextras.IValidator;
import space.eptaproject.vmodextras.Validator;
import space.eptaproject.vmodaddon.IValidator;
import space.eptaproject.vmodaddon.Validator;
@Mixin(BlockPaletteHashMapV1.class)
public class BlockPaletteHashMapV1Mixin {
@Unique
public final IValidator vmodextras$validator = new Validator();
public final IValidator validator = new Validator();
@Shadow(remap = false)
private @Mutable CrudeIncrementalIntIdentityHashBiMap<BlockState> statePaletteMap;
@Shadow
private @Mutable CrudeIncrementalIntIdentityHashBiMap statePaletteMap;
@Inject(method = "fromId", at = @At("RETURN"), remap = false, cancellable = true)
private void vmodaddon$fromId(int id, CallbackInfoReturnable<BlockState> cir) {
BlockState blockState = this.statePaletteMap.byId(id);
if (blockState == null || blockState.isAir()) {
private void aboba(int id, CallbackInfoReturnable<BlockState> cir) {
BlockState blockState = (BlockState)this.statePaletteMap.byId(id);
if (blockState.isAir()) {
return;
}
Block block = blockState.getBlock();
ResourceLocation location = ForgeRegistries.BLOCKS.getKey(block);
CallbackInfoReturnable<BlockState> info = new CallbackInfoReturnable<>("blockstate-validator", true);
try {
vmodextras$validator.valid(block, location, info);
} catch (Exception e) {
Validator.LOGGER.error("Error validating: {}", location, e);
}
validator.valid(block, ForgeRegistries.BLOCKS.getKey(block), info);
if (info.isCancelled()) {
cir.setReturnValue(info.getReturnValue());
cir.cancel();

View File

@ -0,0 +1,33 @@
package space.eptaproject.vmodaddon.mixin;
import kotlin.jvm.functions.Function3;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.spaceeye.valkyrien_ship_schematics.interfaces.v1.IShipSchematicDataV1;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.List;
@Mixin(targets = "net.spaceeye.vmod.schematic.SchematicActionsQueue$SchemPlacementItem")
public class SchemPlacementItemMixin {
@Inject(method = "<init>", at = @At("RETURN"))
private void afterConstruct(ServerLevel level, ServerPlayer player, IShipSchematicDataV1 schematicV1, List shipsToCreate, Function3 postPlacementFn, CallbackInfo ci) {
//IBlockStatePalette palette = schematicV1.getBlockPalette();
//Map<Long, ChunkyBlockData<BlockItem>> blockData = schematicV1.getBlockData();
//for (Map.Entry<Long, ChunkyBlockData<BlockItem>> entry : blockData.entrySet()) {
// ChunkyBlockData<BlockItem> chunk_data = entry.getValue();
// chunk_data.getBlocks().forEach((a, b) -> {
// b.forEach((c, f) -> {
// BlockState state = palette.fromId(f.getPaletteId());
//
// });
// });
//}
}
}

View File

@ -1,126 +0,0 @@
package space.eptaproject.vmodextras;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import it.unimi.dsi.fastutil.objects.ObjectImmutableList;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.registries.ForgeRegistries;
import java.util.*;
public class Config {
public static final ForgeConfigSpec COMMON_CONFIG;
public static final ForgeConfigSpec.ConfigValue<List<? extends String>> RESOURCE_LOCATION_LIST;
public static final ForgeConfigSpec.ConfigValue<List<? extends String>> ITEM_BLACK_LIST;
public static final ForgeConfigSpec.ConfigValue<String> RESOURCE_LOCATION;
public static final ForgeConfigSpec.ConfigValue<Integer> Suspension_Stiffness_LIMIT;
public static final ForgeConfigSpec.ConfigValue<Double> Suspension_Stiffness_delta;
public static final ForgeConfigSpec.ConfigValue<Boolean> Schematic_Blocked_Blocks;
public static final ForgeConfigSpec.ConfigValue<Boolean> Inventory_Blocked_Blocks;
public static List<ResourceLocation> parsedList = new ObjectArrayList<>();
private static List<Map.Entry<Integer, ResourceLocation>> ITEM = new ObjectImmutableList<>(new ArrayList<>());
public static ResourceLocation replace = Validator.RB;
public static boolean Inventory_Blocked_Blocks_Enable = false;
public static boolean Schematic_Blocked_Blocks_Enable = false;
static {
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
builder.push("Schematic");
RESOURCE_LOCATION_LIST = builder
.comment("List of blocked blocks, format: 'modid:path'")
.defineListAllowEmpty(
"blocked",
List.of("minecraft:stone", "minecraft:diamond_block"),
obj -> obj instanceof String && ResourceLocation.isValidResourceLocation((String) obj)
);
RESOURCE_LOCATION = builder
.comment("replace to, format: 'modid:path'")
.define(
"replace",
Validator.RB.toString()
);
Schematic_Blocked_Blocks = builder
.define("enable", false);
builder.pop();
builder.push("Inventory");
ITEM_BLACK_LIST = builder
.comment("List of blocked items, format: 'modid:path'")
.defineListAllowEmpty(
"blocked",
List.of("minecraft:stone", "minecraft:diamond_block"),
obj -> obj instanceof String && ResourceLocation.isValidResourceLocation((String) obj)
);
Inventory_Blocked_Blocks = builder
.define("enable", false);
builder.pop();
builder.push("TrackWork");
Suspension_Stiffness_LIMIT = builder
.comment("track suspension stiffness")
.defineInRange("SuspensionStiffness", 4, 1, 20);
Suspension_Stiffness_delta = builder
.comment("track suspension stiffness delta")
.defineInRange("suspension_stiffness_delta", 1d, 0.10d, 1d);
builder.pop();
COMMON_CONFIG = builder.build();
}
public static void bake() {
parsedList = RESOURCE_LOCATION_LIST.get().stream()
.map(ResourceLocation::tryParse)
.filter(Objects::nonNull)
.toList();
ITEM = new ObjectImmutableList(ITEM_BLACK_LIST.get().stream()
.map(s -> {
try {
ResourceLocation location = ResourceLocation.tryParse(s);
return new AbstractMap.SimpleEntry<Integer, ResourceLocation>(location.hashCode(), location);
} catch (Exception e) {
return null;
}
})
.filter(Objects::nonNull)
.toList());
try {
replace = new ResourceLocation(RESOURCE_LOCATION.get());
} catch (Exception e) {
replace = Validator.RB;
}
Inventory_Blocked_Blocks_Enable = Inventory_Blocked_Blocks.get();
Schematic_Blocked_Blocks_Enable = Schematic_Blocked_Blocks.get();
}
public static boolean contains(ItemStack stack) {
if (stack.isEmpty() || !Inventory_Blocked_Blocks_Enable) return false;
ResourceLocation id = ForgeRegistries.ITEMS.getKey(stack.getItem());
if (id == null) return false;
int hash = id.hashCode();
for (var entry : ITEM) {
if (entry.getKey() == hash && entry.getValue().equals(id)) {
return true;
}
}
return false;
}
}

View File

@ -1,146 +0,0 @@
package space.eptaproject.vmodextras;
import com.google.common.base.VerifyException;
import com.mojang.logging.LogUtils;
import net.minecraft.world.item.*;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.material.MapColor;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.ModLoadingException;
import net.minecraftforge.fml.ModLoadingStage;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.config.ModConfigEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.registries.*;
import net.minecraftforge.versions.forge.ForgeVersion;
import org.slf4j.Logger;
import space.eptaproject.vmodextras.block.*;
import space.eptaproject.vmodextras.compact.Compact;
import space.eptaproject.vmodextras.util.ModRegistry;
@Mod(VmodExtras.MODID)
public class VmodExtras {
public static final String MODID = "vmodextras";
private static final Logger LOGGER = LogUtils.getLogger();
public static RegistryObject<BlockEntityType<EntityBackupBlockEntity>> ENTITY_BACKUP_BLOCK_ENTITY;
public static RegistryObject<Block> ENTITY_BACKUP;
public static RegistryObject<Item> ENTITY_BACKUP_ITEM;
public static final ModRegistry REGISTRY;
static {
REGISTRY = new ModRegistry(MODID);
ENTITY_BACKUP = REGISTRY.BLOCKS.register("entity_backup", () -> new EntityBackupBlock(BlockBehaviour.Properties.of().mapColor(MapColor.STONE)));
ENTITY_BACKUP_BLOCK_ENTITY = REGISTRY.BLOCK_ENTITIES.register("entity_backup", () -> BlockEntityType.Builder.of(EntityBackupBlockEntity::new, ENTITY_BACKUP.get()).build(null));
new Compact((REGISTRY, builder) -> {
builder.push((registry) -> {
ENTITY_BACKUP_ITEM = registry.register("entity_backup", () -> new BlockItem(ENTITY_BACKUP.get(), new Item.Properties().rarity(Rarity.EPIC)));
});
});
}
private static final String MIN_FORGE_VERSION = "47.3.5";
public VmodExtras() {
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
modEventBus.addListener(this::commonSetup);
REGISTRY.register(modEventBus);
MinecraftForge.EVENT_BUS.register(this);
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, Config.COMMON_CONFIG);
}
private void commonSetup(final FMLCommonSetupEvent event) {
String currentVersion = ForgeVersion.getVersion();
if (compareVersion(currentVersion, MIN_FORGE_VERSION) < 0) {
throw new ModLoadingException(
ModLoadingContext.get().getActiveContainer().getModInfo(),
ModLoadingStage.ERROR,
"VModExras requires Forge " + MIN_FORGE_VERSION + " or higher, but found " + currentVersion,
new VerifyException("VModExras requires Forge " + MIN_FORGE_VERSION + " or higher, but found " + currentVersion)
);
}
}
public static int compareVersion(String v1, String v2) {
if (v1 == null || v2 == null) {
throw new IllegalArgumentException("Version strings must not be null");
}
String[] parts1 = v1.split("[.-]");
String[] parts2 = v2.split("[.-]");
int maxLength = Math.max(parts1.length, parts2.length);
for (int i = 0; i < maxLength; i++) {
String s1 = i < parts1.length ? parts1[i] : "0";
String s2 = i < parts2.length ? parts2[i] : "0";
try {
int n1 = Integer.parseInt(s1);
int n2 = Integer.parseInt(s2);
if (n1 != n2) {
return Integer.compare(n1, n2);
}
} catch (NumberFormatException e) {
int cmp = s1.compareTo(s2);
if (cmp != 0) {
return cmp;
}
}
}
return 0;
}
@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public static class ModConfigHandler {
@SubscribeEvent
public static void onConfigReload(ModConfigEvent event) {
if (event.getConfig().getSpec() == Config.COMMON_CONFIG) {
Config.bake();
}
}
}
@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.DEDICATED_SERVER)
public static class InteractionHandler {
@SubscribeEvent
public static void onRightClickItem(PlayerInteractEvent.RightClickItem event) {
if (Config.contains(event.getItemStack())) {
event.setCanceled(true);
}
}
@SubscribeEvent
public static void onRightClickBlock(PlayerInteractEvent.RightClickBlock event) {
if (Config.contains(event.getItemStack())) {
event.setCanceled(true);
}
}
@SubscribeEvent
public static void onLeftClickBlock(PlayerInteractEvent.LeftClickBlock event) {
if (Config.contains(event.getItemStack())) {
event.setCanceled(true);
}
}
}
}

View File

@ -1,23 +0,0 @@
package space.eptaproject.vmodextras.block;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import space.eptaproject.vmodextras.VmodExtras;
public class EntityBackupBlock extends Block implements IBE<EntityBackupBlockEntity> {
public EntityBackupBlock(BlockBehaviour.Properties properties) {
super(properties);
}
@Override
public BlockEntityType<? extends EntityBackupBlockEntity> getBlockEntityType() {
return VmodExtras.ENTITY_BACKUP_BLOCK_ENTITY.get();
}
@Override
public Class<EntityBackupBlockEntity> getBlockEntityClass() {
return EntityBackupBlockEntity.class;
}
}

View File

@ -1,29 +0,0 @@
package space.eptaproject.vmodextras.block;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import org.valkyrienskies.core.api.ships.ServerShip;
import org.valkyrienskies.mod.common.VSGameUtilsKt;
import space.eptaproject.vmodextras.VmodExtras;
public class EntityBackupBlockEntity extends BlockEntity {
public EntityBackupBlockEntity(BlockPos p_155229_, BlockState p_155230_) {
super(VmodExtras.ENTITY_BACKUP_BLOCK_ENTITY.get(), p_155229_, p_155230_);
}
@Override
public void load(CompoundTag tag) {
super.load(tag);
}
@Override
public void saveAdditional(CompoundTag tag) {
super.saveAdditional(tag);
ServerShip ship = (ServerShip) VSGameUtilsKt.getShipManagingPos(this.level, this.getBlockPos());
}
}

View File

@ -1,33 +0,0 @@
package space.eptaproject.vmodextras.compact;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Items;
import net.minecraftforge.registries.RegistryObject;
import space.eptaproject.vmodextras.VmodExtras;
import space.eptaproject.vmodextras.compact.computercraft.ComputerCraftCompact;
import space.eptaproject.vmodextras.compact.trackwork.TrackWorkCompact;
import space.eptaproject.vmodextras.util.ModRegistry;
import space.eptaproject.vmodextras.util.Utils;
import java.util.function.BiConsumer;
public class Compact {
public static RegistryObject<CreativeModeTab> COMPACT_TAB;
public Compact(BiConsumer<ModRegistry, ModRegistry.TabBuilder> consumer) {
ModRegistry REGISTRY = VmodExtras.REGISTRY;
ModRegistry.TabBuilder builder = REGISTRY.TabBuilder();
Utils.executeIsModEnable("computercraft", () -> {
ComputerCraftCompact.init(REGISTRY, builder);
});
Utils.executeIsModEnable("trackwork", () -> {
TrackWorkCompact.init(REGISTRY, builder);
});
consumer.accept(REGISTRY, builder);
COMPACT_TAB = builder.build("vmodextras", Items.PAPER.getDefaultInstance());
}
}

View File

@ -1,34 +0,0 @@
package space.eptaproject.vmodextras.compact.computercraft;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Rarity;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.material.MapColor;
import net.minecraftforge.registries.RegistryObject;
import space.eptaproject.vmodextras.compact.computercraft.block.TrackWorkController;
import space.eptaproject.vmodextras.compact.computercraft.block.entity.TrackWorkControllerEntity;
import space.eptaproject.vmodextras.util.ModRegistry;
import space.eptaproject.vmodextras.util.Utils;
public class ComputerCraftCompact {
public static RegistryObject<BlockEntityType<TrackWorkControllerEntity>> TRACK_WORK_CONTROLLER_BLOCK_ENTITY;
public static RegistryObject<Block> TRACK_WORK_CONTROLLER_BLOCK;
public static RegistryObject<Item> TRACK_WORK_CONTROLLER_ITEM;
public static void init(ModRegistry REGISTRY, ModRegistry.TabBuilder builder) {
Utils.executeIsModEnable("trackwork", () -> {
TRACK_WORK_CONTROLLER_BLOCK = REGISTRY.BLOCKS.register("track_work_controller", () -> new TrackWorkController(BlockBehaviour.Properties.of().mapColor(MapColor.STONE)));
TRACK_WORK_CONTROLLER_BLOCK_ENTITY = REGISTRY.BLOCK_ENTITIES.register("track_work_controller", () -> BlockEntityType.Builder.of(TrackWorkControllerEntity::new, TRACK_WORK_CONTROLLER_BLOCK.get()).build(null));
});
builder.push((registry) -> {
Utils.executeIsModEnable("trackwork", () -> {
TRACK_WORK_CONTROLLER_ITEM = registry.register("track_work_controller", () -> new BlockItem(TRACK_WORK_CONTROLLER_BLOCK.get(), new Item.Properties().rarity(Rarity.EPIC)));
});
});
}
}

View File

@ -1,24 +0,0 @@
package space.eptaproject.vmodextras.compact.computercraft.block;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import space.eptaproject.vmodextras.compact.computercraft.ComputerCraftCompact;
import space.eptaproject.vmodextras.compact.computercraft.block.entity.TrackWorkControllerEntity;
public class TrackWorkController extends Block implements IBE<TrackWorkControllerEntity> {
public TrackWorkController(Properties properties) {
super(properties);
}
@Override
public BlockEntityType<? extends TrackWorkControllerEntity> getBlockEntityType() {
return ComputerCraftCompact.TRACK_WORK_CONTROLLER_BLOCK_ENTITY.get();
}
@Override
public Class<TrackWorkControllerEntity> getBlockEntityClass() {
return TrackWorkControllerEntity.class;
}
}

View File

@ -1,41 +0,0 @@
package space.eptaproject.vmodextras.compact.computercraft.block.entity;
import dan200.computercraft.api.peripheral.IPeripheral;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.LazyOptional;
import org.jetbrains.annotations.NotNull;
import space.eptaproject.vmodextras.compact.computercraft.ComputerCraftCompact;
import space.eptaproject.vmodextras.compact.computercraft.peripheral.TrackWorkControllerPeripheral;
import static dan200.computercraft.shared.Capabilities.CAPABILITY_PERIPHERAL;
public class TrackWorkControllerEntity extends BlockEntity {
public TrackWorkControllerEntity(BlockPos p_155229_, BlockState p_155230_) {
super(ComputerCraftCompact.TRACK_WORK_CONTROLLER_BLOCK_ENTITY.get(), p_155229_, p_155230_);
}
protected TrackWorkControllerPeripheral peripheral = new TrackWorkControllerPeripheral(this);
private LazyOptional<IPeripheral> peripheralCap;
@Override
@NotNull
public <T> LazyOptional<T> getCapability(@NotNull Capability<T> cap, Direction direction) {
if (cap == CAPABILITY_PERIPHERAL) {
if (peripheralCap == null) {
peripheralCap = LazyOptional.of(() -> peripheral);
}
return peripheralCap.cast();
}
return super.getCapability(cap, direction);
}
@Override
public void invalidateCaps() {
super.invalidateCaps();
peripheralCap.invalidate();
}
}

View File

@ -1,37 +0,0 @@
package space.eptaproject.vmodextras.compact.computercraft.peripheral;
import dan200.computercraft.api.peripheral.IComputerAccess;
import dan200.computercraft.api.peripheral.IPeripheral;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import org.jetbrains.annotations.NotNull;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
public class PeripheralBase implements IPeripheral {
protected final List<IComputerAccess> connectedComputers = new ObjectArrayList<>();
protected final String type;
public PeripheralBase(String type) {
this.type = type;
}
@Override
public void detach(@Nullable IComputerAccess computer) {
connectedComputers.remove(computer);
}
@Override
public void attach(@Nonnull IComputerAccess computer) {
connectedComputers.add(computer);
}
@Override
public @NotNull String getType() {
return this.type;
}
public boolean equals(IPeripheral iPeripheral) {
return this == iPeripheral;
}
}

View File

@ -1,84 +0,0 @@
package space.eptaproject.vmodextras.compact.computercraft.peripheral;
import dan200.computercraft.api.lua.*;
import edn.stratodonut.trackwork.tracks.forces.SimpleWheelController;
import it.unimi.dsi.fastutil.ints.Int2DoubleArrayMap;
import it.unimi.dsi.fastutil.ints.Int2DoubleMap;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import org.joml.Vector3d;
import org.joml.Vector3dc;
import org.valkyrienskies.core.api.ships.ServerShip;
import org.valkyrienskies.mod.common.VSGameUtilsKt;
import space.eptaproject.vmodextras.compact.computercraft.block.entity.TrackWorkControllerEntity;
import space.eptaproject.vmodextras.compact.trackwork.ISimpleWheelController;
import java.util.List;
import java.util.Objects;
public class TrackWorkControllerPeripheral extends PeripheralBase {
private TrackWorkControllerEntity entity;
public static class Controller<T> {
private final Class<T> contoller;
private Controller(Class<T> contoller) {
this.contoller = contoller;
}
public Class<T> getContoller() {
return contoller;
}
public T get(ServerShip ship) {
Objects.requireNonNull(ship);
T t = ship.getAttachment(contoller);
if (t == null) {
try {
t = contoller.getDeclaredConstructor().newInstance();
} catch (Exception e) {
e.printStackTrace();
}
}
Objects.requireNonNull(t);
return t;
}
public static final List<Controller<?>> DEFS = new ObjectArrayList<>();
}
public TrackWorkControllerPeripheral(TrackWorkControllerEntity entity) {
super("track_work_controller");
this.entity = entity;
}
@LuaFunction
public final void SetSuspensionAdjust(IArguments arguments) throws LuaException {
ServerShip ship = (ServerShip) VSGameUtilsKt.getShipObjectManagingPos(this.entity.getLevel(), this.entity.getBlockPos());
if (ship != null) {
((ISimpleWheelController) SimpleWheelController.getOrCreate(ship)).setSuspensionAdjust(new Vector3d(
Math.max(Math.min(arguments.getDouble(0), 1d), 0d),
Math.max(Math.min(arguments.getDouble(1), 1.3d), 0.5d),
Math.max(Math.min(arguments.getDouble(2), 1d), 0d)
));
}
}
@LuaFunction
public final MethodResult GetSuspensionAdjust(IArguments arguments) throws LuaException {
ServerShip ship = (ServerShip) VSGameUtilsKt.getShipObjectManagingPos(this.entity.getLevel(), this.entity.getBlockPos());
if (ship != null) {
Vector3dc vec =((ISimpleWheelController) SimpleWheelController.getOrCreate(ship)).getSuspensionAdjust();
Int2DoubleMap map = new Int2DoubleArrayMap();
map.put(1, vec.x());
map.put(2, vec.y());
map.put(3, vec.z());
return MethodResult.of(new ObjectLuaTable(map));
}
return MethodResult.of();
}
@LuaFunction
public final MethodResult GetMeta(IArguments arguments) throws LuaException {
return MethodResult.of();
}
}

View File

@ -1,8 +0,0 @@
package space.eptaproject.vmodextras.compact.trackwork;
public interface IBlockEntityClear {
boolean clear();
default boolean reset() {
return clear();
}
}

View File

@ -1,39 +0,0 @@
package space.eptaproject.vmodextras.compact.trackwork;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.Tag;
import org.joml.Vector3d;
import org.joml.Vector3dc;
public interface IController {
float getSuspensionStiffness();
void setSuspensionStiffness(float val);
Vector3dc getSuspensionAdjust();
void setSuspensionAdjust(Vector3dc vector3d);
default void encode(CompoundTag root) {
root.putFloat("SuspensionStiffness", this.getSuspensionStiffness());
{
CompoundTag suspensionAdjust = new CompoundTag();
Vector3dc vec = this.getSuspensionAdjust();
suspensionAdjust.putDouble("x", vec.x());
suspensionAdjust.putDouble("y", vec.y());
suspensionAdjust.putDouble("z", vec.z());
root.put("suspensionAdjust", suspensionAdjust);
}
}
default void decode(CompoundTag root) {
if (root.contains("SuspensionStiffness", Tag.TAG_FLOAT)) {
this.setSuspensionStiffness(root.getFloat("SuspensionStiffness"));
}
if (root.contains("suspensionAdjust", Tag.TAG_COMPOUND)) {
CompoundTag sus = root.getCompound("suspensionAdjust");
this.setSuspensionAdjust(new Vector3d(sus.getDouble("x"), sus.getDouble("y"), sus.getDouble("z")));
}
}
}

View File

@ -1,7 +0,0 @@
package space.eptaproject.vmodextras.compact.trackwork;
import space.eptaproject.vmodextras.mixins.trackwork.PhysicsTrackControllerAccessor;
public interface IPhysicsTrackController extends PhysicsTrackControllerAccessor, IController {
}

View File

@ -1,6 +0,0 @@
package space.eptaproject.vmodextras.compact.trackwork;
import space.eptaproject.vmodextras.mixins.trackwork.SimpleWheelControllerAccessor;
public interface ISimpleWheelController extends SimpleWheelControllerAccessor, IController {
}

View File

@ -1,44 +0,0 @@
package space.eptaproject.vmodextras.compact.trackwork;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Rarity;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.material.MapColor;
import net.minecraftforge.registries.RegistryObject;
import space.eptaproject.vmodextras.compact.trackwork.block.CompactBackupBlock;
import space.eptaproject.vmodextras.compact.trackwork.block.TrackBackupBlock;
import space.eptaproject.vmodextras.compact.trackwork.block.entity.CompactBackupBlockEntity;
import space.eptaproject.vmodextras.compact.trackwork.block.entity.TrackBackupBlockEntity;
import space.eptaproject.vmodextras.util.ModRegistry;
public class TrackWorkCompact
{
public static RegistryObject<Block> SHIP_VOID_BLOCK;
public static RegistryObject<Block> TRAK_BUK;
public static RegistryObject<Block> COMPACT_BACKUP;
public static RegistryObject<BlockEntityType<TrackBackupBlockEntity>> MY_BLOCK_ENTITY;
public static RegistryObject<BlockEntityType<CompactBackupBlockEntity>> COMPACT_BACKUP_BLOCK_ENTITY;
public static RegistryObject<Item> MY_BLOCK_ITEM;
public static RegistryObject<Item> SHIP_VOID_ITEM;
public static RegistryObject<Item> COMPACT_BACKUP_ITEM;
public static void init(ModRegistry REGISTRY, ModRegistry.TabBuilder builder) {
TRAK_BUK = REGISTRY.BLOCKS.register("track_backup", () -> new TrackBackupBlock(BlockBehaviour.Properties.of().mapColor(MapColor.STONE)));
SHIP_VOID_BLOCK = REGISTRY.BLOCKS.register("ship_void", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.STONE)));
COMPACT_BACKUP = REGISTRY.BLOCKS.register("compact_backup", () -> new CompactBackupBlock(BlockBehaviour.Properties.of().mapColor(MapColor.STONE)));
MY_BLOCK_ENTITY = REGISTRY.BLOCK_ENTITIES.register("track_backup", () -> BlockEntityType.Builder.of(TrackBackupBlockEntity::new, TRAK_BUK.get()).build(null));
COMPACT_BACKUP_BLOCK_ENTITY = REGISTRY.BLOCK_ENTITIES.register("compact_backup", () -> BlockEntityType.Builder.of(CompactBackupBlockEntity::new, COMPACT_BACKUP.get()).build(null));
builder.push((registry) -> {
MY_BLOCK_ITEM = registry.register("track_backup", () -> new BlockItem(TRAK_BUK.get(), new Item.Properties().rarity(Rarity.EPIC)));
SHIP_VOID_ITEM = registry.register("ship_void", () -> new BlockItem(SHIP_VOID_BLOCK.get(), new Item.Properties()));
COMPACT_BACKUP_ITEM = registry.register("compact_backup", () -> new BlockItem(COMPACT_BACKUP.get(), new Item.Properties().rarity(Rarity.EPIC)));
});
}
}

View File

@ -1,24 +0,0 @@
package space.eptaproject.vmodextras.compact.trackwork.block;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import space.eptaproject.vmodextras.compact.trackwork.TrackWorkCompact;
import space.eptaproject.vmodextras.compact.trackwork.block.entity.CompactBackupBlockEntity;
public class CompactBackupBlock extends Block implements IBE<CompactBackupBlockEntity> {
public CompactBackupBlock(Properties properties) {
super(properties);
}
@Override
public BlockEntityType<? extends CompactBackupBlockEntity> getBlockEntityType() {
return TrackWorkCompact.COMPACT_BACKUP_BLOCK_ENTITY.get();
}
@Override
public Class<CompactBackupBlockEntity> getBlockEntityClass() {
return CompactBackupBlockEntity.class;
}
}

View File

@ -1,24 +0,0 @@
package space.eptaproject.vmodextras.compact.trackwork.block;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import space.eptaproject.vmodextras.compact.trackwork.TrackWorkCompact;
import space.eptaproject.vmodextras.compact.trackwork.block.entity.TrackBackupBlockEntity;
public class TrackBackupBlock extends Block implements IBE<TrackBackupBlockEntity> {
public TrackBackupBlock(Properties properties) {
super(properties);
}
@Override
public BlockEntityType<? extends TrackBackupBlockEntity> getBlockEntityType() {
return TrackWorkCompact.MY_BLOCK_ENTITY.get();
}
@Override
public Class<TrackBackupBlockEntity> getBlockEntityClass() {
return TrackBackupBlockEntity.class;
}
}

View File

@ -1,97 +0,0 @@
package space.eptaproject.vmodextras.compact.trackwork.block.entity;
import edn.stratodonut.drivebywire.wire.ShipWireNetworkManager;
import edn.stratodonut.trackwork.tracks.forces.PhysicsTrackController;
import edn.stratodonut.trackwork.tracks.forces.SimpleWheelController;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.Tag;
import net.minecraft.world.level.block.Rotation;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import org.valkyrienskies.core.api.ships.ServerShip;
import org.valkyrienskies.mod.common.VSGameUtilsKt;
import space.eptaproject.vmodextras.compact.trackwork.TrackWorkCompact;
import space.eptaproject.vmodextras.compact.trackwork.IPhysicsTrackController;
import space.eptaproject.vmodextras.compact.trackwork.ISimpleWheelController;
public class CompactBackupBlockEntity extends BlockEntity {
private CompoundTag pendingBackupData;
public CompactBackupBlockEntity(BlockPos p_155229_, BlockState p_155230_) {
super(TrackWorkCompact.COMPACT_BACKUP_BLOCK_ENTITY.get(), p_155229_, p_155230_);
}
@Override
protected void saveAdditional(CompoundTag tag) {
super.saveAdditional(tag);
ServerShip ship = (ServerShip) VSGameUtilsKt.getShipObjectManagingPos(this.level, getBlockPos());
if (ship != null) {
{
PhysicsTrackController physicsTrackController = ship.getAttachment(PhysicsTrackController.class);
if (physicsTrackController != null) {
IPhysicsTrackController controller = (IPhysicsTrackController) physicsTrackController;
CompoundTag local = new CompoundTag();
controller.encode(local);
tag.put("PhysicsTrackController", local);
}
}
{
SimpleWheelController simpleWheelController = ship.getAttachment(SimpleWheelController.class);
if (simpleWheelController != null) {
ISimpleWheelController controller = (ISimpleWheelController) simpleWheelController;
CompoundTag local = new CompoundTag();
controller.encode(local);
tag.put("SimpleWheelController", local);
}
}
}
ship = (ServerShip) VSGameUtilsKt.getShipManagingPos(this.level, this.getBlockPos());
if (this.level != null) {
if (this.pendingBackupData == null) {
this.pendingBackupData = new CompoundTag();
}
ShipWireNetworkManager.get(ship).ifPresent((m) -> this.pendingBackupData.merge(m.serialiseToNbt(this.level, this.getBlockPos())));
if (this.pendingBackupData != null) {
tag.put("WireNetwork", this.pendingBackupData);
}
}
}
@Override
public void load(CompoundTag tag) {
super.load(tag);
ServerShip ship = (ServerShip) VSGameUtilsKt.getShipObjectManagingPos(this.level, getBlockPos());
if (ship != null) {
if (tag.contains("SimpleWheelController", Tag.TAG_COMPOUND)) {
((ISimpleWheelController) SimpleWheelController.getOrCreate(ship)).decode(tag.getCompound("SimpleWheelController"));
}
if (tag.contains("PhysicsTrackController", Tag.TAG_COMPOUND)) {
((IPhysicsTrackController) PhysicsTrackController.getOrCreate(ship)).decode(tag.getCompound("PhysicsTrackController"));
}
}
ship = (ServerShip) VSGameUtilsKt.getShipManagingPos(this.level, getBlockPos());
if (ship != null) {
if (tag.contains("WireNetwork", 10)) {
ShipWireNetworkManager.loadIfNotExists(ship, level, tag.getCompound("WireNetwork"), this.getBlockPos(), Rotation.NONE);
this.pendingBackupData = tag.getCompound("WireNetwork");
}
}
}
}

View File

@ -1,115 +0,0 @@
package space.eptaproject.vmodextras.compact.trackwork.block.entity;
import edn.stratodonut.trackwork.tracks.forces.PhysicsTrackController;
import edn.stratodonut.trackwork.tracks.forces.SimpleWheelController;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.Tag;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import org.valkyrienskies.core.api.ships.ServerShip;
import org.valkyrienskies.mod.common.VSGameUtilsKt;
import space.eptaproject.vmodextras.compact.trackwork.TrackWorkCompact;
import space.eptaproject.vmodextras.compact.trackwork.IPhysicsTrackController;
import space.eptaproject.vmodextras.compact.trackwork.ISimpleWheelController;
import space.eptaproject.vmodextras.compact.trackwork.IBlockEntityClear;
public class TrackBackupBlockEntity extends BlockEntity implements IBlockEntityClear {
public TrackBackupBlockEntity(BlockPos p_155229_, BlockState p_155230_) {
super(TrackWorkCompact.MY_BLOCK_ENTITY.get(), p_155229_, p_155230_);
}
public CompoundTag tag = new CompoundTag();
@Override
public boolean clear() {
try {
CompoundTag local = tag.copy();
if (local.contains("SimpleWheelController")) {
CompoundTag SimpleWheelControllerTag = new CompoundTag();
SimpleWheelControllerTag.putFloat("SuspensionStiffness", 1);
{
CompoundTag suspensionAdjust = new CompoundTag();
suspensionAdjust.putDouble("x", 0);
suspensionAdjust.putDouble("y", 1);
suspensionAdjust.putDouble("z", 0);
SimpleWheelControllerTag.put("suspensionAdjust", suspensionAdjust);
}
tag.put("SimpleWheelController", SimpleWheelControllerTag);
}
if (local.contains("PhysicsTrackController")) {
CompoundTag PhysicsTrackControllerTag = new CompoundTag();
PhysicsTrackControllerTag.putFloat("SuspensionStiffness", 1);
{
CompoundTag suspensionAdjust = new CompoundTag();
suspensionAdjust.putDouble("x", 0);
suspensionAdjust.putDouble("y", 1);
suspensionAdjust.putDouble("z", 0);
PhysicsTrackControllerTag.put("suspensionAdjust", suspensionAdjust);
}
tag.put("PhysicsTrackController", PhysicsTrackControllerTag);
}
return true;
} catch (Exception e) {
return false;
}
}
@Override
protected void saveAdditional(CompoundTag tag) {
this.tag = tag;
super.saveAdditional(tag);
ServerShip ship = (ServerShip) VSGameUtilsKt.getShipObjectManagingPos(this.level, getBlockPos());
if (ship != null) {
{
PhysicsTrackController physicsTrackController = ship.getAttachment(PhysicsTrackController.class);
if (physicsTrackController != null) {
IPhysicsTrackController controller = (IPhysicsTrackController) physicsTrackController;
CompoundTag local = new CompoundTag();
controller.encode(local);
tag.put("PhysicsTrackController", local);
}
}
{
SimpleWheelController simpleWheelController = ship.getAttachment(SimpleWheelController.class);
if (simpleWheelController != null) {
ISimpleWheelController controller = (ISimpleWheelController) simpleWheelController;
CompoundTag local = new CompoundTag();
controller.encode(local);
tag.put("SimpleWheelController", local);
}
}
}
}
@Override
public void load(CompoundTag tag) {
this.tag = tag;
super.load(tag);
ServerShip ship = (ServerShip) VSGameUtilsKt.getShipObjectManagingPos(this.level, getBlockPos());
if (ship != null) {
if (tag.contains("SimpleWheelController", Tag.TAG_COMPOUND)) {
((ISimpleWheelController) SimpleWheelController.getOrCreate(ship)).decode(tag.getCompound("SimpleWheelController"));
}
if (tag.contains("PhysicsTrackController", Tag.TAG_COMPOUND)) {
((IPhysicsTrackController) PhysicsTrackController.getOrCreate(ship)).decode(tag.getCompound("PhysicsTrackController"));
}
}
}
}

View File

@ -1,34 +0,0 @@
package space.eptaproject.vmodextras.compact.trackwork.item;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.Level;
public class ToolKit extends Item {
public ToolKit(Item.Properties properties) {
super(properties);
}
@Override
public InteractionResult onItemUseFirst(ItemStack stack, UseOnContext context) {
Player player = context.getPlayer();
if (player != null && player.mayBuild()) {
Level level = context.getLevel();
BlockPos pos = context.getClickedPos();
CompoundTag nbt = stack.getTag();
return InteractionResult.PASS;
} else {
return InteractionResult.PASS;
}
}
public enum Mode {
CLEAR
}
}

View File

@ -1,44 +0,0 @@
package space.eptaproject.vmodextras.mixin;
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
import org.objectweb.asm.tree.*;
import java.util.List;
import java.util.Set;
public class MixinPlugin implements IMixinConfigPlugin {
@Override
public void onLoad(String mixinPackage) {
}
@Override
public String getRefMapperConfig() {
return null;
}
@Override
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
return true;
}
@Override
public void acceptTargets(Set<String> myTargets, Set<String> otherTargets) {
}
@Override
public List<String> getMixins() {
return List.of();
}
@Override
public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {
}
@Override
public void postApply(String targetClassName, ClassNode classNode, String mixinClassName, IMixinInfo mixinInfo) {
}
}

View File

@ -1,4 +0,0 @@
@ApiStatus.Experimental
package space.eptaproject.vmodextras.mixin;
import org.jetbrains.annotations.ApiStatus;

View File

@ -1,4 +0,0 @@
package space.eptaproject.vmodextras.mixins;
public class A {
}

View File

@ -1,21 +0,0 @@
package space.eptaproject.vmodextras.mixins.trackwork;
import edn.stratodonut.trackwork.tracks.forces.PhysicsTrackController;
import org.joml.Vector3dc;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(PhysicsTrackController.class)
public interface PhysicsTrackControllerAccessor {
@Accessor(value = "suspensionStiffness", remap = false)
float getSuspensionStiffness();
@Accessor(value = "suspensionStiffness", remap = false)
void setSuspensionStiffness(float val);
@Accessor(value = "suspensionAdjust", remap = false)
Vector3dc getSuspensionAdjust();
@Accessor(value = "suspensionAdjust", remap = false)
void setSuspensionAdjust(Vector3dc vector3d);
}

View File

@ -1,26 +0,0 @@
package space.eptaproject.vmodextras.mixins.trackwork;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import edn.stratodonut.trackwork.tracks.forces.PhysicsTrackController;
import org.joml.Math;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
import space.eptaproject.vmodextras.Config;
import space.eptaproject.vmodextras.compact.trackwork.IPhysicsTrackController;
@Mixin(PhysicsTrackController.class)
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class PhysicsTrackControllerMixin implements IPhysicsTrackController {
@Shadow(remap = false) private volatile float suspensionStiffness;
/**
* @author
* @reason
*/
@Overwrite(remap = false)
public final float setDamperCoefficient(float delta) {
this.suspensionStiffness = Math.clamp(1, Config.Suspension_Stiffness_LIMIT.get(), this.suspensionStiffness + delta);
return this.suspensionStiffness;
}
}

View File

@ -1,21 +0,0 @@
package space.eptaproject.vmodextras.mixins.trackwork;
import edn.stratodonut.trackwork.tracks.forces.SimpleWheelController;
import org.joml.Vector3dc;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(SimpleWheelController.class)
public interface SimpleWheelControllerAccessor {
@Accessor(value = "suspensionStiffness", remap = false)
float getSuspensionStiffness();
@Accessor(value = "suspensionStiffness", remap = false)
void setSuspensionStiffness(float val);
@Accessor(value = "suspensionAdjust", remap = false)
Vector3dc getSuspensionAdjust();
@Accessor(value = "suspensionAdjust", remap = false)
void setSuspensionAdjust(Vector3dc vector3d);
}

View File

@ -1,26 +0,0 @@
package space.eptaproject.vmodextras.mixins.trackwork;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import edn.stratodonut.trackwork.tracks.forces.SimpleWheelController;
import org.joml.Math;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
import space.eptaproject.vmodextras.Config;
import space.eptaproject.vmodextras.compact.trackwork.ISimpleWheelController;
@Mixin(SimpleWheelController.class)
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class SimpleWheelControllerMixin implements ISimpleWheelController {
@Shadow(remap = false) private volatile float suspensionStiffness;
/**
* @author
* @reason
*/
@Overwrite(remap = false)
public final float setDamperCoefficient(float delta) {
this.suspensionStiffness = Math.clamp(1, Config.Suspension_Stiffness_LIMIT.get(), this.suspensionStiffness + delta);
return this.suspensionStiffness;
}
}

View File

@ -1,9 +0,0 @@
package space.eptaproject.vmodextras.mixins.trackwork;
import edn.stratodonut.trackwork.items.TrackToolkit;
import org.spongepowered.asm.mixin.Mixin;
@Mixin(TrackToolkit.class)
public class TrackToolkitMixin {
}

View File

@ -1,77 +0,0 @@
package space.eptaproject.vmodextras.util;
import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap;
import lombok.Getter;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import java.util.Map;
import java.util.function.Consumer;
public class ModRegistry {
@Getter
private final String modid;
public final DeferredRegister<Block> BLOCKS;
public final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITIES;
public final Map<RegistryObject<CreativeModeTab>, DeferredRegister<Item>> ITEMS;
public final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS;
public ModRegistry(String modid) {
this.modid = modid;
this.BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, modid);
this.BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, modid);
this.ITEMS = new Object2ObjectArrayMap<>();
this.CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, modid);
}
public TabBuilder TabBuilder() {
return new TabBuilder(this);
}
public void register(IEventBus bus) {
this.BLOCKS.register(bus);
this.BLOCK_ENTITIES.register(bus);
this.CREATIVE_MODE_TABS.register(bus);
for (DeferredRegister<Item> registry : ITEMS.values()) {
registry.register(bus);
}
}
public static class TabBuilder {
private final ModRegistry registry;
public final DeferredRegister<Item> ITEMS;
public TabBuilder(ModRegistry registry) {
this.registry = registry;
this.ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, registry.modid);
}
public TabBuilder push(Consumer<DeferredRegister<Item>> registry) {
registry.accept(ITEMS);
return this;
}
public RegistryObject<CreativeModeTab> build(String name, ItemStack icon) {
RegistryObject<CreativeModeTab> tab = this.registry.CREATIVE_MODE_TABS.register(name, () -> CreativeModeTab.builder().withTabsBefore(CreativeModeTabs.COMBAT).icon(() -> icon).displayItems((parameters, output) -> {
for (RegistryObject<Item> object : ITEMS.getEntries()) {
output.accept(object.get());
}
}).build());
this.registry.ITEMS.put(tab, this.ITEMS);
return tab;
}
}
}

View File

@ -1,9 +0,0 @@
package space.eptaproject.vmodextras.util;
import net.minecraft.resources.ResourceLocation;
public class ResourceLocationUtil {
public static ResourceLocation fromNamespaceAndPath(String namespace, String path) {
return new ResourceLocation(namespace, path);
}
}

View File

@ -1,17 +0,0 @@
package space.eptaproject.vmodextras.util;
import net.minecraftforge.fml.ModList;
public class Utils {
public static void executeIsModEnable(String mod,Runnable runnable) {
if (ModList.get().isLoaded(mod)) {
runnable.run();
}
}
public static void executeIsModDisable(String mod,Runnable runnable) {
if (!ModList.get().isLoaded(mod)) {
runnable.run();
}
}
}

View File

@ -1,3 +1 @@
public net.spaceeye.vmod.schematic.SchematicActionsQueue$SchemPlacementItem
public net.spaceeye.vmod.schematic.SchematicActionsQueue$SchemPlacementItem placeChunk(Lnet/minecraft/server/level/ServerLevel;Ljava/util/Map;Lnet/spaceeye/valkyrien_ship_schematics/containers/v1/ChunkyBlockData;Lnet/spaceeye/valkyrien_ship_schematics/interfaces/IBlockStatePalette;Ljava/util/List;Lnet/spaceeye/vmod/utils/Vector3d;)V # placeChunk
public net.spaceeye.vmod.schematic.SchematicActionsQueue$SchemPlacementItem place(JJ)Ljava/lang/Boolean; # place
public net.spaceeye.vmod.schematic.SchematicActionsQueue$SchemPlacementItem

View File

@ -1,21 +1,63 @@
modLoader = "javafml"
loaderVersion = "${loader_version_range}"
# 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.
license = "${mod_license}"
[[mods]]
modId = "${mod_id}"
version = "${mod_version}"
displayName = "${mod_name}"
authors = "${mod_authors}"
# 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="vmodaddon.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)
description = '''${mod_description}'''
[[dependencies."${mod_id}"]]
modId = "forge"
mandatory = true
versionRange = "${forge_version_range}"
# 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
ordering = "NONE"
side = "SERVER"
# Side this dependency is applied on - BOTH, CLIENT, or SERVER
side = "BOTH"# Here's another dependency
[[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"
@ -23,13 +65,13 @@ side = "BOTH"
[[dependencies."${mod_id}"]]
modId = "the_vmod"
mandatory = true
versionRange = "${the_vmod_version}"
versionRange = "1.2.2"
ordering = "NONE"
side = "BOTH"
[[dependencies."${mod_id}"]]
modId = "valkyrien_ship_schematics"
mandatory = true
versionRange = "${valkyrien_ship_schematics_version}"
versionRange = "1.0"
ordering = "NONE"
side = "BOTH"

View File

@ -1,5 +0,0 @@
{
"variants": {
"": { "model": "vmodextras:block/track_backup" }
}
}

View File

@ -1,5 +0,0 @@
{
"variants": {
"": { "model": "vmodextras:block/track_work_controller" }
}
}

View File

@ -1,4 +0,0 @@
{
"block.vmodextras.track_backup": "Track Backup",
"block.vmodextras.ship_void": "Ship Void"
}

View File

@ -1,6 +0,0 @@
{
"parent": "block/cube_all",
"textures": {
"all": "vmodextras:block/track_backup"
}
}

View File

@ -1,6 +0,0 @@
{
"parent": "block/cube_all",
"textures": {
"all": "vmodextras:block/track_work_controller"
}
}

View File

@ -1,6 +0,0 @@
{
"parent": "block/cube_all",
"textures": {
"all": "vmodextras:block/track_backup"
}
}

View File

@ -1,6 +0,0 @@
{
"parent": "block/cube_all",
"textures": {
"all": "vmodextras:block/track_work_controller"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

View File

@ -1,17 +0,0 @@
[
{
"block": "vmodextras:ship_void",
"mass": 0.0,
"friction": 0.0
},
{
"block": "vmodextras:track_backup",
"mass": 120.0,
"friction": 0.0
},
{
"block": "vmodextras:compact_backup",
"mass": 120.0,
"friction": 0.0
}
]

View File

@ -0,0 +1,15 @@
{
"required": true,
"minVersion": "0.8",
"package": "space.eptaproject.vmodaddon.mixin",
"compatibilityLevel": "JAVA_8",
"refmap": "vmodaddon.refmap.json",
"mixins": [
"BlockPaletteHashMapV1Mixin"
],
"client": [
],
"injectors": {
"defaultRequire": 1
}
}

View File

@ -1,19 +0,0 @@
{
"required": true,
"minVersion": "0.8",
"package": "space.eptaproject.vmodextras.mixins",
"compatibilityLevel": "JAVA_8",
"refmap": "vmodextras.refmap.json",
"mixins": [
"trackwork.BlockPaletteHashMapV1Mixin",
"trackwork.PhysicsTrackControllerAccessor",
"trackwork.PhysicsTrackControllerMixin",
"trackwork.SimpleWheelControllerAccessor",
"trackwork.SimpleWheelControllerMixin"
],
"client": [
],
"injectors": {
"defaultRequire": 1
}
}