initial commit, based off of glowstonedust

This commit is contained in:
Justin Parsell 2021-11-19 01:17:48 -05:00
commit 8199fb81b1
77 changed files with 2333 additions and 0 deletions

33
.gitignore vendored Normal file
View File

@ -0,0 +1,33 @@
# gradle
.gradle/
build/
out/
classes/
# eclipse
*.launch
# idea
.idea/
*.iml
*.ipr
*.iws
# vscode
.settings/
.vscode/
bin/
.classpath
.project
# macos
*.DS_Store
# fabric
run/

7
LICENSE Normal file
View File

@ -0,0 +1,7 @@
Copyright 2021 Justin (Alias: Ganku, Badjman)
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.

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# Glowstone Wire
Adds redstone-like dust for glowstone.
- Emit's light level 8 (Perfect for 2-wide path ways)
- Can be customized to look a little more stylized
10/10, great mod.

98
build.gradle Normal file
View File

@ -0,0 +1,98 @@
plugins {
id 'fabric-loom' version '0.6-SNAPSHOT'
id 'maven-publish'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven{url "https://maven.shedaniel.me/"}
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
// Custom API's
modApi ("me.shedaniel.cloth:cloth-config-fabric:4.11.26") {
exclude(group: "net.fabricmc.fabric-api")
}
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
// We'll use that if it's available, but otherwise we'll use the older option.
def targetVersion = 8
if (JavaVersion.current().isJava9Compatible()) {
it.options.release = targetVersion
}
}
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}

17
gradle.properties Normal file
View File

@ -0,0 +1,17 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.6
loader_version=0.11.3
# Mod Properties
mod_version = 0.0.1
maven_group = me.parsell
archives_base_name = wireddust
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.32.5+1.16

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

185
gradlew vendored Normal file
View File

@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"

89
gradlew.bat vendored Normal file
View File

@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

9
settings.gradle Normal file
View File

@ -0,0 +1,9 @@
pluginManagement {
repositories {
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
gradlePluginPortal()
}
}

View File

@ -0,0 +1,36 @@
package me.parsell.wireddust;
import me.parsell.wireddust.core.WiredDustBlocks;
import me.parsell.wireddust.core.WiredDustItems;
import me.shedaniel.autoconfig.AutoConfig;
import me.shedaniel.autoconfig.serializer.GsonConfigSerializer;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.player.UseBlockCallback;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.ActionResult;
public class WiredDust implements ModInitializer {
public static final String MODID = "wireddust";
public static WiredDustConfig CONFIG;
@Override
public void onInitialize() {
AutoConfig.register(WiredDustConfig.class, GsonConfigSerializer::new);
CONFIG = AutoConfig.getConfigHolder(WiredDustConfig.class).getConfig();
WiredDustBlocks.init();
WiredDustItems.init();
// Make sure player is not in spectator mode
// Make sure the player has sugar in his hand
// Check to see if the thing is interactable? (is this possible?)
// Attempt to place wire
/*UseBlockCallback.EVENT.register((player, world, hand, hitResult) -> {
if(player.getMainHandStack().equals(new ItemStack(Items.SUGAR)))
if(player.)
return ActionResult.PASS;
});*/
}
}

View File

@ -0,0 +1,24 @@
package me.parsell.wireddust;
import me.parsell.wireddust.core.WiredDustBlocks;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry;
import net.minecraft.client.render.RenderLayer;
public class WiredDustClient implements ClientModInitializer {
@Override
public void onInitializeClient(){
BlockRenderLayerMap.INSTANCE.putBlock(WiredDustBlocks.GLOWSTONE_WIRE, RenderLayer.getCutout());
ColorProviderRegistry.BLOCK.register((state, world, pos, tintIndex) -> {return 0xffbc5e;}, WiredDustBlocks.GLOWSTONE_WIRE);
BlockRenderLayerMap.INSTANCE.putBlock(WiredDustBlocks.BLAZE_POWDER_WIRE, RenderLayer.getCutout());
ColorProviderRegistry.BLOCK.register((state, world, pos, tintIndex) -> {return 0xCC5500;}, WiredDustBlocks.BLAZE_POWDER_WIRE);
BlockRenderLayerMap.INSTANCE.putBlock(WiredDustBlocks.GUNPOWDER_WIRE, RenderLayer.getCutout());
ColorProviderRegistry.BLOCK.register((state, world, pos, tintIndex) -> {return 0x696969;}, WiredDustBlocks.GUNPOWDER_WIRE); //nice
BlockRenderLayerMap.INSTANCE.putBlock(WiredDustBlocks.SUGAR_WIRE, RenderLayer.getCutout());
ColorProviderRegistry.BLOCK.register((state, world, pos, tintIndex) -> {return 0xffffff;}, WiredDustBlocks.SUGAR_WIRE);
}
}

View File

@ -0,0 +1,22 @@
package me.parsell.wireddust;
import me.shedaniel.autoconfig.ConfigData;
import me.shedaniel.autoconfig.annotation.Config;
@Config(name = "GlowstoneWire")
public class WiredDustConfig implements ConfigData{
public boolean useVanillaItems = true;
public boolean addSugarWire = true;
public boolean addGlowstoneWire = true;
public boolean addBlazePowderWire = true;
public boolean doBlazePowderDamage = true;
public boolean addGunpowderWire = true;
public boolean gunpowderWireIgnitesExtremelyFlammableBlocks = true;
public boolean gunpowderWireIgnitesFlammableBlocks = false;
public boolean gunpowderWireIgnitesTNT = true;
//TODO Consider gamerules for additional functionality instead of mod config
}

View File

@ -0,0 +1,51 @@
package me.parsell.wireddust.common;
import java.util.Random;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.BlockState;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.particle.ParticleEffect;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction.Axis;
import net.minecraft.world.World;
public class WDBlazePowderWireBlock extends WDWireBlock{
public WDBlazePowderWireBlock(Settings settings) {
super(settings);
}
@Override
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
if (!entity.isFireImmune() && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity)entity))
entity.damage(DamageSource.HOT_FLOOR, 1.0F);
}
@Environment(EnvType.CLIENT)
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
if (random.nextDouble() < 0.32F){
// get random double, within bounds x_min and x_max
double x_min = super.STATE_TO_VOXELSHAPE.get(state).getMin(Axis.X);
double z_min = super.STATE_TO_VOXELSHAPE.get(state).getMin(Axis.Z);
double x_max = super.STATE_TO_VOXELSHAPE.get(state).getMax(Axis.X);
double z_max = super.STATE_TO_VOXELSHAPE.get(state).getMax(Axis.Z);
double x_rand = x_min + (x_max - x_min) * random.nextDouble();
double z_rand = z_min + (z_max - z_min) * random.nextDouble();
// determine what particle I should show
ParticleEffect blaze_powder_particle = ParticleTypes.FLAME;
if(world.getBiomeAccess().getBiome(pos).getDownfall() > 0.0F)
blaze_powder_particle = ParticleTypes.SMOKE;
world.addParticle(blaze_powder_particle, pos.getX() + x_rand, pos.getY() + 0.1D, pos.getZ() + z_rand, 0.0, 0.0, 0.0);
super.randomDisplayTick(state, world, pos, random);
}
}
}

View File

@ -0,0 +1,120 @@
package me.parsell.wireddust.common;
import java.util.Random;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Items;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.BooleanProperty;
import net.minecraft.state.property.Properties;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.Direction.Axis;
import net.minecraft.world.World;
// TODO: All the magic to make this work the way i want
public class WDGunpowderWireBlock extends WDWireBlock{
public static final BooleanProperty LIT;
public WDGunpowderWireBlock(Settings settings) {
super(settings);
this.setDefaultState((BlockState)((BlockState)((BlockState)((BlockState)((BlockState)((BlockState)this.stateManager.getDefaultState()).with(WIRE_CONNECTION_NORTH, WDWireConnection.NONE)).with(WIRE_CONNECTION_EAST, WDWireConnection.NONE)).with(WIRE_CONNECTION_SOUTH, WDWireConnection.NONE)).with(WIRE_CONNECTION_WEST, WDWireConnection.NONE)).with(LIT, false));
}
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
super.appendProperties(builder.add(LIT));
}
private boolean hasUpConnection(BlockState state){
return ((WDWireConnection)state.get(WIRE_CONNECTION_NORTH)).isConnectedUp() ||
((WDWireConnection)state.get(WIRE_CONNECTION_SOUTH)).isConnectedUp() ||
((WDWireConnection)state.get(WIRE_CONNECTION_EAST)).isConnectedUp() ||
((WDWireConnection)state.get(WIRE_CONNECTION_WEST)).isConnectedUp();
}
static boolean pp = true;
// TODO: Supprt UP state
@Environment(EnvType.CLIENT)
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
if (state.get(LIT)){
// get random double, within bounds x/y_min and x/y_max
double x_min = super.STATE_TO_VOXELSHAPE.get(state).getMin(Axis.X);
double z_min = super.STATE_TO_VOXELSHAPE.get(state).getMin(Axis.Z);
double x_max = super.STATE_TO_VOXELSHAPE.get(state).getMax(Axis.X);
double z_max = super.STATE_TO_VOXELSHAPE.get(state).getMax(Axis.Z);
double x_rand = x_min + (x_max - x_min) * random.nextDouble();
double z_rand = z_min + (z_max - z_min) * random.nextDouble();
double y_rand = 0.1d;
if (hasUpConnection(state)){
if (z_rand < 0.1d && state.get(WIRE_CONNECTION_NORTH).isConnectedUp() ||
z_rand > 0.9d && state.get(WIRE_CONNECTION_SOUTH).isConnectedUp() ||
x_rand < 0.1d && state.get(WIRE_CONNECTION_WEST).isConnectedUp() ||
x_rand > 0.9d && state.get(WIRE_CONNECTION_EAST).isConnectedUp()) {
y_rand = 0.1D + (0.9D - 0.1D) * random.nextDouble();
}
}
System.out.printf("X: %1.2f | Y: %1.2f | Z: %1.2f\n", x_rand, y_rand, z_rand);
//NEW
/*
double rand_x, rand_y, rand_z;
boolean validParticle = false;
if (pp) {
pp = false;
System.out.println(super.STATE_TO_VOXELSHAPE.get(state).getBoundingBoxes().size());
}
do{
rand_x = random.nextDouble();
rand_y = random.nextDouble();
rand_z = random.nextDouble();
for (Box b : super.STATE_TO_VOXELSHAPE.get(state).getBoundingBoxes()){
if (b.contains(rand_x, rand_y, rand_z))
validParticle = true;
break;
}
}while (!validParticle); */
world.addParticle(ParticleTypes.FLAME, pos.getX() + x_rand, pos.getY() + y_rand, pos.getZ() + z_rand, 0.0, 0.0, 0.0);
super.randomDisplayTick(state, world, pos, random);
}
}
// TODO: TEST KILLING MINECRAFT WITH REDSTONE & FILL COMMANDS
@Override
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit){
if(world.isClient)
return ActionResult.SUCCESS;
if(player.abilities.allowModifyWorld){
if(!state.get(LIT) && player.getStackInHand(hand).getItem().equals(Items.FLINT_AND_STEEL)){
player.getStackInHand(hand).damage(1, world.getRandom(), (ServerPlayerEntity)player);
world.setBlockState(pos, state.with(LIT, true));
return ActionResult.SUCCESS;
}
}
super.onUse(state, world, pos, player, hand, hit);
return ActionResult.PASS;
}
static {
LIT = Properties.LIT;
}
}

View File

@ -0,0 +1,264 @@
package me.parsell.wireddust.common;
import java.util.Iterator;
import java.util.Map;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.google.common.collect.UnmodifiableIterator;
import org.apache.logging.log4j.core.jmx.Server;
import org.jetbrains.annotations.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.ShapeContext;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemPlacementContext;
import net.minecraft.item.ItemStack;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.EnumProperty;
import net.minecraft.util.ActionResult;
import net.minecraft.util.BlockMirror;
import net.minecraft.util.BlockRotation;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
import net.minecraft.world.WorldView;
public class WDWireBlock extends Block{
// These are the states of the wires coming off our block
public static final EnumProperty<WDWireConnection> WIRE_CONNECTION_NORTH;
public static final EnumProperty<WDWireConnection> WIRE_CONNECTION_SOUTH;
public static final EnumProperty<WDWireConnection> WIRE_CONNECTION_EAST;
public static final EnumProperty<WDWireConnection> WIRE_CONNECTION_WEST;
// Locally defined DIRECTION <-> WIRE_CONNECTION_DIRECTION
public static final Map<Direction, EnumProperty<WDWireConnection>> DIRECTION_TO_WIRE_CONNECTION;
// Determines the hitbox for our block
public static final VoxelShape DOT_VOXELSHAPE;
private static final Map<Direction, VoxelShape> DIRECTION_VOXELSHAPE, UP_VOXELSHAPE;
public final Map<BlockState, VoxelShape> STATE_TO_VOXELSHAPE = Maps.newHashMap();
public WDWireBlock(Settings settings) {
super(settings);
// Set these properties to be none as start, so we start with a dot
this.setDefaultState((BlockState)((BlockState)((BlockState)((BlockState)((BlockState)((BlockState)this.stateManager.getDefaultState()).with(WIRE_CONNECTION_NORTH, WDWireConnection.NONE)).with(WIRE_CONNECTION_EAST, WDWireConnection.NONE)).with(WIRE_CONNECTION_SOUTH, WDWireConnection.NONE)).with(WIRE_CONNECTION_WEST, WDWireConnection.NONE)));
UnmodifiableIterator<BlockState> stateItr = this.getStateManager().getStates().iterator();
while(stateItr.hasNext()) {
BlockState state = stateItr.next();
this.STATE_TO_VOXELSHAPE.put(state, determineVoxelShape(state));
}
}
// Make sure out block has the properties for us to manage
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(WIRE_CONNECTION_NORTH, WIRE_CONNECTION_EAST, WIRE_CONNECTION_SOUTH, WIRE_CONNECTION_WEST);
}
public VoxelShape determineVoxelShape(BlockState state){
VoxelShape voxelShape = DOT_VOXELSHAPE;
Iterator<Direction> dirItr = Direction.Type.HORIZONTAL.iterator();
while(dirItr.hasNext()) {
Direction direction = (Direction)dirItr.next();
WDWireConnection wireConnection = state.get(DIRECTION_TO_WIRE_CONNECTION.get(direction));
if (wireConnection == WDWireConnection.SIDE) {
voxelShape = VoxelShapes.union(voxelShape, (VoxelShape)DIRECTION_VOXELSHAPE.get(direction));
} else if (wireConnection == WDWireConnection.UP) {
voxelShape = VoxelShapes.union(voxelShape, (VoxelShape)UP_VOXELSHAPE.get(direction));
}
}
return voxelShape;
}
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
return STATE_TO_VOXELSHAPE.get(state);
}
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
BlockPos blockPos = pos.down();
BlockState blockState = world.getBlockState(blockPos);
return this.canRunOnTop(world, blockPos, blockState);
}
private boolean canRunOnTop(BlockView world, BlockPos pos, BlockState floor) {
return floor.isSideSolidFullSquare(world, pos, Direction.UP);
}
@Override
public BlockState rotate(BlockState state, BlockRotation rotation) {
switch(rotation) {
case CLOCKWISE_180:
return (BlockState)((BlockState)((BlockState)((BlockState)state.with(WIRE_CONNECTION_NORTH, state.get(WIRE_CONNECTION_SOUTH))).with(WIRE_CONNECTION_EAST, state.get(WIRE_CONNECTION_WEST))).with(WIRE_CONNECTION_SOUTH, state.get(WIRE_CONNECTION_NORTH))).with(WIRE_CONNECTION_WEST, state.get(WIRE_CONNECTION_EAST));
case COUNTERCLOCKWISE_90:
return (BlockState)((BlockState)((BlockState)((BlockState)state.with(WIRE_CONNECTION_NORTH, state.get(WIRE_CONNECTION_EAST))).with(WIRE_CONNECTION_EAST, state.get(WIRE_CONNECTION_SOUTH))).with(WIRE_CONNECTION_SOUTH, state.get(WIRE_CONNECTION_WEST))).with(WIRE_CONNECTION_WEST, state.get(WIRE_CONNECTION_NORTH));
case CLOCKWISE_90:
return (BlockState)((BlockState)((BlockState)((BlockState)state.with(WIRE_CONNECTION_NORTH, state.get(WIRE_CONNECTION_WEST))).with(WIRE_CONNECTION_EAST, state.get(WIRE_CONNECTION_NORTH))).with(WIRE_CONNECTION_SOUTH, state.get(WIRE_CONNECTION_EAST))).with(WIRE_CONNECTION_WEST, state.get(WIRE_CONNECTION_SOUTH));
default:
return state;
}
}
@Override
public BlockState mirror(BlockState state, BlockMirror mirror) {
switch(mirror) {
case LEFT_RIGHT:
return (BlockState)((BlockState)state.with(WIRE_CONNECTION_NORTH, state.get(WIRE_CONNECTION_SOUTH))).with(WIRE_CONNECTION_SOUTH, state.get(WIRE_CONNECTION_NORTH));
case FRONT_BACK:
return (BlockState)((BlockState)state.with(WIRE_CONNECTION_EAST, state.get(WIRE_CONNECTION_WEST))).with(WIRE_CONNECTION_WEST, state.get(WIRE_CONNECTION_EAST));
default:
return super.mirror(state, mirror);
}
}
private static boolean hasConnection(BlockState state) {
return ((WDWireConnection)state.get(WIRE_CONNECTION_NORTH)).isConnected() ||
((WDWireConnection)state.get(WIRE_CONNECTION_SOUTH)).isConnected() ||
((WDWireConnection)state.get(WIRE_CONNECTION_EAST)).isConnected() ||
((WDWireConnection)state.get(WIRE_CONNECTION_WEST)).isConnected();
}
private BlockState determineState(WorldAccess world, BlockState state, BlockPos pos){
// Iterates every direction, and determines if there needs to be a connection set on that direction
Iterator<Direction> dirItr = Direction.Type.HORIZONTAL.iterator();
while(dirItr.hasNext()){
Direction dir = dirItr.next();
if (!state.get(DIRECTION_TO_WIRE_CONNECTION.get(dir)).isBroken())
state = state.with(DIRECTION_TO_WIRE_CONNECTION.get(dir), determineConnection(world, pos, dir));
}
// This prevents 1 side connection from exsisting, as we don't want that since we don't want voxel-shapes like that. (We also don't support it)
boolean NORTH = state.get(WIRE_CONNECTION_NORTH).isConnected();
boolean SOUTH = state.get(WIRE_CONNECTION_SOUTH).isConnected();
boolean EAST = state.get(WIRE_CONNECTION_EAST).isConnected();
boolean WEST = state.get(WIRE_CONNECTION_WEST).isConnected();
// This overwrites BROKE features, meaning this entire system is kinda useless as it will cause some weird looking situations.
if (NORTH && !EAST && !WEST && !state.get(WIRE_CONNECTION_SOUTH).isBroken())
state = state.with(WIRE_CONNECTION_SOUTH, WDWireConnection.SIDE);
else if (SOUTH && !EAST && !WEST && !state.get(WIRE_CONNECTION_NORTH).isBroken())
state = state.with(WIRE_CONNECTION_NORTH, WDWireConnection.SIDE);
else if (!NORTH && !SOUTH && EAST && !state.get(WIRE_CONNECTION_WEST).isBroken())
state = state.with(WIRE_CONNECTION_WEST, WDWireConnection.SIDE);
else if (!NORTH && !SOUTH && WEST && !state.get(WIRE_CONNECTION_EAST).isBroken())
state = state.with(WIRE_CONNECTION_EAST, WDWireConnection.SIDE);
//TODO: FIX THIS.
return state;
}
private WDWireConnection determineConnection(WorldAccess world, BlockPos pos, Direction direction){
BlockPos offsetPos = pos.offset(direction);
if((world.getBlockState(offsetPos.up()).isOf(this) && world.isAir(pos.up()))) // If offset+up is me && if up is air
if(!world.getBlockState(offsetPos.up()).get(DIRECTION_TO_WIRE_CONNECTION.get(direction.getOpposite())).isBroken()) //if offset+up is not broken
if(world.getBlockState(offsetPos).hasSidedTransparency())
return WDWireConnection.SIDE;
else
return WDWireConnection.UP;
if(world.getBlockState(offsetPos.down()).isOf(this) && world.isAir(offsetPos)) // if offset+down is me && if offset is air
if(!world.getBlockState(offsetPos.down()).get(DIRECTION_TO_WIRE_CONNECTION.get(direction.getOpposite())).isBroken()) //if offset+down is not broken
return WDWireConnection.SIDE;
if(world.getBlockState(offsetPos).isOf(this)) // if offset is me
if(!world.getBlockState(offsetPos).get(DIRECTION_TO_WIRE_CONNECTION.get(direction.getOpposite())).isBroken()) // if offset is not broken
return WDWireConnection.SIDE;
return WDWireConnection.NONE;
}
@Override // Get the state I should place in, and update those around me (above/below) as needed
public BlockState getPlacementState(ItemPlacementContext ctx){
return determineState(ctx.getWorld(), this.getDefaultState(), ctx.getBlockPos());
}
@Override
public void onPlaced(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) {
world.updateNeighbors(pos.offset(Direction.UP), state.getBlock());
world.updateNeighbors(pos.offset(Direction.DOWN), state.getBlock());
}
@Override // This causes w/e issue that tracks deal with.
public void onBroken(WorldAccess world, BlockPos pos, BlockState state) {
world.updateNeighbors(pos.offset(Direction.UP), state.getBlock());
world.updateNeighbors(pos.offset(Direction.DOWN), state.getBlock());
}
@Override // Called when I get told to update, so I should see what/why I need to update. I also use this to determine if I need to be drop or not.
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) {
if (!world.isClient) {
if(!state.canPlaceAt(world, pos)) {
world.removeBlock(pos, false);
this.onBroken(world, pos, state);
dropStacks(state, world, pos);
} else {
world.setBlockState(pos, determineState(world, state, pos));
}
}
}
// Place block check disconnect (if block block connection)
@Override // For each link, set to break and update the blocks around me (above and below)
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit){
if(world.isClient)
return ActionResult.SUCCESS;
if(player.abilities.allowModifyWorld)
if(hasConnection(state) && !player.hasStackEquipped(EquipmentSlot.MAINHAND)) {
Iterator<Direction> dirItr = Direction.Type.HORIZONTAL.iterator();
while(dirItr.hasNext()){
Direction dir = dirItr.next();
if(state.get(DIRECTION_TO_WIRE_CONNECTION.get(dir)).isConnected())
state = state.with(DIRECTION_TO_WIRE_CONNECTION.get(dir), WDWireConnection.BROKE);
}
world.setBlockState(pos, state);
world.updateNeighbors(pos.down(), this); // Update those below me
world.updateNeighbors(pos.up(), this); // Update those above me
return ActionResult.SUCCESS;
}
return ActionResult.PASS;
}
static {
WIRE_CONNECTION_NORTH = EnumProperty.of("north", WDWireConnection.class);
WIRE_CONNECTION_EAST = EnumProperty.of("east", WDWireConnection.class);
WIRE_CONNECTION_SOUTH = EnumProperty.of("south", WDWireConnection.class);
WIRE_CONNECTION_WEST = EnumProperty.of("west", WDWireConnection.class);
DIRECTION_TO_WIRE_CONNECTION = Maps.newEnumMap((Map)ImmutableMap.of(
Direction.NORTH, WIRE_CONNECTION_NORTH,
Direction.EAST, WIRE_CONNECTION_EAST,
Direction.SOUTH, WIRE_CONNECTION_SOUTH,
Direction.WEST, WIRE_CONNECTION_WEST)
);
DOT_VOXELSHAPE = Block.createCuboidShape(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D);
DIRECTION_VOXELSHAPE = Maps.newEnumMap((Map)ImmutableMap.of(
Direction.NORTH, Block.createCuboidShape(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D),
Direction.SOUTH, Block.createCuboidShape(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D),
Direction.EAST, Block.createCuboidShape(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D),
Direction.WEST, Block.createCuboidShape(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D))
);
UP_VOXELSHAPE = Maps.newEnumMap((Map)ImmutableMap.of(
Direction.NORTH, VoxelShapes.union((VoxelShape)DIRECTION_VOXELSHAPE.get(Direction.NORTH), Block.createCuboidShape(3.0D, 0.0D, 0.0D, 13.0D, 16.0D, 1.0D)),
Direction.SOUTH, VoxelShapes.union((VoxelShape)DIRECTION_VOXELSHAPE.get(Direction.SOUTH), Block.createCuboidShape(3.0D, 0.0D, 15.0D, 13.0D, 16.0D, 16.0D)),
Direction.EAST, VoxelShapes.union((VoxelShape)DIRECTION_VOXELSHAPE.get(Direction.EAST), Block.createCuboidShape(15.0D, 0.0D, 3.0D, 16.0D, 16.0D, 13.0D)),
Direction.WEST, VoxelShapes.union((VoxelShape)DIRECTION_VOXELSHAPE.get(Direction.WEST), Block.createCuboidShape(0.0D, 0.0D, 3.0D, 1.0D, 16.0D, 13.0D)))
);
}
}

View File

@ -0,0 +1,36 @@
package me.parsell.wireddust.common;
import net.minecraft.util.StringIdentifiable;
public enum WDWireConnection implements StringIdentifiable{
UP("up"),
SIDE("side"),
BROKE("broke"),
NONE("none");
private final String name;
private WDWireConnection(String name){
this.name = name;
}
public String toString() {
return this.asString();
}
public String asString() {
return this.name;
}
public boolean isBroken() {
return this == BROKE;
}
public boolean isConnected() {
return this != NONE && this != BROKE;
}
public boolean isConnectedUp(){
return this == UP;
}
}

View File

@ -0,0 +1,35 @@
package me.parsell.wireddust.core;
import java.util.HashMap;
import java.util.Map;
import me.parsell.wireddust.WiredDust;
import me.parsell.wireddust.common.WDBlazePowderWireBlock;
import me.parsell.wireddust.common.WDGunpowderWireBlock;
import me.parsell.wireddust.common.WDWireBlock;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
public class WiredDustBlocks {
public static Map<ItemStack, Block> WDITEM_TO_BLOCK = new HashMap<ItemStack, Block>();
public static final Block GLOWSTONE_WIRE = new WDWireBlock(FabricBlockSettings.of(Material.SUPPORTED).breakInstantly().noCollision().luminance(9));
public static final Block GUNPOWDER_WIRE = new WDGunpowderWireBlock(FabricBlockSettings.of(Material.SUPPORTED).breakInstantly().noCollision());
public static final Block BLAZE_POWDER_WIRE = new WDBlazePowderWireBlock(FabricBlockSettings.of(Material.SUPPORTED).breakInstantly().noCollision().luminance(2));
public static final Block SUGAR_WIRE = new WDWireBlock(FabricBlockSettings.of(Material.SUPPORTED).breakInstantly().noCollision());
public static void init(){
Registry.register(Registry.BLOCK, new Identifier(WiredDust.MODID, "glowstone_wire"), GLOWSTONE_WIRE);
Registry.register(Registry.BLOCK, new Identifier(WiredDust.MODID, "gunpowder_wire"), GUNPOWDER_WIRE);
Registry.register(Registry.BLOCK, new Identifier(WiredDust.MODID, "blaze_powder_wire"), BLAZE_POWDER_WIRE);
Registry.register(Registry.BLOCK, new Identifier(WiredDust.MODID, "sugar_wire"), SUGAR_WIRE);
WDITEM_TO_BLOCK.put(new ItemStack(Items.GLOWSTONE_DUST), GLOWSTONE_WIRE);
WDITEM_TO_BLOCK.put(new ItemStack(Items.SUGAR), SUGAR_WIRE);
}
}

View File

@ -0,0 +1,22 @@
package me.parsell.wireddust.core;
import com.mojang.serialization.Lifecycle;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.Items;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.RegistryKey;
public class WiredDustItems {
public static void init(){
Registry.ITEM.set(Registry.ITEM.getRawId(Items.GLOWSTONE_DUST), RegistryKey.of(Registry.ITEM.getKey(), new Identifier("glowstone_dust")), new BlockItem(WiredDustBlocks.GLOWSTONE_WIRE, new FabricItemSettings().group(ItemGroup.MATERIALS)), Lifecycle.stable());
Registry.ITEM.set(Registry.ITEM.getRawId(Items.BLAZE_POWDER), RegistryKey.of(Registry.ITEM.getKey(), new Identifier("blaze_powder")), new BlockItem(WiredDustBlocks.BLAZE_POWDER_WIRE, new FabricItemSettings().group(ItemGroup.BREWING)), Lifecycle.stable());
Registry.ITEM.set(Registry.ITEM.getRawId(Items.GUNPOWDER), RegistryKey.of(Registry.ITEM.getKey(), new Identifier("gunpowder")), new BlockItem(WiredDustBlocks.GUNPOWDER_WIRE, new FabricItemSettings().group(ItemGroup.MATERIALS)), Lifecycle.stable());
Registry.ITEM.set(Registry.ITEM.getRawId(Items.SUGAR), RegistryKey.of(Registry.ITEM.getKey(), new Identifier("sugar")), new BlockItem(WiredDustBlocks.SUGAR_WIRE, new FabricItemSettings().group(ItemGroup.MATERIALS)), Lifecycle.stable());
}
}

View File

@ -0,0 +1,162 @@
{
"multipart": [
{
"when": {
"OR": [
{
"south": "none|broke",
"north": "none|broke",
"west": "none|broke",
"east": "none|broke"
},
{
"north": "side|up",
"east": "side|up"
},
{
"south": "side|up",
"east": "side|up"
},
{
"south": "side|up",
"west": "side|up"
},
{
"north": "side|up",
"west": "side|up"
}
]
},
"apply": {
"model": "wireddust:block/blaze_powder_dust_dot"
}
},
{
"when": {
"OR": [
{
"north": "side|up"
},
{
"south": "side|up",
"north": "none|broke",
"west": "none|broke",
"east": "none|broke"
}
]
},
"apply": {
"model": "wireddust:block/blaze_powder_dust_side0"
}
},
{
"when": {
"OR": [
{
"south": "side|up"
},
{
"south": "none|broke",
"north": "side|up",
"west": "none|broke",
"east": "none|broke"
},
{
"south": "broke",
"north": "side|up",
"west": "broke",
"east": "broke"
}
]
},
"apply": {
"model": "wireddust:block/blaze_powder_dust_side_alt0"
}
},
{
"when": {
"OR": [
{
"east": "side|up"
},
{
"south": "none|broke",
"north": "none|broke",
"west": "side|up",
"east": "none|broke"
},
{
"south": "broke",
"north": "broke",
"west": "side|up",
"east": "broke"
}
]
},
"apply": {
"y": 270,
"model": "wireddust:block/blaze_powder_dust_side_alt1"
}
},
{
"when": {
"OR": [
{
"west": "side|up"
},
{
"south": "none|broke",
"north": "none|broke",
"west": "none|broke",
"east": "side|up"
},
{
"south": "broke",
"north": "broke",
"west": "broke",
"east": "side|up"
}
]
},
"apply": {
"y": 270,
"model": "wireddust:block/blaze_powder_dust_side1"
}
},
{
"when": {
"north": "up"
},
"apply": {
"model": "wireddust:block/blaze_powder_dust_up"
}
},
{
"when": {
"east": "up"
},
"apply": {
"y": 90,
"model": "wireddust:block/blaze_powder_dust_up"
}
},
{
"when": {
"south": "up"
},
"apply": {
"y": 180,
"model": "wireddust:block/blaze_powder_dust_up"
}
},
{
"when": {
"west": "up"
},
"apply": {
"y": 270,
"model": "wireddust:block/blaze_powder_dust_up"
}
}
]
}

View File

@ -0,0 +1,162 @@
{
"multipart": [
{
"when": {
"OR": [
{
"south": "none|broke",
"north": "none|broke",
"west": "none|broke",
"east": "none|broke"
},
{
"north": "side|up",
"east": "side|up"
},
{
"south": "side|up",
"east": "side|up"
},
{
"south": "side|up",
"west": "side|up"
},
{
"north": "side|up",
"west": "side|up"
}
]
},
"apply": {
"model": "wireddust:block/glowstone_dust_dot"
}
},
{
"when": {
"OR": [
{
"north": "side|up"
},
{
"south": "side|up",
"north": "none|broke",
"west": "none|broke",
"east": "none|broke"
}
]
},
"apply": {
"model": "wireddust:block/glowstone_dust_side0"
}
},
{
"when": {
"OR": [
{
"south": "side|up"
},
{
"south": "none|broke",
"north": "side|up",
"west": "none|broke",
"east": "none|broke"
},
{
"south": "broke",
"north": "side|up",
"west": "broke",
"east": "broke"
}
]
},
"apply": {
"model": "wireddust:block/glowstone_dust_side_alt0"
}
},
{
"when": {
"OR": [
{
"east": "side|up"
},
{
"south": "none|broke",
"north": "none|broke",
"west": "side|up",
"east": "none|broke"
},
{
"south": "broke",
"north": "broke",
"west": "side|up",
"east": "broke"
}
]
},
"apply": {
"y": 270,
"model": "wireddust:block/glowstone_dust_side_alt1"
}
},
{
"when": {
"OR": [
{
"west": "side|up"
},
{
"south": "none|broke",
"north": "none|broke",
"west": "none|broke",
"east": "side|up"
},
{
"south": "broke",
"north": "broke",
"west": "broke",
"east": "side|up"
}
]
},
"apply": {
"y": 270,
"model": "wireddust:block/glowstone_dust_side1"
}
},
{
"when": {
"north": "up"
},
"apply": {
"model": "wireddust:block/glowstone_dust_up"
}
},
{
"when": {
"east": "up"
},
"apply": {
"y": 90,
"model": "wireddust:block/glowstone_dust_up"
}
},
{
"when": {
"south": "up"
},
"apply": {
"y": 180,
"model": "wireddust:block/glowstone_dust_up"
}
},
{
"when": {
"west": "up"
},
"apply": {
"y": 270,
"model": "wireddust:block/glowstone_dust_up"
}
}
]
}

View File

@ -0,0 +1,162 @@
{
"multipart": [
{
"when": {
"OR": [
{
"south": "none|broke",
"north": "none|broke",
"west": "none|broke",
"east": "none|broke"
},
{
"north": "side|up",
"east": "side|up"
},
{
"south": "side|up",
"east": "side|up"
},
{
"south": "side|up",
"west": "side|up"
},
{
"north": "side|up",
"west": "side|up"
}
]
},
"apply": {
"model": "wireddust:block/gunpowder_dust_dot"
}
},
{
"when": {
"OR": [
{
"north": "side|up"
},
{
"south": "side|up",
"north": "none|broke",
"west": "none|broke",
"east": "none|broke"
}
]
},
"apply": {
"model": "wireddust:block/gunpowder_dust_side0"
}
},
{
"when": {
"OR": [
{
"south": "side|up"
},
{
"south": "none|broke",
"north": "side|up",
"west": "none|broke",
"east": "none|broke"
},
{
"south": "broke",
"north": "side|up",
"west": "broke",
"east": "broke"
}
]
},
"apply": {
"model": "wireddust:block/gunpowder_dust_side_alt0"
}
},
{
"when": {
"OR": [
{
"east": "side|up"
},
{
"south": "none|broke",
"north": "none|broke",
"west": "side|up",
"east": "none|broke"
},
{
"south": "broke",
"north": "broke",
"west": "side|up",
"east": "broke"
}
]
},
"apply": {
"y": 270,
"model": "wireddust:block/gunpowder_dust_side_alt1"
}
},
{
"when": {
"OR": [
{
"west": "side|up"
},
{
"south": "none|broke",
"north": "none|broke",
"west": "none|broke",
"east": "side|up"
},
{
"south": "broke",
"north": "broke",
"west": "broke",
"east": "side|up"
}
]
},
"apply": {
"y": 270,
"model": "wireddust:block/gunpowder_dust_side1"
}
},
{
"when": {
"north": "up"
},
"apply": {
"model": "wireddust:block/gunpowder_dust_up"
}
},
{
"when": {
"east": "up"
},
"apply": {
"y": 90,
"model": "wireddust:block/gunpowder_dust_up"
}
},
{
"when": {
"south": "up"
},
"apply": {
"y": 180,
"model": "wireddust:block/gunpowder_dust_up"
}
},
{
"when": {
"west": "up"
},
"apply": {
"y": 270,
"model": "wireddust:block/gunpowder_dust_up"
}
}
]
}

View File

@ -0,0 +1,162 @@
{
"multipart": [
{
"when": {
"OR": [
{
"south": "none|broke",
"north": "none|broke",
"west": "none|broke",
"east": "none|broke"
},
{
"north": "side|up",
"east": "side|up"
},
{
"south": "side|up",
"east": "side|up"
},
{
"south": "side|up",
"west": "side|up"
},
{
"north": "side|up",
"west": "side|up"
}
]
},
"apply": {
"model": "wireddust:block/sugar_dust_dot"
}
},
{
"when": {
"OR": [
{
"north": "side|up"
},
{
"south": "side|up",
"north": "none|broke",
"west": "none|broke",
"east": "none|broke"
}
]
},
"apply": {
"model": "wireddust:block/sugar_dust_side0"
}
},
{
"when": {
"OR": [
{
"south": "side|up"
},
{
"south": "none|broke",
"north": "side|up",
"west": "none|broke",
"east": "none|broke"
},
{
"south": "broke",
"north": "side|up",
"west": "broke",
"east": "broke"
}
]
},
"apply": {
"model": "wireddust:block/sugar_dust_side_alt0"
}
},
{
"when": {
"OR": [
{
"east": "side|up"
},
{
"south": "none|broke",
"north": "none|broke",
"west": "side|up",
"east": "none|broke"
},
{
"south": "broke",
"north": "broke",
"west": "side|up",
"east": "broke"
}
]
},
"apply": {
"y": 270,
"model": "wireddust:block/sugar_dust_side_alt1"
}
},
{
"when": {
"OR": [
{
"west": "side|up"
},
{
"south": "none|broke",
"north": "none|broke",
"west": "none|broke",
"east": "side|up"
},
{
"south": "broke",
"north": "broke",
"west": "broke",
"east": "side|up"
}
]
},
"apply": {
"y": 270,
"model": "wireddust:block/sugar_dust_side1"
}
},
{
"when": {
"north": "up"
},
"apply": {
"model": "wireddust:block/sugar_dust_up"
}
},
{
"when": {
"east": "up"
},
"apply": {
"y": 90,
"model": "wireddust:block/sugar_dust_up"
}
},
{
"when": {
"south": "up"
},
"apply": {
"y": 180,
"model": "wireddust:block/sugar_dust_up"
}
},
{
"when": {
"west": "up"
},
"apply": {
"y": 270,
"model": "wireddust:block/sugar_dust_up"
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

View File

@ -0,0 +1,7 @@
{
"itemGroup.wireddust.general": "Wired Dust",
"block.wireddust.glowstone_wire": "Glowstone Wire",
"block.wireddust.sugar_wire": "Sugar Wire",
"block.wireddust.blaze_powder_wire": "Blaze Powder Wire",
"block.wireddust.gunpowder_wire": "Gunpowder Wire"
}

View File

@ -0,0 +1,26 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/blaze_powder_dust_dot",
"line": "wireddust:block/blaze_powder_dust_dot",
"overlay": "wireddust:block/blaze_powder_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay" },
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,25 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/blaze_powder_dust_dot",
"overlay": "wireddust:block/blaze_powder_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 8 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 8, 16, 0 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 8 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#overlay" },
"down": { "uv": [ 0, 8, 16, 0 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/blaze_powder_dust_side",
"textures": {
"line": "wireddust:block/blaze_powder_dust_line0"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/blaze_powder_dust_side",
"textures": {
"line": "wireddust:block/blaze_powder_dust_line1"
}
}

View File

@ -0,0 +1,25 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/blaze_powder_dust_dot",
"overlay": "wireddust:block/blaze_powder_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 8 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 16, 16, 8 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 8 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#overlay" },
"down": { "uv": [ 0, 16, 16, 8 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/blaze_powder_dust_side_alt",
"textures": {
"line": "wireddust:block/blaze_powder_dust_line0"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/blaze_powder_dust_side_alt",
"textures": {
"line": "wireddust:block/blaze_powder_dust_line1"
}
}

View File

@ -0,0 +1,26 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/blaze_powder_dust_dot",
"line": "wireddust:block/blaze_powder_dust_line0",
"overlay": "wireddust:block/blaze_powder_dust_overlay"
},
"elements": [
{ "from": [ 0, 0, 0.25 ],
"to": [ 16, 16, 0.25 ],
"shade": false,
"faces": {
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#line", "tintindex": 0 },
"north": { "uv": [ 16, 0, 0, 16 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0, 0.25 ],
"to": [ 16, 16, 0.25 ],
"shade": false,
"faces": {
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay" },
"north": { "uv": [ 16, 0, 0, 16 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,26 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/glowstone_dust_dot",
"line": "wireddust:block/glowstone_dust_dot",
"overlay": "wireddust:block/glowstone_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay" },
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,25 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/glowstone_dust_dot",
"overlay": "wireddust:block/glowstone_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 8 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 8, 16, 0 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 8 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#overlay" },
"down": { "uv": [ 0, 8, 16, 0 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/glowstone_dust_side",
"textures": {
"line": "wireddust:block/glowstone_dust_line0"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/glowstone_dust_side",
"textures": {
"line": "wireddust:block/glowstone_dust_line1"
}
}

View File

@ -0,0 +1,25 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/glowstone_dust_dot",
"overlay": "wireddust:block/glowstone_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 8 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 16, 16, 8 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 8 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#overlay" },
"down": { "uv": [ 0, 16, 16, 8 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/glowstone_dust_side_alt",
"textures": {
"line": "wireddust:block/glowstone_dust_line0"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/glowstone_dust_side_alt",
"textures": {
"line": "wireddust:block/glowstone_dust_line1"
}
}

View File

@ -0,0 +1,26 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/glowstone_dust_dot",
"line": "wireddust:block/glowstone_dust_line0",
"overlay": "wireddust:block/glowstone_dust_overlay"
},
"elements": [
{ "from": [ 0, 0, 0.25 ],
"to": [ 16, 16, 0.25 ],
"shade": false,
"faces": {
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#line", "tintindex": 0 },
"north": { "uv": [ 16, 0, 0, 16 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0, 0.25 ],
"to": [ 16, 16, 0.25 ],
"shade": false,
"faces": {
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay" },
"north": { "uv": [ 16, 0, 0, 16 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,26 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/gunpowder_dust_dot",
"line": "wireddust:block/gunpowder_dust_dot",
"overlay": "wireddust:block/gunpowder_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay" },
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,25 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/gunpowder_dust_dot",
"overlay": "wireddust:block/gunpowder_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 8 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 8, 16, 0 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 8 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#overlay" },
"down": { "uv": [ 0, 8, 16, 0 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/gunpowder_dust_side",
"textures": {
"line": "wireddust:block/gunpowder_dust_line0"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/gunpowder_dust_side",
"textures": {
"line": "wireddust:block/gunpowder_dust_line1"
}
}

View File

@ -0,0 +1,25 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/gunpowder_dust_dot",
"overlay": "wireddust:block/gunpowder_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 8 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 16, 16, 8 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 8 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#overlay" },
"down": { "uv": [ 0, 16, 16, 8 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/gunpowder_dust_side_alt",
"textures": {
"line": "wireddust:block/gunpowder_dust_line0"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/gunpowder_dust_side_alt",
"textures": {
"line": "wireddust:block/gunpowder_dust_line1"
}
}

View File

@ -0,0 +1,26 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/gunpowder_dust_dot",
"line": "wireddust:block/gunpowder_dust_line0",
"overlay": "wireddust:block/gunpowder_dust_overlay"
},
"elements": [
{ "from": [ 0, 0, 0.25 ],
"to": [ 16, 16, 0.25 ],
"shade": false,
"faces": {
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#line", "tintindex": 0 },
"north": { "uv": [ 16, 0, 0, 16 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0, 0.25 ],
"to": [ 16, 16, 0.25 ],
"shade": false,
"faces": {
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay" },
"north": { "uv": [ 16, 0, 0, 16 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,26 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/glowstone_dust_dot",
"line": "wireddust:block/glowstone_dust_dot",
"overlay": "wireddust:block/glowstone_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay" },
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,25 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/sugar_dust_dot",
"overlay": "wireddust:block/sugar_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 8 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 8, 16, 0 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 0 ],
"to": [ 16, 0.25, 8 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#overlay" },
"down": { "uv": [ 0, 8, 16, 0 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/sugar_dust_side",
"textures": {
"line": "wireddust:block/sugar_dust_line0"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/sugar_dust_side",
"textures": {
"line": "wireddust:block/sugar_dust_line1"
}
}

View File

@ -0,0 +1,25 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/sugar_dust_dot",
"overlay": "wireddust:block/sugar_dust_overlay"
},
"elements": [
{ "from": [ 0, 0.25, 8 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#line", "tintindex": 0 },
"down": { "uv": [ 0, 16, 16, 8 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0.25, 8 ],
"to": [ 16, 0.25, 16 ],
"shade": false,
"faces": {
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#overlay" },
"down": { "uv": [ 0, 16, 16, 8 ], "texture": "#overlay" }
}
}
]
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/sugar_dust_side_alt",
"textures": {
"line": "wireddust:block/sugar_dust_line0"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "wireddust:block/sugar_dust_side_alt",
"textures": {
"line": "wireddust:block/sugar_dust_line1"
}
}

View File

@ -0,0 +1,26 @@
{
"ambientocclusion": false,
"textures": {
"particle": "wireddust:block/sugar_dust_dot",
"line": "wireddust:block/sugar_dust_line0",
"overlay": "wireddust:block/sugar_dust_overlay"
},
"elements": [
{ "from": [ 0, 0, 0.25 ],
"to": [ 16, 16, 0.25 ],
"shade": false,
"faces": {
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#line", "tintindex": 0 },
"north": { "uv": [ 16, 0, 0, 16 ], "texture": "#line", "tintindex": 0 }
}
},
{ "from": [ 0, 0, 0.25 ],
"to": [ 16, 16, 0.25 ],
"shade": false,
"faces": {
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay" },
"north": { "uv": [ 16, 0, 0, 16 ], "texture": "#overlay" }
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

View File

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:glowstone_dust"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,42 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:empty"
}
],
"conditions": [
{
"condition": "minecraft:location_check",
"predicate": {
"fluid": {
"fluid": "minecraft:water"
}
}
}
]
},
{
"type": "minecraft:item",
"name": "minecraft:sugar",
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}
]
}
]
}

View File

@ -0,0 +1,40 @@
{
"schemaVersion": 1,
"id": "wireddust",
"version": "0.0.1",
"name": "Wired Dust",
"description": "Lets dust-like items be placable like dust is",
"authors": [
"Ganku (Badjman)"
],
"contact": {
"homepage": "",
"sources": "https://git.parsell.me/Justi/GlowstoneWire/"
},
"license": "MIT",
"icon": "assets/wireddust/icon.png",
"environment": "*",
"entrypoints": {
"client": [
"me.parsell.wireddust.WiredDustClient"
],
"main": [
"me.parsell.wireddust.WiredDust"
]
},
"mixins": [
"wireddust.mixins.json"
],
"depends": {
"fabricloader": ">=0.7.4",
"fabric": "*",
"minecraft": "1.16.x",
"cloth-config2": ">=4.11.26"
},
"suggests": {
}
}

View File

@ -0,0 +1,13 @@
{
"required": true,
"minVersion": "0.8",
"package": "me.parsell.wireddust.mixin",
"compatibilityLevel": "JAVA_8",
"mixins": [
],
"client": [
],
"injectors": {
"defaultRequire": 1
}
}