forked from df-mc/dragonfly
-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/portal #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
HashimTheArab
wants to merge
45
commits into
HashimTheArab:master
Choose a base branch
from
xNatsuri:feature/portal
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/portal #19
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
861f628
feat: implement nether portals
xNatsuri e9fe553
add obsidian and a nether portal frame block
xNatsuri 6b0bdd0
changes
xNatsuri db14f1e
Merge remote-tracking branch 'upstream/master' into feature/portal
didntpot f2912b1
Merge branch 'master' into feature/portal
didntpot e28598c
Merge branch 'master' into feature/portal
HashimTheArab 54c7ab9
Use block-inside events for portal travel
HashimTheArab 0609eeb
NeighbourUpdateTick now skips portal rescans for perpendicular horizo…
HashimTheArab a76b792
server: tighten Nether portal scan, frame and travel handling
HashimTheArab c2ed28f
server: add Nether portal and travel tests, run them in CI
HashimTheArab eaff6f4
remove useless docs
HashimTheArab 46aa0d9
remove useless docs
HashimTheArab 3083946
add light emission to portal block
HashimTheArab c48fef7
remove Place interface check:
HashimTheArab 68ee5aa
portal/nether.go: simplify and improve code and clarify doc
HashimTheArab 961db45
entity: harden TravelComputer and extract portal coord translation
HashimTheArab 1b75559
Floor Nether portal scaling for negative Overworld coordinates
HashimTheArab 59d0c6f
rename variable
HashimTheArab 48ed0b2
fix portal blocks being ignored if it didnt have obsidian below it
HashimTheArab 19e963f
fix: Prevent portal-crossed ender pearls from teleporting owners
HashimTheArab 8d145f1
Tighten Nether portal scan failure semantics
HashimTheArab ca05e5a
Merge branch 'master' into feature/portal
HashimTheArab f45ce65
add portal teleport method to avoid calling handler
HashimTheArab 982e1b3
feat: allow entities to travel through portals
HashimTheArab 8bbe5fb
remove test file
HashimTheArab f277982
add offset and neighborface
HashimTheArab 8944d58
use neighborface
HashimTheArab baea218
Use shared range iteration for portal scans
HashimTheArab 6227483
cube/trace: add BlockIntersects and BBoxIntersects methods (#1262)
HashimTheArab bb1a7a7
world/chunk: add Clone methods to chunk, subchunk, and palette (#1264)
HashimTheArab c08da57
block/grass.go: Fix bone meal duplication glitch (#1266)
Dasciam 64d40fd
server/block: Implement bonemeal huge growth particles (#1267)
Dasciam 83a8f57
item/crossbow.go: Always set critical flag to match vanilla (#1270)
Dasciam 7c30428
item/crossbow.go: Fix crossbow charging animation played even if the …
Dasciam 0f8cf2e
dragonfly: Updated for 1.26.30 (#1268)
didntpot 716292c
leveldat/level_dat.go: Always read full file to prevent potential rea…
TrippleAWap 7f68b06
updated contributor list
TwistedAsylumMC 477b816
session/session.go: fix panic when sessionless player logs (#1276)
RestartFU 1746dd7
session/entity_metadata.go: guard nil session handle in metadata (#1278)
RestartFU 8be43f3
leveldat/data.go: Add missing fields (#1277)
smell-of-curry 723721f
updated contributor list
TwistedAsylumMC 26be2a6
chunk/block_registry.go: Add RuntimeIDToHash in BlockRegistry interfa…
HashimTheArab 263fb85
server/block: Implement bamboo building blocks and items (#1292)
MEMOxiiii 026c062
updated contributor list
HashimTheArab ca55084
Merge remote-tracking branch 'upstream/master' into natsuri-feature-p…
HashimTheArab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -17,3 +17,6 @@ jobs: | |
|
|
||
| - name: Lint | ||
| run: make lint | ||
|
|
||
| - name: Test | ||
| run: go test ./... | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -18,6 +18,9 @@ jobs: | |
| - name: Lint | ||
| run: make lint | ||
|
|
||
| - name: Test | ||
| run: go test ./... | ||
|
|
||
| deploy: | ||
| name: Deploy | ||
| needs: build | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,78 @@ | ||
| package block | ||
|
|
||
| import ( | ||
| "github.com/df-mc/dragonfly/server/block/cube" | ||
| "github.com/df-mc/dragonfly/server/item" | ||
| "github.com/df-mc/dragonfly/server/world" | ||
| "github.com/go-gl/mathgl/mgl64" | ||
| "time" | ||
| ) | ||
|
|
||
| // BambooBlock is a rotatable flammable block made from bamboo. | ||
| type BambooBlock struct { | ||
| solid | ||
| bass | ||
|
|
||
| // Axis is the axis which the bamboo block faces. | ||
| Axis cube.Axis | ||
| // Stripped specifies if the bamboo block is stripped. | ||
| Stripped bool | ||
| } | ||
|
|
||
| // FlammabilityInfo ... | ||
| func (BambooBlock) FlammabilityInfo() FlammabilityInfo { | ||
| return newFlammabilityInfo(5, 5, true) | ||
| } | ||
|
|
||
| // BreakInfo ... | ||
| func (b BambooBlock) BreakInfo() BreakInfo { | ||
| return newBreakInfo(2.0, alwaysHarvestable, axeEffective, oneOf(b)) | ||
| } | ||
|
|
||
| // FuelInfo ... | ||
| func (BambooBlock) FuelInfo() item.FuelInfo { | ||
| return newFuelInfo(time.Second * 15) | ||
| } | ||
|
|
||
| // UseOnBlock ... | ||
| func (b BambooBlock) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) { | ||
| pos, face, used = firstReplaceable(tx, pos, face, b) | ||
| if !used { | ||
| return | ||
| } | ||
| b.Axis = face.Axis() | ||
|
|
||
| place(tx, pos, b, user, ctx) | ||
| return placed(ctx) | ||
| } | ||
|
|
||
| // Strip ... | ||
| func (b BambooBlock) Strip() (world.Block, world.Sound, bool) { | ||
| return BambooBlock{Axis: b.Axis, Stripped: true}, nil, !b.Stripped | ||
| } | ||
|
|
||
| // EncodeItem ... | ||
| func (b BambooBlock) EncodeItem() (name string, meta int16) { | ||
| if b.Stripped { | ||
| return "minecraft:stripped_bamboo_block", 0 | ||
| } | ||
| return "minecraft:bamboo_block", 0 | ||
| } | ||
|
|
||
| // EncodeBlock ... | ||
| func (b BambooBlock) EncodeBlock() (name string, properties map[string]any) { | ||
| meta := map[string]any{"pillar_axis": b.Axis.String()} | ||
| if b.Stripped { | ||
| return "minecraft:stripped_bamboo_block", meta | ||
| } | ||
| return "minecraft:bamboo_block", meta | ||
| } | ||
|
|
||
| // allBambooBlocks ... | ||
| func allBambooBlocks() (blocks []world.Block) { | ||
| for _, axis := range cube.Axes() { | ||
| blocks = append(blocks, BambooBlock{Axis: axis}) | ||
| blocks = append(blocks, BambooBlock{Axis: axis, Stripped: true}) | ||
| } | ||
| return | ||
| } |
This file contains hidden or 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,42 @@ | ||
| package block | ||
|
|
||
| import ( | ||
| "github.com/df-mc/dragonfly/server/item" | ||
| "time" | ||
| ) | ||
|
|
||
| // BambooMosaic is a decorative bamboo plank variant. | ||
| type BambooMosaic struct { | ||
| solid | ||
| bass | ||
| } | ||
|
|
||
| // FlammabilityInfo ... | ||
| func (BambooMosaic) FlammabilityInfo() FlammabilityInfo { | ||
| return newFlammabilityInfo(5, 20, true) | ||
| } | ||
|
|
||
| // BreakInfo ... | ||
| func (b BambooMosaic) BreakInfo() BreakInfo { | ||
| return newBreakInfo(2, alwaysHarvestable, axeEffective, oneOf(b)).withBlastResistance(15) | ||
| } | ||
|
|
||
| // RepairsWoodTools ... | ||
| func (BambooMosaic) RepairsWoodTools() bool { | ||
| return true | ||
| } | ||
|
|
||
| // FuelInfo ... | ||
| func (BambooMosaic) FuelInfo() item.FuelInfo { | ||
| return newFuelInfo(time.Second * 15) | ||
| } | ||
|
|
||
| // EncodeItem ... | ||
| func (BambooMosaic) EncodeItem() (name string, meta int16) { | ||
| return "minecraft:bamboo_mosaic", 0 | ||
| } | ||
|
|
||
| // EncodeBlock ... | ||
| func (BambooMosaic) EncodeBlock() (string, map[string]any) { | ||
| return "minecraft:bamboo_mosaic", nil | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.