com.parzivail.util.block.connecting.SelfConnectingNodeBlock Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pswg Show documentation
Show all versions of pswg Show documentation
Explore the galaxy with Galaxies: Parzi's Star Wars Mod!
package com.parzivail.util.block.connecting;
import net.minecraft.class_1922;
import net.minecraft.class_1936;
import net.minecraft.class_2248;
import net.minecraft.class_2338;
import net.minecraft.class_2350;
import net.minecraft.class_265;
import net.minecraft.class_2680;
import net.minecraft.class_3726;
public class SelfConnectingNodeBlock extends ConnectingNodeBlock
{
protected static final class_265 SHAPE = class_2248.method_9541(2, 2, 2, 14, 14, 14);
public SelfConnectingNodeBlock(class_2251 settings)
{
super(settings);
}
@Override
public class_265 method_9530(class_2680 state, class_1922 world, class_2338 pos, class_3726 context)
{
return SHAPE;
}
@Override
public boolean canConnectTo(class_1936 world, class_2680 state, class_2680 otherState, class_2338 otherPos, class_2350 direction)
{
return otherState.method_26204() == this;
}
@Override
public boolean isConnectedTo(class_1936 world, class_2680 state, class_2680 otherState, class_2338 otherPos, class_2350 direction)
{
if (!canConnectTo(world, state, otherState, otherPos, direction))
return false;
// if (state.get(FACING_PROPERTIES.get(direction)))
// return true;
return otherState.method_11654(FACING_PROPERTIES.get(direction.method_10153()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy