-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change: Slider signal no longer does directional stuff
Sad, but i couldn't get it to work properly
- Loading branch information
1 parent
0725004
commit d04c902
Showing
14 changed files
with
82 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
src/main/java/net/zepalesque/redux/mixin/mixins/common/entity/ai/SliderMoveMixin.java
This file was deleted.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
src/main/java/net/zepalesque/redux/network/packet/SliderSignalPacket.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package net.zepalesque.redux.network.packet; | ||
|
||
import com.aetherteam.aether.entity.AetherEntityTypes; | ||
import com.aetherteam.aether.entity.monster.dungeon.boss.Slider; | ||
import com.aetherteam.nitrogen.attachment.INBTSynchable; | ||
import com.aetherteam.nitrogen.network.packet.SyncEntityPacket; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.multiplayer.ClientLevel; | ||
import net.minecraft.network.FriendlyByteBuf; | ||
import net.minecraft.network.RegistryFriendlyByteBuf; | ||
import net.minecraft.network.codec.StreamCodec; | ||
import net.minecraft.network.protocol.common.custom.CustomPacketPayload; | ||
import net.minecraft.world.entity.Entity; | ||
import net.neoforged.neoforge.attachment.AttachmentType; | ||
import net.neoforged.neoforge.network.handling.IPayloadContext; | ||
import net.zepalesque.redux.Redux; | ||
import net.zepalesque.redux.attachment.ReduxDataAttachments; | ||
import net.zepalesque.redux.attachment.SliderSignalAttachment; | ||
import oshi.util.tuples.Quartet; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public record SliderSignalPacket(int mobID) implements CustomPacketPayload { | ||
|
||
public static final Type<SliderSignalPacket> TYPE = new Type<>(Redux.loc("slider_signal")); | ||
|
||
public static final StreamCodec<RegistryFriendlyByteBuf, SliderSignalPacket> STREAM_CODEC = CustomPacketPayload.codec( | ||
SliderSignalPacket::write, | ||
SliderSignalPacket::decode); | ||
|
||
public void write(FriendlyByteBuf buf) { | ||
buf.writeInt(this.mobID()); | ||
} | ||
|
||
public static SliderSignalPacket decode(FriendlyByteBuf buf) { | ||
int mobID = buf.readInt(); | ||
return new SliderSignalPacket(mobID); | ||
} | ||
|
||
|
||
|
||
@Override | ||
public Type<? extends CustomPacketPayload> type() { | ||
return TYPE; | ||
} | ||
|
||
|
||
public static void execute(SliderSignalPacket payload, IPayloadContext context) { | ||
ClientLevel level = Minecraft.getInstance().level; | ||
if (level != null) { | ||
Entity entity = level.getEntity(payload.mobID()); | ||
if (entity != null && entity.hasData(ReduxDataAttachments.SLIDER_SIGNAL.get()) && entity.getType() == AetherEntityTypes.SLIDER.get()) { | ||
SliderSignalAttachment.get((Slider) entity).doBeep((Slider) entity); | ||
} | ||
} | ||
} | ||
} |
52 changes: 0 additions & 52 deletions
52
src/main/java/net/zepalesque/redux/network/packet/SliderSignalSyncPacket.java
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-519 Bytes
...main/resources/assets/aether/textures/entity/mobs/slider/slider_signal_down.png
Binary file not shown.
Binary file removed
BIN
-500 Bytes
...main/resources/assets/aether/textures/entity/mobs/slider/slider_signal_east.png
Binary file not shown.
Binary file removed
BIN
-503 Bytes
...ain/resources/assets/aether/textures/entity/mobs/slider/slider_signal_north.png
Binary file not shown.
Binary file removed
BIN
-498 Bytes
...ain/resources/assets/aether/textures/entity/mobs/slider/slider_signal_south.png
Binary file not shown.
Binary file removed
BIN
-637 Bytes
src/main/resources/assets/aether/textures/entity/mobs/slider/slider_signal_up.png
Binary file not shown.
Binary file removed
BIN
-502 Bytes
...main/resources/assets/aether/textures/entity/mobs/slider/slider_signal_west.png
Binary file not shown.